Report as inappropriate.
A collection of useful classes allowing your actors to do common things.
Easy to copy a class into your project and use as is.
Current version includes the following classes:
MoveWithArrows - Make an actor move with arrow keys.
MoveWithMouse - Make an actor move with the mouse. A bit buggy.
RemoveObjectOnCollision - Remove an object when you touch it. Put it on a bad guy and they will take you out!
Projectile - Shoot a projectile that destroys other actors. Can be a generic laser or an image.
StaticText - Print a static piece of text, like "Game Over."
ScoreBoard - Keep a scoreboard that can be increased, decreased, reset, etc.
FollowActor - Make an actor follow another actor. Good for bad guys!
MoveObstructedByObstacle - Move an actor with arrows or mouse, but blocked by objects of a certain class, like a wall. Good for maze games!
MoveRandomly - Make an actor move in a random way. Also good for bad guys. Can be obstructed by obstacles.
HealthBar - A bar to keep track of your health or other objects. Instructions to make it decrease on collisions with other actors.
DriftMove - A versatile class allowing you to drift (as in the old Asteroids game). Also includes methods allowing you to bounce or wrap at end of screen, bounce of other objects, accelerate and move smoothly, and fall.
Simply copy the class you want to use from this project into the project you want to use it in. Detailed instructions as to how to use it are included in the documentation.
Most classes are extensively documented so you can change them.
This is published under Creative Commons license. You can change any of these classes and share them with anyone, but please credit me. You cannot sell them to anyone for money.
Want to leave a comment? You must first log in.
No votes yet.