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; }
static int IntToEnum(IntPtr L) { int arg0 = (int)LuaDLL.lua_tonumber(L, 1); AnimationPlayMode o = (AnimationPlayMode)arg0; LuaScriptMgr.PushEnum(L, o); return(1); }
/// <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); } }
public bool Play(string animation, AnimationPlayMode mode){}
public bool Play(AnimationPlayMode mode){}
public void Enqueue(string name, float delay, AnimationPlayMode playMode, float blendWeight, bool onlyIfNotPlaying) { entries.Add(new AnimationQueueEntry(name, Time.time + delay, playMode, blendWeight, onlyIfNotPlaying)); }
public void Enqueue(string name, float delay, AnimationPlayMode playMode, float blendWeight) { Enqueue(name, delay, playMode, blendWeight, true); }
public void Enqueue(string name, float delay, AnimationPlayMode playMode) { Enqueue(name, delay, playMode, 1.0f); }
public bool Play(string animation, AnimationPlayMode mode) => this.Play(animation, (PlayMode)mode);
public bool Play(string animation, AnimationPlayMode mode) { return this.Play(animation, (PlayMode)mode); }
public bool Play(AnimationPlayMode mode) { return this.PlayDefaultAnimation((PlayMode)mode); }
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; }
public void Enqueue(string name,float delay,AnimationPlayMode playMode,float blendWeight,bool onlyIfNotPlaying) { entries.Add(new AnimationQueueEntry(name,Time.time + delay,playMode,blendWeight,onlyIfNotPlaying)); }
public void Enqueue(string name,float delay,AnimationPlayMode playMode,float blendWeight) { Enqueue(name, delay, playMode, blendWeight, true); }
public void Enqueue(string name,float delay,AnimationPlayMode playMode) { Enqueue(name, delay, playMode, 1.0f); }
public bool Play(AnimationPlayMode mode) { return(PlayDefaultAnimation((PlayMode)mode)); }
public bool Play(string animation, AnimationPlayMode mode) { return(Play(animation, (PlayMode)mode)); }
public bool Play(AnimationPlayMode mode) => this.PlayDefaultAnimation((PlayMode)mode);