void setCurrentAttitude() { if (s_CurrentRelationship == PlayerRelationship.ENEMY && s_CanSeeEnemy) { s_CurrentAttitude = PlayerAttitude.HOSTILE; } else { s_CurrentAttitude = PlayerAttitude.IDLE; } }
/* UNITY FUNCTIONS */ #region void Awake() { s_CurrentAttitude = DefaultAttitude; s_CurrentRelationship = DefaultRelationship; st_Stats = GetComponent <StatTracker>(); ro_Me = GetComponent <Rigidbody>(); ro_Player = GameObject.FindGameObjectWithTag("Player"); ro_MySpecialEyes = transform.FindChild("Eyes").gameObject; if (ro_MySpecialEyes == null) { var thing = new GameObject(); thing.transform.position = transform.position; thing.transform.parent = transform; } if (st_Stats == null) { st_Stats = new StatTracker(); st_Stats.reinit(100, 5, 2); } }