Просмотр исходного кода

Fixed a bug in the 2d camera platformer example (#2687)

canJump used to alternate between true and false when on ground
pull/2751/head
skylar 3 лет назад
committed by GitHub
Родитель
Сommit
ee5a87826d
Не найден GPG ключ соответствующий данной подписи Идентификатор GPG ключа: 4AEE18F83AFDEB23
1 измененных файлов: 1 добавлений и 1 удалений
  1. +1
    -1
      examples/core/core_2d_camera_platformer.c

+ 1
- 1
examples/core/core_2d_camera_platformer.c Просмотреть файл

@ -177,7 +177,7 @@ void UpdatePlayer(Player *player, EnvItem *envItems, int envItemsLength, float d
ei->rect.x <= p->x &&
ei->rect.x + ei->rect.width >= p->x &&
ei->rect.y >= p->y &&
ei->rect.y < p->y + player->speed*delta)
ei->rect.y <= p->y + player->speed*delta)
{
hitObstacle = 1;
player->speed = 0.0f;

Загрузка…
Отмена
Сохранить