From d427651de3273ac23591091882b738320010608d Mon Sep 17 00:00:00 2001 From: jake Date: Wed, 30 Jun 2021 19:15:27 -0700 Subject: [PATCH] moved down facing this from MYB to MYD, whoops. Also implemented { game_scene.player1.vel_y = 0x200; game_scene.player2.vel_y = 0x200; - game_scene.player1.cond.set_interacted(true); - game_scene.player2.cond.set_interacted(true); } Direction::FacingPlayer => { - // todo npc direction dependent bump + for npc in game_scene.npc_list.iter_alive() { + if npc.event_num == event_num { + if game_scene.player1.x >= npc.x { + game_scene.player1.direction = Left; + game_scene.player1.vel_x = 0x200; + }else{ + game_scene.player1.direction = Right; + game_scene.player1.vel_x = -0x200; + } + + if game_scene.player2.x >= npc.x { + game_scene.player2.direction = Left; + game_scene.player2.vel_x = 0x200; + }else{ + game_scene.player2.direction = Right; + game_scene.player2.vel_x = -0x200; + } + break; + } + } } } }