Class Cursor

    • Constructor Detail

      • Cursor

        public Cursor​()
    • Method Detail

      • update

        public void update​(float dt)
        Description copied from class: AbstractEntity
        Updates the logic of the object.
        Overrides:
        update in class AbstractEntity
        Parameters:
        dt - time since last update in game time
      • setInfo

        public void setInfo​(CursorInfo selDet)
        Parameters:
        selDet -
      • spawn

        public AbstractEntity spawn​(Point point)
        Description copied from class: AbstractEntity
        Add this entity to the map-> let it spawn
        Overrides:
        spawn in class AbstractEntity
        Parameters:
        point - the point in the game world where the object is. If it was previously set this is ignored.
        Returns:
        returns itself
      • setPosition

        public void setPosition​(Position pos)
        Description copied from class: AbstractGameObject
        Set the coordinates without safety check. May use different object pointing to the same position.
        Overrides:
        setPosition in class AbstractEntity
        Parameters:
        pos - the coordinates you want to set
      • setNormal

        public void setNormal​(Side side)
        Parameters:
        side -
      • getNormalSide

        public Side getNormalSide​()
        Returns:
      • getCoordInNormalDirection

        public Coordinate getCoordInNormalDirection​()
        if at ground does not move up
        Returns:
        the neighbour coordinate where the normal points to. cpy safe
      • getNormal

        public SimpleEntity getNormal​()
        The normal object. Position
        Returns:
      • update

        public void update​(GameView view,
                           int screenX,
                           int screenY)
        Updates the selection using the screen position of the cursor.
        Parameters:
        view -
        screenX - cursor position from left
        screenY - cursor position from top
      • handleMessage

        public boolean handleMessage​(com.badlogic.gdx.ai.msg.Telegram msg)
      • setTool

        public void setTool​(Tool tool)
        tool which is represented
        Parameters:
        tool -