Example #1
0
    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;
        }
    }
Example #2
0
 void LookedAt()
 {
     if (_currentIndicator)
     {
         return;
     }
     _currentIndicator       = ((GameObject)Instantiate(moodIndicatorPrefab, _transform.position + _transform.up * 3.5f, Quaternion.identity)).GetComponent <MoodIndicator>();
     _currentIndicator.enemy = this;
 }
Example #3
0
    void LookedAt()
    {
        if(_currentIndicator)
            return;

        _currentIndicator = Instantiate(moodIndicatorPrefab, _transform.position + Vector3.up * 3.5f,
            Quaternion.identity) as MoodIndicator;

        _currentIndicator.enemy = this;
    }
Example #4
0
    IEnumerator StudentMoodWithDelay(StudentAction stu, MoodIndicator mood, float delay)
    {
        yield return(new WaitForSeconds(delay));

        stu.SetMyMood(mood);
    }