Time for action – tweak the hero
There are a few changes we should make to the HeroShip Script (formerly the Character Script) to suit our new game. Let's do it:
Open the HeroShip Script.
Delete the
else if
condition handling the steins. Get rid of everything in this snippet in bold:if(col.gameObject.tag == "bomb") { audio.PlayOneShot(explosionSound); Instantiate(explosion, col.gameObject.transform.position, Quaternion.identity); } else if (col.gameObject.tag == "stein") { animation.Play("catch"); // Ima catch that stein! }
Shoot the Moon doesn't have beer steins, so we can safely kill this chunk.
Delete all of the code controlling the character model animation. Get rid of this whole section in bold:
if(lastX != transform.position.x) { // x values between this Update cycle and the last one // aren't the same! That means the player is moving the // mouse. if(!isMoving) { // the player was standing still. // Let's flag him to "isMoving" isMoving...