public static void Pac() { GameObject pac = (GameObject)Instantiate(Resources.Load("Pac")); pac.transform.SetParent(GameObject.Find("Canvas").transform, false); ForestPlayer player = GameObject.Find("AudioSource").GetComponent <ForestPlayer>(); player.BearAttack(); }
public static void AttackWithWood() { GameObject wood = GameObject.Find("Wood(Clone)"); Animator woodAnimator = wood.GetComponent <Animator>(); woodAnimator.SetTrigger("Attack"); ForestPlayer player = GameObject.Find("AudioSource").GetComponent <ForestPlayer>(); player.Torch(); }
void Start() { plot = GetComponent <Plot> (); forestPlayer = audioSource.GetComponent <ForestPlayer>(); //Debug.Log (defaultText); }