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

    protected void AnimateAttack()
    {
        if (sceneAnimator && attackAnimName != null)
        {
            StartCoroutine(sceneAnimator.StartAnimation(attackAnimName, this.gameObject));
        }
    }
Esempio n. 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);
    }
Esempio n. 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);
 }