public void giveFood() { _cm.isWaitingForFood = false; _cm.timeToEat = 2f; //used for animation syncing _gm.eat(_cm, _cm.roomControl.sitTranform); }
public void takeAction(ChildManager child) { try { Action action = actions[Random.Range(0, actions.Count)]; print(child.name + " pick action " + action + " to " + child.nextRoom); if (action == Action.puke) { gamemanager.pukeInToilet(child); } else if (action == Action.flush) { gamemanager.flushToilet(); } else if (action == Action.puckAndFlush) { gamemanager.flushAndPuke(child); } else if (action == Action.sit) { gamemanager.sit(child, sitTranform); } else if (action == Action.beer) { if (child.tag == "Girl") { gamemanager.sit(child, sitTranform); } else { gamemanager.beer(child, sitTranform); } } else if (action == Action.crayon) { gamemanager.crayon(crayonTransform); } else if (action == Action.goodTV) { gamemanager.goodTV(child, sitTranform); } else if (action == Action.badTV) { gamemanager.badTV(child, sitTranform); } else if (action == Action.sadTV) { gamemanager.sadTV(child, sitTranform); } else if (action == Action.eat) { Debug.Log("bowl is " + gamemanager.bowl.activeSelf); if (gamemanager.bowl.activeSelf) { gamemanager.eat(child, sitTranform); } else { child.isWaitingForFood = true; gamemanager.sit(child, sitTranform); } } else if (action == Action.hideBear) { gamemanager.hideBear(child, sitTranform); } else if (action == Action.hideCube) { gamemanager.hideCube(child, sitTranform); } } catch (System.Exception) { } }