The code for Enemy.cs:
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class Enemy : MonoBehaviour {
public float jumpForce = 6f;
public float runningSpeed = 1.5f;
public Animator animator;
private Rigidbody2D rigidBody;
public static bool turnAround;
void Awake() {
rigidBody = GetComponent<Rigidbody2D>();
}
void Start(){
turnAround = false;
}
public void StartGame() {
animator.SetBool("isAlive", true);
}
void FixedUpdate() {
if (turnAround == true)
{
transform.eulerAngles = new Vector3(0,180,0);
}
if (turnAround == false)
{
transform.eulerAngles = new Vector3(0,0,0);
}
if (GameManager.instance.currentGameState == GameState.inGame...