Skip to content

Commit 16c8c37

Browse files
committed
+ Assessment Wizard
* allows for critera to be set for questions to be marked, questions can have various marks + Sample scripts to assess
1 parent 5b00da4 commit 16c8c37

File tree

12 files changed

+461
-10
lines changed

12 files changed

+461
-10
lines changed

Assets/Snapper/BlocklyPlayground.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,7 @@ private set
6666

6767
#region SnapperWindows
6868
public const string snapperPath = "Window/Snapper/";
69+
public const string snapperCodePath = "Snapper/Code/";
6970

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

131132
static void SaveToFile(string a_ex)
132133
{
133-
string location = Path.Combine(Application.dataPath, "Snapper/Code/");
134+
string location = Path.Combine(Application.dataPath, snapperCodePath);
134135
string filename = "SnapperCode";
135136

136137
if (!Directory.Exists(location))
Lines changed: 34 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,49 @@
1-
using System.Collections;
1+
/// ------------------------------------------------
2+
/// <summary>
3+
/// Author: DAVID-PC - Created with Snapper!
4+
/// Date: 5/12/2017
5+
/// ------------------------------------------------
6+
/// Brief: *Describe the script here*
7+
///
8+
/// viewed:
9+
///
10+
/// </summary>
11+
/// ------------------------------------------------
12+
13+
using System.Collections;
214
using System.Collections.Generic;
315
using UnityEngine;
416

517
public class PlayerMovement : MonoBehaviour {
618

19+
#region Variables
20+
21+
#endregion
22+
23+
724
// Use this for initialization
825
void Start () {
926

1027
}
1128

1229
// Update is called once per frame
1330
void Update () {
14-
transform.Translate(Vector3.forward * Time.deltaTime);
31+
if (Input.GetKey(KeyCode.W))
32+
{
33+
transform.Translate(Vector3.forward * Time.deltaTime * 5f);
34+
}
35+
if (Input.GetKey(KeyCode.S))
36+
{
37+
transform.Translate(Vector3.right * Time.deltaTime * 5f);
38+
}
39+
if (Input.GetKey(KeyCode.E))
40+
{
41+
transform.Rotate(Vector3.forward * Time.deltaTime * 90f);
42+
}
43+
if (Input.GetKey(KeyCode.Q))
44+
{
45+
transform.Rotate(-Vector3.up * Time.deltaTime * 90f);
46+
}
1547

1648
}
1749
}
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
using System.Collections;
2+
using System.Collections.Generic;
3+
using UnityEngine;
4+
5+
public class SnapperCode0 : MonoBehaviour {
6+
7+
// Use this for initialization
8+
void Start () {
9+
10+
}
11+
12+
// Update is called once per frame
13+
void Update () {
14+
if (true) {
15+
Debug.Log("Unity");
16+
}
17+
18+
}
19+
}

Assets/Snapper/Code/SnapperCode0.cs.meta

Lines changed: 12 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 87 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,87 @@
1+
/// ------------------------------------------------
2+
/// <summary>
3+
/// Author: DAVID-PC - Created with Snapper!
4+
/// Date: 16/12/2017
5+
/// ------------------------------------------------
6+
/// Brief: *Describe the script here*
7+
///
8+
/// viewed:
9+
///
10+
/// </summary>
11+
/// ------------------------------------------------
12+
13+
using System.Collections;
14+
using System.Collections.Generic;
15+
using UnityEngine;
16+
17+
[RequireComponent(typeof(Rigidbody))]
18+
public class SnapperCode1 : MonoBehaviour
19+
{
20+
21+
#region Variables
22+
Rigidbody rb;
23+
MeshRenderer meshrenderer;
24+
public Color color;
25+
26+
#endregion
27+
28+
29+
// Use this for initialization
30+
void Start()
31+
{
32+
rb = GetComponent<Rigidbody>();
33+
meshrenderer = GetComponent<MeshRenderer>();
34+
35+
}
36+
37+
// Update is called once per frame
38+
void Update()
39+
{
40+
if (Input.GetKey(KeyCode.W))
41+
{
42+
transform.Translate(Vector3.forward * Time.deltaTime * 5f);
43+
}
44+
if (Input.GetKey(KeyCode.S))
45+
{
46+
transform.Translate(-Vector3.forward * Time.deltaTime * 5f);
47+
}
48+
if (Input.GetKey(KeyCode.A))
49+
{
50+
transform.Translate(-Vector3.right * Time.deltaTime * 5f);
51+
}
52+
if (Input.GetKey(KeyCode.D))
53+
{
54+
transform.Translate(Vector3.right * Time.deltaTime * 5f);
55+
}
56+
if (Input.GetKey(KeyCode.Z))
57+
{
58+
transform.Translate(Vector3.up * Time.deltaTime * 5f);
59+
}
60+
if (Input.GetKey(KeyCode.C))
61+
{
62+
transform.Translate(-Vector3.up * Time.deltaTime * 5f);
63+
}
64+
if (Input.GetKeyDown(KeyCode.Space))
65+
{
66+
rb.AddForce(Vector3.up * 300f, ForceMode.Acceleration);
67+
}
68+
if (Input.GetKey(KeyCode.Q))
69+
{
70+
transform.Rotate(-Vector3.up * Time.deltaTime * 90f);
71+
}
72+
if (Input.GetKey(KeyCode.E))
73+
{
74+
transform.Rotate(Vector3.up * Time.deltaTime * 90f);
75+
}
76+
}
77+
78+
private void OnCollisionEnter(Collision collision)
79+
{
80+
if (ColorUtility.TryParseHtmlString("#ff9900", out color))
81+
{
82+
meshrenderer.material.color = color;
83+
}
84+
Debug.Log("<color=#" + ColorUtility.ToHtmlStringRGBA(color) + ">" + name + "</color>");
85+
86+
}
87+
}

Assets/Snapper/Code/SnapperCode1.cs.meta

Lines changed: 12 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
/// ------------------------------------------------
2+
/// <summary>
3+
/// Author: DAVID-PC - Created with Snapper!
4+
/// Date: 17/12/2017
5+
/// ------------------------------------------------
6+
/// Brief: *Describe the script here*
7+
///
8+
/// viewed:
9+
///
10+
/// </summary>
11+
/// ------------------------------------------------
12+
13+
using System.Collections;
14+
using System.Collections.Generic;
15+
using UnityEngine;
16+
17+
[RequireComponent(typeof(Rigidbody), typeof(MeshRenderer))]
18+
public class SnapperCode2 : MonoBehaviour
19+
{
20+
21+
#region Variables
22+
Rigidbody rb;
23+
MeshRenderer meshRenderer;
24+
public Color color;
25+
26+
#endregion
27+
28+
29+
// Use this for initialization
30+
void Start()
31+
{
32+
rb = GetComponent<Rigidbody>();
33+
meshRenderer = GetComponent<MeshRenderer>();
34+
35+
}
36+
37+
void FixedUpdate()
38+
{
39+
if (Input.GetKeyDown(KeyCode.Space))
40+
{
41+
rb.AddForce(Vector3.up * 300f, ForceMode.Acceleration);
42+
}
43+
}
44+
private void OnCollisionEnter(Collision collision)
45+
{
46+
if (ColorUtility.TryParseHtmlString("#33cc00", out color))
47+
{
48+
meshRenderer.material.color = color;
49+
}
50+
Debug.Log("<color=#" + ColorUtility.ToHtmlStringRGBA(color) + ">" + name + "</color>");
51+
}
52+
}

Assets/Snapper/Code/SnapperCode2.cs.meta

Lines changed: 12 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)