예제 #1
0
        public static bool CanPickupItem(ClientWorkstation clientWorkstation)
        {
            Type t      = typeof(ClientWorkstation);//ˈ̞
            var  method = t.GetMethod("CanPickupItem", BindingFlags.Instance | BindingFlags.NonPublic);

            return((bool)method.Invoke(clientWorkstation, null));
        }
예제 #2
0
        public ChopAction(PlayerControls player, ClientWorkstation workstation)
        {
            this.player      = player;
            this.workstation = workstation;

            Keyboard.Get().SendDown(Keyboard.Input.CHOP_THROW);

            Logger.Log("ChopAction instantiated");
        }
예제 #3
0
        public ChopIngredientAction(PlayerControls player)
        {
            this.player = player;
            state       = 0;

            workstation = ComponentUtil.GetClosestMatchingComponent <ClientWorkstation>(
                player.transform.position, IsChoppingNotBlocked
                );

            currentAction =
                new PathFindAction(
                    player,
                    workstation
                    );

            Logger.Log("ChopIngredientAction instantiated");
        }
예제 #4
0
        public static bool HasFinishedChopping(ClientWorkstation workstation)
        {
            ClientWorkableItem workableItem = (ClientWorkableItem)ReflectionUtil.GetValue(workstation, "m_item");

            return(workableItem.HasFinished());
        }