Exemplo n.º 1
0
    private void RpcSetCurrentAnimation(AnimationTypes animationName)
    {
        if (this._animation == null)
        {
            this._animation = this.GetComponent <Animation>();
        }

        if (!this._animation.IsPlaying(animationName.ToString()))
        {
            this._animation.Play(animationName.ToString(), PlayMode.StopSameLayer);
        }
    }
Exemplo n.º 2
0
    // ------------------------------------------------------------------------------------------------------------
    // ----


    private void SetCurrentAnimation(AnimationTypes animationName)
    {
        // Put this check on the server so we don't send network traffic every frame, from every skeleton
        if (!this._animation.IsPlaying(animationName.ToString()))
        {
            RpcSetCurrentAnimation(animationName);
        }
    }
        public string GetAnimationResourceLoadString(AnimationTypes behaviorType)
        {
            string str = behaviorType.ToString();

            return("Animations/" + str);
        }