diff --git a/HelloCube/Assets/Materials/Bullet.mat b/HelloCube/Assets/Materials/Bullet.mat new file mode 100644 index 0000000..2d301cc Binary files /dev/null and b/HelloCube/Assets/Materials/Bullet.mat differ diff --git a/HelloCube/Assets/Materials/Bullet.mat.meta b/HelloCube/Assets/Materials/Bullet.mat.meta new file mode 100644 index 0000000..aaa4f1e --- /dev/null +++ b/HelloCube/Assets/Materials/Bullet.mat.meta @@ -0,0 +1,4 @@ +fileFormatVersion: 2 +guid: 081cde42318f6a14999dfa01e53ce7ab +NativeFormatImporter: + userData: diff --git a/HelloCube/Assets/Prefabs.meta b/HelloCube/Assets/Prefabs.meta new file mode 100644 index 0000000..d54c905 --- /dev/null +++ b/HelloCube/Assets/Prefabs.meta @@ -0,0 +1,5 @@ +fileFormatVersion: 2 +guid: 07946eeaf5dcb6b4fb9e35c09703030d +folderAsset: yes +DefaultImporter: + userData: diff --git a/HelloCube/Assets/Prefabs/Bullet.prefab b/HelloCube/Assets/Prefabs/Bullet.prefab new file mode 100644 index 0000000..9cbc0ff Binary files /dev/null and b/HelloCube/Assets/Prefabs/Bullet.prefab differ diff --git a/HelloCube/Assets/Prefabs/Bullet.prefab.meta b/HelloCube/Assets/Prefabs/Bullet.prefab.meta new file mode 100644 index 0000000..e131421 --- /dev/null +++ b/HelloCube/Assets/Prefabs/Bullet.prefab.meta @@ -0,0 +1,4 @@ +fileFormatVersion: 2 +guid: 160a5a4409e79b2458ca3ca5e47d0dbc +NativeFormatImporter: + userData: diff --git a/HelloCube/Assets/Scenes/TestBricks.unity b/HelloCube/Assets/Scenes/TestBricks.unity index 95e5def..fc70742 100644 Binary files a/HelloCube/Assets/Scenes/TestBricks.unity and b/HelloCube/Assets/Scenes/TestBricks.unity differ diff --git a/HelloCube/Assets/Scripts.meta b/HelloCube/Assets/Scripts.meta new file mode 100644 index 0000000..978aba3 --- /dev/null +++ b/HelloCube/Assets/Scripts.meta @@ -0,0 +1,5 @@ +fileFormatVersion: 2 +guid: d82e48316aab6c0419add11473bf6a9f +folderAsset: yes +DefaultImporter: + userData: diff --git a/HelloCube/Assets/Scripts/Bullet.cs b/HelloCube/Assets/Scripts/Bullet.cs new file mode 100644 index 0000000..e0b15e7 --- /dev/null +++ b/HelloCube/Assets/Scripts/Bullet.cs @@ -0,0 +1,17 @@ +using UnityEngine; +using System.Collections; + +public class Bullet : MonoBehaviour { + + // Use this for initialization + void Start () { + Debug.Log ("Bullet: Start"); + Destroy (this.gameObject, 3f); + + } + + // Update is called once per frame + void Update () { + + } +} diff --git a/HelloCube/Assets/Scripts/Bullet.cs.meta b/HelloCube/Assets/Scripts/Bullet.cs.meta new file mode 100644 index 0000000..4bb655a --- /dev/null +++ b/HelloCube/Assets/Scripts/Bullet.cs.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: bca87aeabdbd60d4d9f4d94238dae49d +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: diff --git a/HelloCube/Assets/Scripts/Shooter.cs b/HelloCube/Assets/Scripts/Shooter.cs new file mode 100644 index 0000000..33cd698 --- /dev/null +++ b/HelloCube/Assets/Scripts/Shooter.cs @@ -0,0 +1,30 @@ +using UnityEngine; +using System.Collections; + +public class Shooter : MonoBehaviour { + public Rigidbody bullet; + public float power = 1500f; + public float moveSpeed = 2f; + + // Use this for initialization + void Start () { + Debug.Log ("Shooter: Start"); + } + + // Update is called once per frame + void Update () { + float h = Input.GetAxis ("Horizontal") * Time.deltaTime * moveSpeed; + float v = Input.GetAxis ("Vertical") * Time.deltaTime * moveSpeed; + + this.transform.Translate (h, v, 0); + + if (Input.GetButtonUp ("Fire1")) { + Rigidbody instance = Instantiate (bullet, + this.transform.position, + this.transform.rotation) as Rigidbody; + Vector3 forward = this.transform.TransformDirection( + Vector3.forward); + instance.AddForce (forward * power); + } + } +} diff --git a/HelloCube/Assets/Scripts/Shooter.cs.meta b/HelloCube/Assets/Scripts/Shooter.cs.meta new file mode 100644 index 0000000..80a1bea --- /dev/null +++ b/HelloCube/Assets/Scripts/Shooter.cs.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: c6933e64aef5b994aab3afe2800dd5d4 +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: diff --git a/HelloCube/Library/CurrentLayout.dwlt b/HelloCube/Library/CurrentLayout.dwlt index 6ca9657..68c2521 100644 Binary files a/HelloCube/Library/CurrentLayout.dwlt and b/HelloCube/Library/CurrentLayout.dwlt differ diff --git a/HelloCube/Library/ScriptAssemblies/Assembly-CSharp.dll b/HelloCube/Library/ScriptAssemblies/Assembly-CSharp.dll new file mode 100644 index 0000000..92519b4 Binary files /dev/null and b/HelloCube/Library/ScriptAssemblies/Assembly-CSharp.dll differ diff --git a/HelloCube/Library/assetDatabase3 b/HelloCube/Library/assetDatabase3 index f80f3f5..4d27d6f 100644 Binary files a/HelloCube/Library/assetDatabase3 and b/HelloCube/Library/assetDatabase3 differ diff --git a/HelloCube/Library/expandedItems b/HelloCube/Library/expandedItems index 1ef481c..2caa90e 100644 Binary files a/HelloCube/Library/expandedItems and b/HelloCube/Library/expandedItems differ diff --git a/HelloCube/Library/guidmapper b/HelloCube/Library/guidmapper index 7b811d0..1407dd9 100644 Binary files a/HelloCube/Library/guidmapper and b/HelloCube/Library/guidmapper differ diff --git a/HelloCube/Library/metadata/07/07946eeaf5dcb6b4fb9e35c09703030d b/HelloCube/Library/metadata/07/07946eeaf5dcb6b4fb9e35c09703030d new file mode 100644 index 0000000..4b5ec00 Binary files /dev/null and b/HelloCube/Library/metadata/07/07946eeaf5dcb6b4fb9e35c09703030d differ diff --git a/HelloCube/Library/metadata/08/081cde42318f6a14999dfa01e53ce7ab b/HelloCube/Library/metadata/08/081cde42318f6a14999dfa01e53ce7ab new file mode 100644 index 0000000..2a52c5f Binary files /dev/null and b/HelloCube/Library/metadata/08/081cde42318f6a14999dfa01e53ce7ab differ diff --git a/HelloCube/Library/metadata/16/160a5a4409e79b2458ca3ca5e47d0dbc b/HelloCube/Library/metadata/16/160a5a4409e79b2458ca3ca5e47d0dbc new file mode 100644 index 0000000..80b9f1c Binary files /dev/null and b/HelloCube/Library/metadata/16/160a5a4409e79b2458ca3ca5e47d0dbc differ diff --git a/HelloCube/Library/metadata/bc/bca87aeabdbd60d4d9f4d94238dae49d b/HelloCube/Library/metadata/bc/bca87aeabdbd60d4d9f4d94238dae49d new file mode 100644 index 0000000..d4b0708 Binary files /dev/null and b/HelloCube/Library/metadata/bc/bca87aeabdbd60d4d9f4d94238dae49d differ diff --git a/HelloCube/Library/metadata/c6/c6933e64aef5b994aab3afe2800dd5d4 b/HelloCube/Library/metadata/c6/c6933e64aef5b994aab3afe2800dd5d4 new file mode 100644 index 0000000..cbe2c60 Binary files /dev/null and b/HelloCube/Library/metadata/c6/c6933e64aef5b994aab3afe2800dd5d4 differ diff --git a/HelloCube/Library/metadata/d8/d82e48316aab6c0419add11473bf6a9f b/HelloCube/Library/metadata/d8/d82e48316aab6c0419add11473bf6a9f new file mode 100644 index 0000000..8ed8e91 Binary files /dev/null and b/HelloCube/Library/metadata/d8/d82e48316aab6c0419add11473bf6a9f differ