Class FoodStack

java.lang.Object
java.util.AbstractCollection<E>
java.util.ArrayDeque<com.badlogic.ashley.core.Entity>
com.devcharles.piazzapanic.utility.FoodStack
All Implemented Interfaces:
Serializable, Cloneable, Iterable<com.badlogic.ashley.core.Entity>, Collection<com.badlogic.ashley.core.Entity>, Deque<com.badlogic.ashley.core.Entity>, Queue<com.badlogic.ashley.core.Entity>

public class FoodStack extends ArrayDeque<com.badlogic.ashley.core.Entity>
See Also:
  • Field Details

    • engine

      private com.badlogic.ashley.core.Engine engine
    • capacity

      public final int capacity
      See Also:
  • Constructor Details

    • FoodStack

      public FoodStack()
  • Method Details

    • init

      public void init(com.badlogic.ashley.core.Engine e)
    • pushItem

      public boolean pushItem(com.badlogic.ashley.core.Entity food, com.badlogic.ashley.core.Entity cook)
      Put a new food into inventory, use this instead of FoodStack.push(Entity food) as it binds the item location to the player and maintains a maximum inventory size of 12.
      Parameters:
      food -
      cook -
      Returns:
    • push

      public void push(com.badlogic.ashley.core.Entity food)
      Used internally, please use FoodStack.pushItem(Entity food) instead.
      Specified by:
      push in interface Deque<com.badlogic.ashley.core.Entity>
      Overrides:
      push in class ArrayDeque<com.badlogic.ashley.core.Entity>
    • pop

      public com.badlogic.ashley.core.Entity pop()
      Specified by:
      pop in interface Deque<com.badlogic.ashley.core.Entity>
      Overrides:
      pop in class ArrayDeque<com.badlogic.ashley.core.Entity>
    • setVisibility

      private void setVisibility(int size, com.badlogic.ashley.core.Entity e)