// Switch places with the monster (Only for switch-hook interactions). public static void SwitchHook(Monster monster, Entity sender, EventArgs args) { SwitchHookProjectile hook = sender as SwitchHookProjectile; hook.SwitchWithEntity(monster); monster.BeginState(new MonsterBusyState(20)); }
//----------------------------------------------------------------------------- // Overridden methods //----------------------------------------------------------------------------- public override void OnButtonPress() { Player.Direction = Player.UseDirection; // Shoot and hook projectile. SwitchHookProjectile hook = new SwitchHookProjectile(level); Player.ShootFromDirection(hook, Player.Direction, hook.Speed); // Begin the player state. Player.SwitchHookState.Hook = hook; Player.BeginState(Player.SwitchHookState); }