diff --git a/SampleScripts/FallRandom.txt b/SampleScripts/FallRandom.cs similarity index 95% rename from SampleScripts/FallRandom.txt rename to SampleScripts/FallRandom.cs index c264e07..6a6c03a 100644 --- a/SampleScripts/FallRandom.txt +++ b/SampleScripts/FallRandom.cs @@ -1,20 +1,20 @@ -using System.Collections; -using System.Collections.Generic; -using UnityEngine; - -public class FallRandom : MonoBehaviour -{ - void Update() - { - if (this.transform.position.y < - 5.0) - { - float x = Random.Range(-9.0f,9.0f); - float y = 5.0f; - - this.transform.position = new Vector3(x,y,0); - - Rigidbody2D rb = GetComponent(); - rb.velocity = new Vector3(0, 0, 0); - } - } -} +using System.Collections; +using System.Collections.Generic; +using UnityEngine; + +public class FallRandom : MonoBehaviour +{ + void Update() + { + if (this.transform.position.y < - 5.0) + { + float x = Random.Range(-9.0f,9.0f); + float y = 5.0f; + + this.transform.position = new Vector3(x,y,0); + + Rigidbody2D rb = GetComponent(); + rb.velocity = new Vector3(0, 0, 0); + } + } +} diff --git a/SampleScripts/OnKeyPressMoveRight.txt b/SampleScripts/OnKeyPressMoveRight.cs similarity index 95% rename from SampleScripts/OnKeyPressMoveRight.txt rename to SampleScripts/OnKeyPressMoveRight.cs index b54fd90..bf26a9c 100644 --- a/SampleScripts/OnKeyPressMoveRight.txt +++ b/SampleScripts/OnKeyPressMoveRight.cs @@ -1,16 +1,16 @@ -using System.Collections; -using System.Collections.Generic; -using UnityEngine; - -public class OnKeyPressMoveRight : MonoBehaviour -{ - [SerializeField] private float speed = 5.0f; - - void Update() - { - if (Input.GetKey("right")) - { - this.gameObject.transform.Translate(speed * Time.deltaTime,0,0); - } - } -} +using System.Collections; +using System.Collections.Generic; +using UnityEngine; + +public class OnKeyPressMoveRight : MonoBehaviour +{ + [SerializeField] private float speed = 5.0f; + + void Update() + { + if (Input.GetKey("right")) + { + this.gameObject.transform.Translate(speed * Time.deltaTime,0,0); + } + } +} diff --git "a/\346\226\260\345\205\245\347\224\237\347\224\250_\343\202\262\343\203\274\343\203\240\351\226\213\347\231\272\344\275\223\351\250\223\344\274\232_\350\263\207\346\226\231.pdf" "b/\346\226\260\345\205\245\347\224\237\347\224\250_\343\202\262\343\203\274\343\203\240\351\226\213\347\231\272\344\275\223\351\250\223\344\274\232_\350\263\207\346\226\231.pdf" index fe57f99..79dbab9 100644 Binary files "a/\346\226\260\345\205\245\347\224\237\347\224\250_\343\202\262\343\203\274\343\203\240\351\226\213\347\231\272\344\275\223\351\250\223\344\274\232_\350\263\207\346\226\231.pdf" and "b/\346\226\260\345\205\245\347\224\237\347\224\250_\343\202\262\343\203\274\343\203\240\351\226\213\347\231\272\344\275\223\351\250\223\344\274\232_\350\263\207\346\226\231.pdf" differ