// Use this for initialization void Start() { camera = CameraControl.GetInstance().GetComponent <Camera>(); player = IcarusPlayerController.GetInstance(); if (gameObject.name == "Begin") { isImBegin = true; } }
protected override void InitStart() { base.InitStart(); #region WayPoints path = GetComponent <Path>(); if (path != null) { bool isError = false; listWayPoints = path.WayPoints; if (listWayPoints == null) { isError = true; Debug.Log("[EnemyState][" + gameObject.name + "]: listWayPoins nula."); } else { if (listWayPoints.Count == 0) { Debug.Log("[EnemyState][" + gameObject.name + "]: listWayPoins vazia."); isError = true; } else { for (int i = 0; i < listWayPoints.Count; i++) { if (listWayPoints[i] == null) { listWayPoints.Clear(); listWayPoints.Add(transform); Debug.Log("[EnemyState][" + gameObject.name + "]: A posição (" + i + ") da listWayPoins está nula."); isError = true; break; } } } } if (isError) { listWayPoints = new List <Transform>(); listWayPoints.Add(transform); } } monitoringPoint = listWayPoints[actualWp]; #endregion moveControl.BodyMiniMap.gameObject.SetActive(false); playerTarget = IcarusPlayerController.GetInstance(); playerStatus = playerTarget.gameObject.GetComponent <CharacterStatus>(); enemyStatus.BoxCollider.enabled = true; IniState(); }