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); }
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); }
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(); } }
public void InitiateImpulsion() { impulsion = new DelayedImpulsion(Vector3.zero, 0, 0, 0); }
public void CustomImpulsion(Vector3 v, float f, float d, float de) { impulsion = new DelayedImpulsion(v, f, d, de); }
public void Dash(Vector3 v) { v = CamToPlayer(v); impulsion = new DelayedImpulsion(v, DashForce, DashTime, 0.0f); }
void InitiateImpulsion() { impulsion = new DelayedImpulsion(Vector3.zero, 0f, 0f, 0f); max_impulsion_enumerator = impulsionHolder.Count; }
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; }
void InitiateImpulsion() { impulsion = new DelayedImpulsion(Vector3.zero, 0f, 0f, 0f); }