// Start is called before the first frame update void Start() { PlayerPrefs.SetFloat("Health", 100); gameManager = GameObject.Find("DriveGameManager").GetComponent <DriveGameManager>(); gameController = GameObject.Find("GameManager").GetComponent <GameController>(); gameManager.setSpeed(0f); maxSpeed = 40.0f; isTouchingObstacle = false; }
// Start is called before the first frame update void Start() { canDamagePlayer = true; currentDamageToPlayer = 0f; driveGameManager = GameObject.Find("DriveGameManager").GetComponent <DriveGameManager>(); agent = GetComponent <NavMeshAgent>(); player = GameObject.Find("DriverPlayer"); target = player.transform; isActive = false; agent.speed = 4f; }
// Start is called before the first frame update void Start() { gameManager = GameObject.Find("DriveGameManager").GetComponent <DriveGameManager>(); }