Scripts for Top Down Arcade in Unity C#
Moving Block
Script to move a block horizontally back and forth. Has public variables for left boundary, right boundary and speed.
mover_script.txt | |
File Size: | 1 kb |
File Type: | txt |
Flipper (for pinball paddle or other rotating feature)
Script to rotate an object. Must be placed on the object to be rotated, has public variables for start and finish angle, and moving time to adjust speed of the rotation.
flipper.txt | |
File Size: | 1 kb |
File Type: | txt |
Enemy Movement script with shoot at player
Includes boundary for chase distance, and values to add multiple bullets for a spray gun effect.
enemy_movement_and_shoot_at_player.txt | |
File Size: | 4 kb |
File Type: | txt |
Level Change from death screen
Script has a delay on death screen, then loads player back to the level they have died in.
level_change_from_death_screen.txt | |
File Size: | 0 kb |
File Type: | txt |
Level Switcher
Level Switch file from tutorials
level_change.txt | |
File Size: | 1 kb |
File Type: | txt |
Player key shoot
Player key shooting from the tutorials
player_key_shooting.txt | |
File Size: | 2 kb |
File Type: | txt |
Player Movement
Player movement script from the tutorials
player_movement.txt | |
File Size: | 1 kb |
File Type: | txt |
Player Health
Player health script from the tutorials
player_health.txt | |
File Size: | 1 kb |
File Type: | txt |
Player Health with Data Manager
Player health that updates health between levels to the data manager, also includes text and slider for the canvas.
player_health_with_data_manager.txt | |
File Size: | 1 kb |
File Type: | txt |
Camera Follow
Camera follow script from the tutorials
camera_follow.txt | |
File Size: | 1 kb |
File Type: | txt |
Mouse Shooting
Mouse shooting script uses mouse button to fire at the pointer location on the screen.
mouse_shooting.txt | |
File Size: | 2 kb |
File Type: | txt |
Timed Spawner
Spawns objects (usually enemies) from object location. Includes variables for number of enemies to spawn at each spawn time, interval between spawns, delay start, total number of enemies to spawn.
spawner.txt | |
File Size: | 0 kb |
File Type: | txt |
Enemy Spawner
Spawns enemies from the location of the object in the scene. Has a distance variable to activate when a player is in range.
enemy_spawner.txt | |
File Size: | 1 kb |
File Type: | txt |
Data Manager
Data Manager from tutorials with other values added
data_manager.txt | |
File Size: | 0 kb |
File Type: | txt |
Treadmill Script
Apply this to objects that will be affected by a treadmill. Make sure that you create tags for your treadmill object of "treadmillUp, treadmillDown, treadmillLeft and treadmillRight. Treadmill object has to have a box collider 2d that is trigger.
treadmill.txt | |
File Size: | 1 kb |
File Type: | txt |