void SetMoodIndicator(MoodIndicator mood) { switch (mood) { case MoodIndicator.Bad: if (myMoodIcon != null) { myMoodIcon.color = MoodColor[(int)MoodIndicator.Bad]; } break; case MoodIndicator.Middle: if (myMoodIcon != null) { myMoodIcon.color = MoodColor[(int)MoodIndicator.Middle]; } break; default: // is good if (myMoodIcon != null) { myMoodIcon.color = MoodColor[(int)MoodIndicator.Good]; } break; } }
void LookedAt() { if (_currentIndicator) { return; } _currentIndicator = ((GameObject)Instantiate(moodIndicatorPrefab, _transform.position + _transform.up * 3.5f, Quaternion.identity)).GetComponent <MoodIndicator>(); _currentIndicator.enemy = this; }
void LookedAt() { if(_currentIndicator) return; _currentIndicator = Instantiate(moodIndicatorPrefab, _transform.position + Vector3.up * 3.5f, Quaternion.identity) as MoodIndicator; _currentIndicator.enemy = this; }
IEnumerator StudentMoodWithDelay(StudentAction stu, MoodIndicator mood, float delay) { yield return(new WaitForSeconds(delay)); stu.SetMyMood(mood); }