protected void AnimateAttack() { if (sceneAnimator && attackAnimName != null) { sceneAnimator.StartAnimation(attackAnimName, gameObject); } }
// Manage animations #region Animations protected void AnimateAttack() { if (sceneAnimator && attackAnimName != null) { StartCoroutine(sceneAnimator.StartAnimation(attackAnimName, this.gameObject)); } }
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); }
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); }