Phase 2 — Rammer Enemy

Nicholas Lim
Jun 17, 2021

--

There are some new enemy types to introduce, and one of them is a more aggressive enemy that rams the player when they’re in range.

After some edits to the Enemy script to organize the new enemies with a switch instead, I add the following code for this particular enemy.

If the distance between the enemy and player is less than 3f units, then this enemy will move towards the player’s position.

Sign up to discover human stories that deepen your understanding of the world.

Free

Distraction-free reading. No ads.

Organize your knowledge with lists and highlights.

Tell your story. Find your audience.

Membership

Read member-only stories

Support writers you read most

Earn money for your writing

Listen to audio narrations

Read offline with the Medium app

--

--

No responses yet

Write a response