File tree Expand file tree Collapse file tree
pufferlib/ocean/boss_fight Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -163,13 +163,29 @@ void c_step(BossFight *env) {
163163 env -> terminals [0 ] = 0 ;
164164
165165 int action = env -> actions [0 ];
166+ if (IsKeyDown (KEY_LEFT_SHIFT )) {
167+ if (IsKeyDown (KEY_W ))
168+ action = 1 ;
169+ else if (IsKeyDown (KEY_S ))
170+ action = 2 ;
171+ else if (IsKeyDown (KEY_A ))
172+ action = 3 ;
173+ else if (IsKeyDown (KEY_D ))
174+ action = 4 ;
175+ else if (IsKeyDown (KEY_SPACE ))
176+ action = 5 ;
177+ else if (IsKeyDown (KEY_J ))
178+ action = 6 ;
179+ else
180+ action = 0 ;
181+ }
166182 float dx = 0 ;
167183 float dy = 0 ;
168184
169185 if (action == 1 ) {
170- dy = PLAYER_SPEED_PER_TICK ;
171- } else if (action == 2 ) {
172186 dy = - PLAYER_SPEED_PER_TICK ;
187+ } else if (action == 2 ) {
188+ dy = PLAYER_SPEED_PER_TICK ;
173189 } else if (action == 3 ) {
174190 dx = - PLAYER_SPEED_PER_TICK ;
175191 } else if (action == 4 ) {
You can’t perform that action at this time.
0 commit comments