Пример #1
0
 public void ControllerEnter2D(CorgiController2D controller)
 {
     controller.State.CanDoubleJump = false;
     controller.SetVerticalForce(Mathf.Sqrt(2f * JumpPlatformBoost * -controller.Parameters.Gravity));
 }
Пример #2
0
 public void Start()
 {
     _controller    = GetComponent <CorgiController2D>();
     _direction     = new Vector2(-1, 0);
     _startPosition = transform.position;
 }
Пример #3
0
 void Awake()
 {
     _sceneCamera = GameObject.FindGameObjectWithTag("MainCamera");
     _controller  = GetComponent <CorgiController2D>();
     Health       = MaxHealth;
 }