예제 #1
0
 protected void AnimateAttack()
 {
     if (sceneAnimator && attackAnimName != null)
     {
         sceneAnimator.StartAnimation(attackAnimName, gameObject);
     }
 }
예제 #2
0
    // Manage animations
    #region Animations

    protected void AnimateAttack()
    {
        if (sceneAnimator && attackAnimName != null)
        {
            StartCoroutine(sceneAnimator.StartAnimation(attackAnimName, this.gameObject));
        }
    }
예제 #3
0
    public virtual void MoveMe(Vector2 force, bool movedFromLocal)
    {
        if (rgbd)
        {
            rgbd.AddForce(force);

            if (movedFromLocal)
            {
                SendMovableDataToServer(force);
            }

            if (!animControl)
            {
                Debug.Log("AnimatorControl not found in " + name);
                return;
            }

            StartCoroutine(animControl.StartAnimation("Moving", this.gameObject));
        }
    }
    protected void StartAnimation(string animationName, ActivableSystem activableSystem)
    {
        SceneAnimator sceneAnimator = GameObject.FindObjectOfType <SceneAnimator>();

        sceneAnimator.StartAnimation(animationName, activableSystem.gameObject);
    }
예제 #5
0
 protected void Attack(GameObject player)
 {
     StartCoroutine(animControl.StartAnimation("Attacking", this.gameObject));
     DealDamage(player);
 }
 protected void Attack(GameObject player)
 {
     sceneAnimator.StartAnimation("Attacking", this.gameObject);
     DealDamage(player);
 }