public PlateHoldingAction(PlayerControls player) { this.player = player; plate = ComponentUtil.GetClosestComponent <ClientPlate>(PlayerUtil.GetChefPosition(player)); state = 0; if (ComponentUtil.IsPlateOnComponent(plate)) { currentAction = new PathFindAction(player, ComponentUtil.GetPlateLocationComponent(plate)); } else { currentAction = new PathFindAction(player, plate); } }
public PlateHoldingAction(PlayerControls player, ClientPlate plate) { this.player = player; this.plate = plate; state = 0; Logger.Log("PlateHoldingAction instantiated"); if (ComponentUtil.IsPlateOnComponent(plate)) { currentAction = new PathFindAction(player, ComponentUtil.GetPlateLocationComponent(plate)); Logger.Log("Pathfinding component?"); } else { currentAction = new PathFindAction(player, plate); Logger.Log("Pathfinding plate?"); } }