Exemplo n.º 1
0
 internal AnimationQueueEntry(string name, float startTime, AnimationPlayMode playMode, float blendWeight, bool onlyIfNotPlaying)
 {
     this.Name             = name;
     this.StartTime        = startTime;
     this.PlayMode         = playMode;
     this.BlendWeight      = blendWeight;
     this.OnlyIfNotPlaying = onlyIfNotPlaying;
 }
Exemplo n.º 2
0
    static int IntToEnum(IntPtr L)
    {
        int arg0            = (int)LuaDLL.lua_tonumber(L, 1);
        AnimationPlayMode o = (AnimationPlayMode)arg0;

        LuaScriptMgr.PushEnum(L, o);
        return(1);
    }
Exemplo n.º 3
0
        /// <summary>
        /// PlaySequence the current animation sequence.
        /// </summary>
        /// <param name="animationPlayMode"></param>
        /// <exception cref="ArgumentOutOfRangeException"></exception>
        private void Play(AnimationPlayMode animationPlayMode)
        {
            ConfigurePlayButtons();

            var currentAnimationSequence = GetCurrentAnimationSequence();

            if (currentAnimationSequence == null)
            {
                return;
            }

            if (_currentSequenceIndex != _lastPlayedSequenceIndex || _lastPlayedMechanic == null)
            {
                BaseAnimationMechanic animationMechanic;

                switch (currentAnimationSequence.GetAnimationMechanic())
                {
                case AnimationMechanic.Spawn: animationMechanic = new SpawnMechanic(this); break;

                case AnimationMechanic.Rotate: animationMechanic = new RotateMechanic(this); break;

                case AnimationMechanic.Walk: animationMechanic = new WalkMechanic(this); break;

                case AnimationMechanic.Talk: animationMechanic = new TalkMechanic(this); break;

                case AnimationMechanic.Sit: animationMechanic = new SitMechanic(this); break;

                case AnimationMechanic.Lay: animationMechanic = new LayMechanic(this); break;

                default: throw new ArgumentOutOfRangeException();
                }

                _lastPlayedMechanic = animationMechanic;
                _lastPlayedMechanic.GetParameterValues();
                _lastPlayedSequenceIndex = _currentSequenceIndex;
            }

            switch (animationPlayMode)
            {
            case AnimationPlayMode.Normal:
                _currentCoroutine = StartCoroutine(_lastPlayedMechanic.PlaySequence());
                break;

            case AnimationPlayMode.Restart:
                _currentCoroutine = StartCoroutine(_lastPlayedMechanic.RestartSequence());
                break;

            case AnimationPlayMode.FastForward:
                _lastPlayedMechanic.FastForwardSequence();
                break;

            default: throw new ArgumentOutOfRangeException(nameof(animationPlayMode), animationPlayMode, null);
            }
        }
Exemplo n.º 4
0
		public bool Play(string animation, AnimationPlayMode mode){}
Exemplo n.º 5
0
		public bool Play(AnimationPlayMode mode){}
Exemplo n.º 6
0
 public void Enqueue(string name, float delay, AnimationPlayMode playMode, float blendWeight, bool onlyIfNotPlaying)
 {
     entries.Add(new AnimationQueueEntry(name, Time.time + delay, playMode, blendWeight, onlyIfNotPlaying));
 }
Exemplo n.º 7
0
 public void Enqueue(string name, float delay, AnimationPlayMode playMode, float blendWeight)
 {
     Enqueue(name, delay, playMode, blendWeight, true);
 }
Exemplo n.º 8
0
 public void Enqueue(string name, float delay, AnimationPlayMode playMode)
 {
     Enqueue(name, delay, playMode, 1.0f);
 }
Exemplo n.º 9
0
 public bool Play(string animation, AnimationPlayMode mode) =>
 this.Play(animation, (PlayMode)mode);
Exemplo n.º 10
0
		public bool Play(string animation, AnimationPlayMode mode)
		{
			return this.Play(animation, (PlayMode)mode);
		}
Exemplo n.º 11
0
		public bool Play(AnimationPlayMode mode)
		{
			return this.PlayDefaultAnimation((PlayMode)mode);
		}
Exemplo n.º 12
0
 internal AnimationQueueEntry(string name,float startTime,AnimationPlayMode playMode,float blendWeight,bool onlyIfNotPlaying)
 {
     this.Name               = name;
     this.StartTime          = startTime;
     this.PlayMode           = playMode;
     this.BlendWeight        = blendWeight;
     this.OnlyIfNotPlaying   = onlyIfNotPlaying;
 }
Exemplo n.º 13
0
 public void Enqueue(string name,float delay,AnimationPlayMode playMode,float blendWeight,bool onlyIfNotPlaying)
 {
     entries.Add(new AnimationQueueEntry(name,Time.time + delay,playMode,blendWeight,onlyIfNotPlaying));
 }
Exemplo n.º 14
0
 public void Enqueue(string name,float delay,AnimationPlayMode playMode,float blendWeight)
 {
     Enqueue(name, delay, playMode, blendWeight, true);
 }
Exemplo n.º 15
0
 public void Enqueue(string name,float delay,AnimationPlayMode playMode)
 {
     Enqueue(name, delay, playMode, 1.0f);
 }
Exemplo n.º 16
0
 public bool Play(AnimationPlayMode mode)
 {
     return(PlayDefaultAnimation((PlayMode)mode));
 }
Exemplo n.º 17
0
 public bool Play(string animation, AnimationPlayMode mode)
 {
     return(Play(animation, (PlayMode)mode));
 }
Exemplo n.º 18
0
 public bool Play(AnimationPlayMode mode) =>
 this.PlayDefaultAnimation((PlayMode)mode);