void OnMouseDown() { if (status != 1) { if (gameObject.name == "boat") { action.MoveBoat(); // update state int rightPriest = controller.rightCoastCtrl.GetCharacterNum()[0]; int rightDevil = controller.rightCoastCtrl.GetCharacterNum()[1]; int leftPriest = controller.leftCoastCtrl.GetCharacterNum()[0]; int leftDevil = controller.leftCoastCtrl.GetCharacterNum()[1]; bool location = controller.boatCtrl.boat.Location == Location.left ? true : false; int pcount = controller.boatCtrl.GetCharacterNum()[0]; int dcount = controller.boatCtrl.GetCharacterNum()[1]; if (location) { leftPriest += pcount; leftDevil += dcount; } else { rightPriest += pcount; rightDevil += dcount; } state = new IState(leftPriest, leftDevil, rightPriest, rightDevil, location, null); } else { action.CharacterClicked(characterCtrl); } } }
void OnMouseDown() { if (gameObject.name == "boat") { action.MoveBoat(); } else { action.CharacterClicked(characterCtrl); } }
public void OnMouseDown() { //Debug.Log("status" + status); if (flag == true) { return; } if (gameObject.name == "boat") { action.MoveBoat(); } else { action.CharacterClicked(characterController); } }