git: ignore bin/, feature: go to menu with escape
This commit is contained in:
@@ -0,0 +1 @@
|
||||
bin/
|
||||
@@ -1,20 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>CFBundleDevelopmentRegion</key>
|
||||
<string>English</string>
|
||||
<key>CFBundleIdentifier</key>
|
||||
<string>com.apple.xcode.dsym.game</string>
|
||||
<key>CFBundleInfoDictionaryVersion</key>
|
||||
<string>6.0</string>
|
||||
<key>CFBundlePackageType</key>
|
||||
<string>dSYM</string>
|
||||
<key>CFBundleSignature</key>
|
||||
<string>????</string>
|
||||
<key>CFBundleShortVersionString</key>
|
||||
<string>1.0</string>
|
||||
<key>CFBundleVersion</key>
|
||||
<string>1</string>
|
||||
</dict>
|
||||
</plist>
|
||||
Binary file not shown.
@@ -1,5 +0,0 @@
|
||||
---
|
||||
triple: 'arm64-apple-darwin'
|
||||
binary-path: 'bin/game'
|
||||
relocations: []
|
||||
...
|
||||
+6
-1
@@ -66,7 +66,7 @@ void InitGame(GameState* g){
|
||||
g->target = LoadRenderTexture(GetScreenWidth(), GetScreenHeight());
|
||||
}
|
||||
|
||||
void UpdateGame(GameState* g){
|
||||
void UpdateGame(GameState* g, Screen *currentScreen){
|
||||
UpdatePostFX(&g->postFX);
|
||||
UpdateMusic(&g->ambient);
|
||||
UpdateMouse(&g->mouse, &g->camera);
|
||||
@@ -74,6 +74,11 @@ void UpdateGame(GameState* g){
|
||||
UpdateFloor(&g->floor, &g->camera);
|
||||
UpdatePlayer(&g->player);
|
||||
UpdateBee(&g->bee1, &g->flowers, &g->hive);
|
||||
|
||||
if (IsKeyPressed(KEY_ESCAPE)){
|
||||
*currentScreen = MENU;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
void RenderComponents(GameState* g){
|
||||
|
||||
+2
-2
@@ -27,7 +27,7 @@ int main(void)
|
||||
InitMenu(&menu);
|
||||
InitGame(&game);
|
||||
|
||||
while (!WindowShouldClose())
|
||||
while (true)
|
||||
{
|
||||
switch (currentScreen)
|
||||
{
|
||||
@@ -43,7 +43,7 @@ int main(void)
|
||||
}break;
|
||||
case GAMEPLAY:
|
||||
{
|
||||
UpdateGame(&game);
|
||||
UpdateGame(&game, ¤tScreen);
|
||||
RenderGame(&game);
|
||||
}break;
|
||||
default: break;
|
||||
|
||||
Reference in New Issue
Block a user