Package com.mygdx.game.Entitys
Class PowerUpPickup
- java.lang.Object
-
- com.mygdx.game.Entitys.Entity
-
- com.mygdx.game.Entitys.PowerUpPickup
-
- All Implemented Interfaces:
CollisionCallBack
public class PowerUpPickup extends Entity implements CollisionCallBack
Added for Assessment 2 Simple entity shown on locate quests origin
-
-
Constructor Summary
Constructors Constructor Description PowerUpPickup(PowerUp powerUp, java.lang.String texName, com.badlogic.gdx.math.Vector2 pos, int cooldown)Generate an obstacle.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidBeginContact(CollisionInfo info)`unused`voidEndContact(CollisionInfo info)`unused`voidEnterTrigger(CollisionInfo info)applies the attached power up to the colliding entity then sets the power up to be hidden next updatevoidExitTrigger(CollisionInfo info)`unused`voidupdate()Called once per frame-
Methods inherited from class com.mygdx.game.Entitys.Entity
addComponent, addComponents, cleanUp, dispose, getComponent, getComponent, getName, raiseEvents, setName
-
-
-
-
Constructor Detail
-
PowerUpPickup
public PowerUpPickup(PowerUp powerUp, java.lang.String texName, com.badlogic.gdx.math.Vector2 pos, int cooldown)
Generate an obstacle.- Parameters:
powerUp- The Power Up being picked uptexName- The texture to show for the obstacle.pos- The position of the power upcooldown- The cooldown before the power up can be used again
-
-
Method Detail
-
EnterTrigger
public void EnterTrigger(CollisionInfo info)
applies the attached power up to the colliding entity then sets the power up to be hidden next update- Specified by:
EnterTriggerin interfaceCollisionCallBack- Parameters:
info- the collision info used in the conjunction
-
BeginContact
public void BeginContact(CollisionInfo info)
`unused`- Specified by:
BeginContactin interfaceCollisionCallBack
-
EndContact
public void EndContact(CollisionInfo info)
`unused`- Specified by:
EndContactin interfaceCollisionCallBack
-
ExitTrigger
public void ExitTrigger(CollisionInfo info)
`unused`- Specified by:
ExitTriggerin interfaceCollisionCallBack
-
-