Exemple #1
0
        public void OnRefreshBehavior()
        {
            if (!mInitialized || mDestroyed)
            {
                return;
            }

            if (creature.State.Domestication != DomesticatedState.Wild)
            {
                Finish();
                return;
            }

            if (WorldClock.IsTimeOfDay(creature.State.AggressiveTOD))
            {
                Timid timid = null;
                if (worlditem.Is <Timid>(out timid))
                {
                    timid.Finish();
                }
                worlditem.GetOrAdd <Aggressive>();
                creature.Body.EyeMode = BodyEyeMode.Aggressive;
            }
            else
            {
                //if we're not aggressive, we're timid because we're wild
                Aggressive aggressive = null;
                if (worlditem.Is <Aggressive>(out aggressive))
                {
                    aggressive.Finish();
                }
                worlditem.GetOrAdd <Timid>();
                creature.Body.EyeMode = BodyEyeMode.Timid;
            }
        }
Exemple #2
0
        public void OnRefreshBehavior( )
        {
            if (!mInitialized || mDestroyed)
            {
                return;
            }

            if (creature.State.Domestication != DomesticatedState.Domesticated)
            {
                Finish();
                return;
            }

            Aggressive aggressive = null;

            if (worlditem.Is <Aggressive> (out aggressive))
            {
                aggressive.Finish();
            }
            Timid timid = worlditem.GetOrAdd <Timid> ();

            creature.Body.EyeMode = BodyEyeMode.Timid;
        }