Esempio n. 1
0
    public DelayedImpulsion GetClone(Transform t)
    {
        Vector3          v = t.forward * impulsion.Direction.z + t.right * impulsion.Direction.x + t.up * impulsion.Direction.y;
        DelayedImpulsion i = new DelayedImpulsion(v.normalized, impulsion.Strengh, impulsion.Delay, impulsion.Duration);

        return(i);
    }
Esempio n. 2
0
 public void Jump(float delay = 0.1f)
 {
     if (is_grounded)
     {
         impulsion = new DelayedImpulsion(Vector3.up, JumpForce, 0.3f, delay);
     }
     // rb.velocity += Vector3.up*JumpForce;
     // rb.AddForce(transform.up*JumpForce);
 }
Esempio n. 3
0
    void CheckImpulsion()
    {
        if (UseImpulsionAction)
        {
            impulsion_enumerator = (impulsion_enumerator + 1) % max_impulsion_enumerator;
            bool ac = impulsionHolder[impulsion_enumerator].Analyze(real_current_state);
            if (ac)
            {
                impulsion = impulsionHolder[impulsion_enumerator].GetClone(transform);
            }
        }


        bool b = impulsion.Count();

        if (b)
        {
            ApplyImpulsion();
        }
    }
Esempio n. 4
0
 public void InitiateImpulsion()
 {
     impulsion = new DelayedImpulsion(Vector3.zero, 0, 0, 0);
 }
Esempio n. 5
0
 public void CustomImpulsion(Vector3 v, float f, float d, float de)
 {
     impulsion = new DelayedImpulsion(v, f, d, de);
 }
Esempio n. 6
0
 public void Dash(Vector3 v)
 {
     v         = CamToPlayer(v);
     impulsion = new DelayedImpulsion(v, DashForce, DashTime, 0.0f);
 }
Esempio n. 7
0
 void InitiateImpulsion()
 {
     impulsion = new DelayedImpulsion(Vector3.zero, 0f, 0f, 0f);
     max_impulsion_enumerator = impulsionHolder.Count;
 }
Esempio n. 8
0
 void CounterAndImpulsion(Vector3 v, float f, float de, float du, float c, float max_c)
 {
     impulsion = new DelayedImpulsion(v, f, de, du);
     c         = max_c;
 }
Esempio n. 9
0
 void InitiateImpulsion()
 {
     impulsion = new DelayedImpulsion(Vector3.zero, 0f, 0f, 0f);
 }