Update Unity project scene and library files
This commit is contained in:
1 parent
93037de7af
commit
69627cbb57
22 files changed
+81
No files matched your search
Binary file not shown.
@@ -0,0 +1,4 @@
|
|||||||
|
fileFormatVersion: 2
|
||||||
|
guid: 081cde42318f6a14999dfa01e53ce7ab
|
||||||
|
NativeFormatImporter:
|
||||||
|
userData:
|
||||||
@@ -0,0 +1,5 @@
|
|||||||
|
fileFormatVersion: 2
|
||||||
|
guid: 07946eeaf5dcb6b4fb9e35c09703030d
|
||||||
|
folderAsset: yes
|
||||||
|
DefaultImporter:
|
||||||
|
userData:
|
||||||
Binary file not shown.
@@ -0,0 +1,4 @@
|
|||||||
|
fileFormatVersion: 2
|
||||||
|
guid: 160a5a4409e79b2458ca3ca5e47d0dbc
|
||||||
|
NativeFormatImporter:
|
||||||
|
userData:
|
||||||
Binary file not shown.
@@ -0,0 +1,5 @@
|
|||||||
|
fileFormatVersion: 2
|
||||||
|
guid: d82e48316aab6c0419add11473bf6a9f
|
||||||
|
folderAsset: yes
|
||||||
|
DefaultImporter:
|
||||||
|
userData:
|
||||||
@@ -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 () {
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,8 @@
|
|||||||
|
fileFormatVersion: 2
|
||||||
|
guid: bca87aeabdbd60d4d9f4d94238dae49d
|
||||||
|
MonoImporter:
|
||||||
|
serializedVersion: 2
|
||||||
|
defaultReferences: []
|
||||||
|
executionOrder: 0
|
||||||
|
icon: {instanceID: 0}
|
||||||
|
userData:
|
||||||
@@ -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);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,8 @@
|
|||||||
|
fileFormatVersion: 2
|
||||||
|
guid: c6933e64aef5b994aab3afe2800dd5d4
|
||||||
|
MonoImporter:
|
||||||
|
serializedVersion: 2
|
||||||
|
defaultReferences: []
|
||||||
|
executionOrder: 0
|
||||||
|
icon: {instanceID: 0}
|
||||||
|
userData:
|
||||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Reference in new issue
Block a user