public static void LogPlate() { ClientPlate plate = Object.FindObjectOfType <ClientPlate>(); Logger.Log($"Plate location: {Logger.FormatPosition(plate.transform.position)}"); Logger.Log("Before method call"); Component component = ComponentUtil.GetPlateLocationComponent(plate); Logger.Log("After method call"); Logger.Log($"Component name: {component.name}"); }
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?"); } }