void Start() { _fsm = new StateMachine<SlotMachineAI>(this); _fsm.setState(new InsertCoinState()); wheelsArray[0] = GameObject.Find("Wheel0").GetComponent<Wheel>(); wheelsArray[1] = GameObject.Find("Wheel1").GetComponent<Wheel>(); wheelsArray[2] = GameObject.Find("Wheel2").GetComponent<Wheel>(); buttonsArray[0] = GameObject.Find("Button0").GetComponent<Button>(); buttonsArray[1] = GameObject.Find("Button1").GetComponent<Button>(); buttonsArray[2] = GameObject.Find("Button2").GetComponent<Button>(); lever = GameObject.Find("Lever").GetComponent<Lever>(); mouth = GameObject.Find("CatMouth").GetComponent<CatMouth>(); cookieDispenser = GameObject.Find("CookieDispenser").GetComponent<Dispenser>(); particles = GameObject.Find("Particles").GetComponent<ParticleSystem>(); }
public void enableMouth() { if (mouth == null) mouth = GameObject.Find("CatMouth").GetComponent<CatMouth>(); mouth._enabled = true; }