Created
April 11, 2016 14:03
-
-
Save wannasaynone/5470b7b4278704ed81e1e831c0b4c757 to your computer and use it in GitHub Desktop.
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
if (Input.GetKeyDown(KeyCode.Space) && attackTimer <= 0) | |
{ | |
switch (attackState) | |
{ | |
case 1: | |
Instantiate(AttackWave1, gameObject.transform.position, gameObject.transform.rotation); | |
attackToAttackTimer = attackToAttackTimeEach; | |
attackState++; | |
break; | |
case 2: | |
Instantiate(AttackWave2, gameObject.transform.position, gameObject.transform.rotation); | |
attackToAttackTimer = attackToAttackTimeEach; | |
attackState++; | |
break; | |
case 3: | |
Instantiate(AttackWave3, gameObject.transform.position, gameObject.transform.rotation); | |
attackState = 1; | |
attackToAttackTimer = attackEachTime; | |
attackTimer = attackEachTime; | |
break; | |
} | |
} | |
if (Input.GetKey(KeyCode.LeftArrow) && Input.GetKey(KeyCode.UpArrow)) | |
{ | |
gameObject.transform.position = new Vector3(player.x - Speed, player.y + Speed); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment