示例#1
0
    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;
 }
示例#3
0
 public void OnDraw()
 {
     DrawTrajectory?.Invoke();
 }
示例#4
0
 void Start()
 {
     m_projectile    = GetComponent <ProjectileComponent>();
     m_projectileArc = GetComponentInChildren <DrawTrajectory>();
 }