public float drawDis = 1f; //Size of path objects, used for debugging private void Awake() { if (erm != null) { Debug.LogError("more than one enemyrelaymanager in scene"); } else { erm = this; } playerPos = GameObject.FindGameObjectWithTag("Player").transform.position; //Assign player position if (GameManager.gm.difficulty == GameManager.Difficulty.easy) { AssignDifficultySetting(easy_Setting); } else if (GameManager.gm.difficulty == GameManager.Difficulty.normal) { AssignDifficultySetting(normal_Setting); } else if (GameManager.gm.difficulty == GameManager.Difficulty.hard) { AssignDifficultySetting(hard_Setting); } arrivalTimes = new List <float>(); }
void Start() { //assign main erm reference if (erm != null) { Debug.LogError("more than one erm in scene"); } else { erm = EnemyRelayManager.erm; } FloatingTextController.Init(); SlidingTextController.Init(); player = GameObject.FindGameObjectWithTag("Player").GetComponent <Player>(); targets = new List <GameObject>(); clickTimes = new List <float>(); //init playerSave playerSave.init(); //load playerSaveData try { playerData.Load_Json(); } catch (System.Exception e) { //Something went wrong loading, player prefs did not match current save Debug.Log(e.ToString()); //Clear player prefs PlayerPrefs.DeleteAll(); //Load playerData.Load_Json(); } }