-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
30 changed files
with
2,414 additions
and
63 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
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 |
---|---|---|
@@ -0,0 +1,37 @@ | ||
using System.Collections; | ||
using System.Collections.Generic; | ||
using UnityEngine; | ||
|
||
public class LED_model : MonoBehaviour { | ||
|
||
/* Modes : | ||
* 0 : off | ||
* 1 : blink sync (FPTSR) | ||
* 2 : cross | ||
* 3 : arrowLeft | ||
* 4 : arrow Right | ||
*/ | ||
public bool[] TurnOnFor = { true, false, false, false, false }; | ||
|
||
// Use this for initialization | ||
void Start () { | ||
|
||
} | ||
|
||
// Update is called once per frame | ||
void Update () { | ||
|
||
} | ||
|
||
public void send (float TimeS, int mode){ | ||
if (TurnOnFor [mode] == false) { | ||
gameObject.GetComponent<SpriteRenderer> ().enabled = false; | ||
} else if (mode == 1) { | ||
if (TimeS % 0.3f >= 0.15f) { | ||
gameObject.GetComponent<SpriteRenderer> ().enabled = false; | ||
} else { | ||
gameObject.GetComponent<SpriteRenderer> ().enabled = true; | ||
} | ||
} | ||
} | ||
} |
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
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
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,40 @@ | ||
using System.Collections; | ||
using System.Collections.Generic; | ||
using UnityEngine; | ||
|
||
public class OBJ_manger : MonoBehaviour { | ||
|
||
public GameObject cone_model; | ||
public GameObject[] cones = new GameObject[100]; | ||
|
||
// Use this for initialization | ||
void Start () { | ||
|
||
} | ||
|
||
// Update is called once per frame | ||
void Update () { | ||
|
||
} | ||
|
||
public void updateCones (string raw = "&"){ | ||
string[] list = raw.Split ('&'); | ||
for (int i = 0; i < 100; i++) { | ||
if (list [i] != "") { | ||
string[] coord = list [i].Split ('#'); | ||
if (cones [i] == null) { | ||
cones[i] = Instantiate (cone_model, new Vector3 (float.Parse (coord [0]), float.Parse (coord [1]), -2.0f), new Quaternion (0, 0, 0, 0)); | ||
} else { | ||
if (cones [i].GetComponent<Transform> ().position.x != float.Parse (coord [0]) || cones [i].GetComponent<Transform> ().position.y != float.Parse (coord [1])) { | ||
Destroy (cones [i]); | ||
cones [i] = null; | ||
cones[i] = Instantiate (cone_model, new Vector3 (float.Parse (coord [0]), float.Parse (coord [1]), -2.0f), new Quaternion (0, 0, 0, 0)); | ||
} | ||
} | ||
} else if (cones [i] != null) { | ||
Destroy (cones [i]); | ||
cones [i] = null; | ||
} | ||
} | ||
} | ||
} |
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
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
Oops, something went wrong.