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 void
BeginContact(CollisionInfo info)
`unused`void
EndContact(CollisionInfo info)
`unused`void
EnterTrigger(CollisionInfo info)
applies the attached power up to the colliding entity then sets the power up to be hidden next updatevoid
ExitTrigger(CollisionInfo info)
`unused`void
update()
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:
EnterTrigger
in interfaceCollisionCallBack
- Parameters:
info
- the collision info used in the conjunction
-
BeginContact
public void BeginContact(CollisionInfo info)
`unused`- Specified by:
BeginContact
in interfaceCollisionCallBack
-
EndContact
public void EndContact(CollisionInfo info)
`unused`- Specified by:
EndContact
in interfaceCollisionCallBack
-
ExitTrigger
public void ExitTrigger(CollisionInfo info)
`unused`- Specified by:
ExitTrigger
in interfaceCollisionCallBack
-
-