Player Controller Script (RPG)

Player Animation Script (RPG)

Works in conjunction with the Player Controller Script (above). This changes animation of player character to include: walking L,R,U,D and standing (idle) L,R,U,D. All animations are properties that can be easily updated and changed.

Player Controller With Mouse Rotation (Asteroids)

Asteroids Scripts (four scripts below)

The following four scripts are used with the asteroids game but can be modified to work with most top down shooters. Read the comments to see how you can implement them in your game. If you wish to use the lives component, you need to make copies of the player controller and asteroid controller scripts and name them to spawn after each lost life.

Ball Destroyer

Health

This script applies health to the object that it is a component of. You need to add different health scripts to different game objects.This script must be used with Damage On Collide: The apply Damage event is initialized in that script.

Create on Death

This script will create an instance of an object when an object dies. You can apply this to an enemy and trigger an explosion or dead sprite on the screen. If you want to switch to a death screen in the event of a player dying, you will need to script a level change (check levels in tutorials)