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); }
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); }
// Start is called before the first frame update void Start() { player.controls.Player.Rock.performed += ctx => TryPerform(); createSpeed = Controller2D.GetJumpSpeed(jumpHeight); }
// Start is called before the first frame update void Start() { speed = Controller2D.GetJumpSpeed(jumpHeight); player.controls.Player.Boulder.performed += ctx => TryPerform(); }
private void Start() { jumpSpeed = Controller2D.GetJumpSpeed(jumpHeight); player.controls.Player.Jump.performed += ctx => TryPerform(); }