public void LeapSetup() { leaping = true; // Stop movement; rigid.velocity = Vector2.zero; // Record initial position. initialPosition = transform.position; // Increase leap str if (Input.GetKey(GameManager.GM.Leap)) { leapStrength += Time.deltaTime * 10; if (leapStrength >= 20.5f) { leapStrength = 20.5f; } } // Draw predicted trajectory DrawTrajectory.Plot(rigid, transform.position, rigid.velocity, 30); }
private void Awake() { Instance = this; }
public void OnDraw() { DrawTrajectory?.Invoke(); }
void Start() { m_projectile = GetComponent <ProjectileComponent>(); m_projectileArc = GetComponentInChildren <DrawTrajectory>(); }