Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //****** Donations are greatly appreciated. ******
- //****** You can donate directly to Jesse through paypal at https://www.paypal.me/JEtzler ******
- var fireAttackPrefab : GameObject;
- function OnGUI () {
- if (GUI.Button (Rect (Screen.width / 2,Screen.height / 2 + 100,80,20), "Attack1")) {
- attackFire();
- }
- }
- function Update () {
- //attack fire
- if(Input.GetKeyDown("1")) {
- attackFire();
- }
- }
- function attackFire () {
- Instantiate(fireAttackPrefab,this.transform.position,this.transform.rotation);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement