Class Building

    • Constructor Detail

      • Building

        public Building​(College college)
        Flags are indestructible and mark college locations. Amended for Assessment 2: Added College parameter to keep track of parent
        Parameters:
        college - added to signify ownership of building
    • Method Detail

      • create

        public void create​(com.badlogic.gdx.math.Vector2 pos,
                           java.lang.String name)
        Creates a building with the given name at the specified location.
        Parameters:
        pos - 2D position vector
        name - name of building
      • destroy

        public void destroy​(Faction conqueror)
        Replace the building with ruins and mark as broken. Changed for Assessment 2 - Made public for testing purposes - Sets destroyer as parent college's most recent attacker.
      • isAlive

        public boolean isAlive()
        Returns:
        the boolean value of the alive status of the Pirate Component
      • EnterTrigger

        public void EnterTrigger​(CollisionInfo info)
        Destroys the building and marks cannonball for removal. Amended for Assessment 2, added Faction checks and now ignores flags
        Specified by:
        EnterTrigger in interface CollisionCallBack
        Parameters:
        info - CollisionInfo container