-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* allows for critera to be set for questions to be marked, questions can have various marks + Sample scripts to assess
- Loading branch information
1 parent
5b00da4
commit 16c8c37
Showing
12 changed files
with
461 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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); | ||
} | ||
|
||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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"); | ||
} | ||
|
||
} | ||
} |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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>"); | ||
|
||
} | ||
} |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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>"); | ||
} | ||
} |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Oops, something went wrong.