public void Animate(string text, Transform t) { if (AnimationSpawner == null) { AnimationSpawner = FindObjectOfType <AnimationSpawner>(); } if (AnimationSpawner != null) { AnimationSpawner.Spawn(text, t); } }
public void Animate(string text, GameObject obj) { if (AnimationSpawner == null) { AnimationSpawner = FindObjectOfType <AnimationSpawner>(); } if (AnimationSpawner != null) { AnimationSpawner.Spawn(text, obj.transform); } }
private void InstantiateGameObjects() { gameStatus = FindObjectOfType <GameStatus>(); animationSpawner = FindObjectOfType <AnimationSpawner>(); VisitedCharacters = gameStatus.GetListVisitingCharacters(); target1 = GameObject.Find("Target1"); target1.GetComponent <Image>().enabled = false; target1.GetComponent <Button>().enabled = false; target2 = GameObject.Find("Target2"); target2.GetComponent <Image>().enabled = false; target2.GetComponent <Button>().enabled = false; target3 = GameObject.Find("Target3"); target3.GetComponent <Image>().enabled = false; target3.GetComponent <Button>().enabled = false; setButton1 = GameObject.Find("SetButton1"); setButtonText1 = GameObject.Find("SetButtonText1"); setButtonLocation1 = setButton1.transform; setButton2 = GameObject.Find("SetButton2"); setButtonText2 = GameObject.Find("SetButtonText2"); setButtonLocation2 = setButton2.transform; setButton3 = GameObject.Find("SetButton3"); setButtonText3 = GameObject.Find("SetButtonText3"); setButtonLocation3 = setButton3.transform; }
void PositiveChange(AnimationSpawner spawner, string change, Text text) { spawner.Spawn(Visuals.Positive(change), text, text.transform); }