예제 #1
0
    private void OnDrawGizmosSelected()
    {
        Gizmos.color = Color.Lerp(Create.debugColor, Color.black, 0.3f);

        Vector2 start    = (Vector2)transform.position + Create.debugOffset * 4;
        Vector2 velocity = Controller2D.GetJumpSpeed(jumpHeight) * Vector2.up + Create.debugOffset * 2f;
        Vector2 end      = GizmosExtension.DrawParabel(start, velocity, Physics2D.gravity.y);

        //Block start
        Gizmos.DrawWireCube(start, Vector3.one);
        //Block end
        Gizmos.DrawWireCube(end, Vector3.one);
    }
예제 #2
0
    private void OnDrawGizmos()
    {
        Gizmos.color = Color.Lerp(Manipulate.debugColor, Color.black, 0.3f);

        Vector2 start    = (Vector2)transform.position + Manipulate.debugOffset * 2f;
        Vector2 velocity = Controller2D.GetJumpSpeed(jumpHeight) * Vector2.up + Manipulate.debugOffset * 2f;
        Vector2 end      = GizmosExtension.DrawParabel(start, velocity, Physics2D.gravity.y);

        //Block
        Vector2 startBlock = start - velocity.normalized * 2;

        Gizmos.DrawLine(startBlock, startBlock - velocity);
        Gizmos.DrawWireCube(startBlock, Vector3.one);
        //Player
        Gizmos.color = PlayerController.debugColor;
        //Player start
        Gizmos.DrawWireCube(start, Vector3.one);
        //Player end
        Gizmos.DrawWireCube(end, Vector3.one);
    }
예제 #3
0
    // Start is called before the first frame update
    void Start()
    {
        player.controls.Player.Rock.performed += ctx => TryPerform();

        createSpeed = Controller2D.GetJumpSpeed(jumpHeight);
    }
예제 #4
0
    // Start is called before the first frame update

    void Start()
    {
        speed = Controller2D.GetJumpSpeed(jumpHeight);

        player.controls.Player.Boulder.performed += ctx => TryPerform();
    }
예제 #5
0
    private void Start()
    {
        jumpSpeed = Controller2D.GetJumpSpeed(jumpHeight);

        player.controls.Player.Jump.performed += ctx => TryPerform();
    }