void hit() { health -= 1; updateUI(); //rawEgg.GetComponentInChildren<Image> ().color = new Color (1f, 1f, 1f, 0f); player.playSE(0); eggShellCopy.GetComponent <Animation>().Play("rawEggHit"); if (health <= 0) { eggBreak(); } }
void onHit() { Debug.Log("hit"); player.healthUp(1); anima.Play("holeDown"); tarAnim.Play(); setHide(); player.playSE(5); }
public void genOne() { float theta = Random.Range(30f, 45f); int a = Random.Range(0, 2); if (a == 0) { theta = -theta; } GameObject go = GameObject.Instantiate(catHand, this.transform); go.transform.Rotate(new Vector3(0, 0, theta)); player.playSE(3); }
void generateOne(int index) { listHole [index].setStay(); player.playSE(4); }