private void FixedUpdate() { GetDirectionEvent direction = new GetDirectionEvent(); Event <GetDirectionEvent> .Broadcast(direction, gameObject); m_direction = direction.direction; GetJumpEvent jump = new GetJumpEvent(); Event <GetJumpEvent> .Broadcast(jump, gameObject); m_jumping = jump.jump; UpdateGrounded(); UpdateOnWall(); UpdateOnWallFall(); UpdateSpeed(); UpdateFallSpeed(); UpdateJump(); UpdateDash(); m_oldVelocity = m_rigidbody.velocity; m_oldPosition = transform.position; Event <MoveCameraEvent> .Broadcast(new MoveCameraEvent(transform.position, m_cameraPriority)); }
void GetDirection(GetDirectionEvent e) { e.direction = m_direction; }