Skip to content

Instantly share code, notes, and snippets.

@curious-username
Created December 7, 2021 02:13
Show Gist options
  • Save curious-username/8b59f4536a1157e32242893a192b9dcb to your computer and use it in GitHub Desktop.
Save curious-username/8b59f4536a1157e32242893a192b9dcb to your computer and use it in GitHub Desktop.
missile enemy plan
Missile Enemy
-------------
What do I need?
Missile Enemy Sprite
2D rigidbody
2D box collider
MissleEnemy script
Red Missile
2D rigidbody
2D box collider
EnemyMissle script
What will happen?
Missile Enemy will spawn
Move Down.
Zig-Zag movement
Destroy itself after a certain point.
if enemy is hit
destroy enemy
explosion
The Red Missile will spawn
figure out the distance between the player and the missile itself.
rotate and move towards the player
if missile collides
explode
distroy itself and collided
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment