Exemple #1
0
 public virtual void StateFixedUpdate()
 {
     if (player.GetPlasmaPull() != null)
     {
         Vector2 dist = player.GetPlasmaPull().transform.position - player.transform.position;
         rb.velocity += (dist / dist.sqrMagnitude) * (player.GetPlasmaPull().transform.localScale.x * 0.5f);
     }
     ac.SetFloat("speed", Mathf.Abs(rb.velocity.x));
 }