public PickDropAction(PlayerControls player, bool skipHoldingCheck = false) { this.player = player; this.skipHoldingCheck = skipHoldingCheck; currentlyHolding = PlayerUtil.GetCarrying(player); Keyboard.Get().SendDown(Keyboard.Input.PICK_DROP); Logger.Log("PickDropAction instantiated"); }
public ProcessIngredientAction(PlayerControls player) { string carrying = PlayerUtil.GetCarrying(player); Logger.Log("ProcessIngredientAction instantiated"); switch (carrying) { case "SushiFish": case "SushiPrawn": action = new ChopIngredientAction(player); break; case "SushiRice": action = new CookIngredientAction(player); break; case "Seaweed": action = null; break; } }
public bool Update() { if (skipHoldingCheck) { retry -= 1; if (retry <= 0) { return(true); } return(false); } string newHolding = PlayerUtil.GetCarrying(player); if (retry == 5) { Keyboard.Get().SendUp(Keyboard.Input.PICK_DROP); } else if (retry == 0) { Keyboard.Get().SendDown(Keyboard.Input.PICK_DROP); retry = TRIES; return(false); } if (newHolding.Equals(currentlyHolding)) { retry -= 1; return(false); } return(true); }