Skip to content

Commit

Permalink
+ Assessment Wizard
Browse files Browse the repository at this point in the history
* allows for critera to be set for questions to be marked, questions can have various marks
+ Sample scripts to assess
  • Loading branch information
DavidAzouz29 committed Dec 17, 2017
1 parent 5b00da4 commit 16c8c37
Show file tree
Hide file tree
Showing 12 changed files with 461 additions and 10 deletions.
3 changes: 2 additions & 1 deletion Assets/Snapper/BlocklyPlayground.cs
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@ private set

#region SnapperWindows
public const string snapperPath = "Window/Snapper/";
public const string snapperCodePath = "Snapper/Code/";

//[EditorWindowTitle(title = "Snapper Editor", useTypeNameAsIconName = true)]
[MenuItem(snapperPath + "Snapper Editor &s", priority = 2)]
Expand Down Expand Up @@ -130,7 +131,7 @@ public static void SaveAsJavaScript()

static void SaveToFile(string a_ex)
{
string location = Path.Combine(Application.dataPath, "Snapper/Code/");
string location = Path.Combine(Application.dataPath, snapperCodePath);
string filename = "SnapperCode";

if (!Directory.Exists(location))
Expand Down
36 changes: 34 additions & 2 deletions Assets/Snapper/Code/PlayerMovement.cs
Original file line number Diff line number Diff line change
@@ -1,17 +1,49 @@
using System.Collections;
/// ------------------------------------------------
/// <summary>
/// Author: DAVID-PC - Created with Snapper!
/// Date: 5/12/2017
/// ------------------------------------------------
/// Brief: *Describe the script here*
///
/// viewed:
///
/// </summary>
/// ------------------------------------------------

using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class PlayerMovement : MonoBehaviour {

#region Variables

#endregion


// Use this for initialization
void Start () {

}

// Update is called once per frame
void Update () {
transform.Translate(Vector3.forward * Time.deltaTime);
if (Input.GetKey(KeyCode.W))
{
transform.Translate(Vector3.forward * Time.deltaTime * 5f);
}
if (Input.GetKey(KeyCode.S))
{
transform.Translate(Vector3.right * Time.deltaTime * 5f);
}
if (Input.GetKey(KeyCode.E))
{
transform.Rotate(Vector3.forward * Time.deltaTime * 90f);
}
if (Input.GetKey(KeyCode.Q))
{
transform.Rotate(-Vector3.up * Time.deltaTime * 90f);
}

}
}
19 changes: 19 additions & 0 deletions Assets/Snapper/Code/SnapperCode0.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class SnapperCode0 : MonoBehaviour {

// Use this for initialization
void Start () {

}

// Update is called once per frame
void Update () {
if (true) {
Debug.Log("Unity");
}

}
}
12 changes: 12 additions & 0 deletions Assets/Snapper/Code/SnapperCode0.cs.meta

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

87 changes: 87 additions & 0 deletions Assets/Snapper/Code/SnapperCode1.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,87 @@
/// ------------------------------------------------
/// <summary>
/// Author: DAVID-PC - Created with Snapper!
/// Date: 16/12/2017
/// ------------------------------------------------
/// Brief: *Describe the script here*
///
/// viewed:
///
/// </summary>
/// ------------------------------------------------

using System.Collections;
using System.Collections.Generic;
using UnityEngine;

[RequireComponent(typeof(Rigidbody))]
public class SnapperCode1 : MonoBehaviour
{

#region Variables
Rigidbody rb;
MeshRenderer meshrenderer;
public Color color;

#endregion


// Use this for initialization
void Start()
{
rb = GetComponent<Rigidbody>();
meshrenderer = GetComponent<MeshRenderer>();

}

// Update is called once per frame
void Update()
{
if (Input.GetKey(KeyCode.W))
{
transform.Translate(Vector3.forward * Time.deltaTime * 5f);
}
if (Input.GetKey(KeyCode.S))
{
transform.Translate(-Vector3.forward * Time.deltaTime * 5f);
}
if (Input.GetKey(KeyCode.A))
{
transform.Translate(-Vector3.right * Time.deltaTime * 5f);
}
if (Input.GetKey(KeyCode.D))
{
transform.Translate(Vector3.right * Time.deltaTime * 5f);
}
if (Input.GetKey(KeyCode.Z))
{
transform.Translate(Vector3.up * Time.deltaTime * 5f);
}
if (Input.GetKey(KeyCode.C))
{
transform.Translate(-Vector3.up * Time.deltaTime * 5f);
}
if (Input.GetKeyDown(KeyCode.Space))
{
rb.AddForce(Vector3.up * 300f, ForceMode.Acceleration);
}
if (Input.GetKey(KeyCode.Q))
{
transform.Rotate(-Vector3.up * Time.deltaTime * 90f);
}
if (Input.GetKey(KeyCode.E))
{
transform.Rotate(Vector3.up * Time.deltaTime * 90f);
}
}

private void OnCollisionEnter(Collision collision)
{
if (ColorUtility.TryParseHtmlString("#ff9900", out color))
{
meshrenderer.material.color = color;
}
Debug.Log("<color=#" + ColorUtility.ToHtmlStringRGBA(color) + ">" + name + "</color>");

}
}
12 changes: 12 additions & 0 deletions Assets/Snapper/Code/SnapperCode1.cs.meta

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

52 changes: 52 additions & 0 deletions Assets/Snapper/Code/SnapperCode2.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
/// ------------------------------------------------
/// <summary>
/// Author: DAVID-PC - Created with Snapper!
/// Date: 17/12/2017
/// ------------------------------------------------
/// Brief: *Describe the script here*
///
/// viewed:
///
/// </summary>
/// ------------------------------------------------

using System.Collections;
using System.Collections.Generic;
using UnityEngine;

[RequireComponent(typeof(Rigidbody), typeof(MeshRenderer))]
public class SnapperCode2 : MonoBehaviour
{

#region Variables
Rigidbody rb;
MeshRenderer meshRenderer;
public Color color;

#endregion


// Use this for initialization
void Start()
{
rb = GetComponent<Rigidbody>();
meshRenderer = GetComponent<MeshRenderer>();

}

void FixedUpdate()
{
if (Input.GetKeyDown(KeyCode.Space))
{
rb.AddForce(Vector3.up * 300f, ForceMode.Acceleration);
}
}
private void OnCollisionEnter(Collision collision)
{
if (ColorUtility.TryParseHtmlString("#33cc00", out color))
{
meshRenderer.material.color = color;
}
Debug.Log("<color=#" + ColorUtility.ToHtmlStringRGBA(color) + ">" + name + "</color>");
}
}
12 changes: 12 additions & 0 deletions Assets/Snapper/Code/SnapperCode2.cs.meta

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 16c8c37

Please sign in to comment.