250501 커밋

This commit is contained in:
2025-05-01 07:23:28 +09:00
parent 98bb2e3c5c
commit 23176551b7
353 changed files with 9972 additions and 6652 deletions

View File

@@ -0,0 +1,63 @@
using GameServer.Contents.GameMode.Manage.PlayManage;
using GameServer.Contents.GameMode.Mode_Running.Manage;
using GameServer.Contents.GameMode.Mode_Running.ModeRace.Helper;
using ServerBase;
using ServerCommon;
using ServerCore;
namespace GameServer.Contents.GameMode.Mode_Running.ModeRace.Actions;
public class RaceStateCheckAction : EntityActionBase
{
public RaceStateCheckAction(EntityBase owner)
: base(owner)
{
}
public override void onClear()
{
return;
}
public override async Task<Result> onInit()
{
await Task.CompletedTask;
var result = new Result();
return result;
}
public async Task<Result> stateUpdate()
{
var run_race = getOwner() as GameModeBase;
NullReferenceCheckHelper.throwIfNull(run_race, () => $"GameModeRunRace is null !!");
var game_mode = getOwner() as IGameMode;
NullReferenceCheckHelper.throwIfNull(game_mode, () => $"game_mode is null !!");
var current_state = run_race.getGameModeState();
//kihoon todo : 해당 sate에 따른 업데이트 내용 처리 할게 있으면 여기서 처리 Update를 어떻게 써야 되나....
current_state.update();
var next_state_type = current_state.checkState();
var current_state_type = current_state.getStateType();
//다르면 상태 변경
if (!current_state_type.Equals(next_state_type))
{
var next_state = RunRaceHelper.createRaceGameState(game_mode, next_state_type);
current_state.exit();
run_race.setGameModeState(next_state);
current_state = run_race.getGameModeState();
current_state.enter();
}
var result = new Result();
await Task.CompletedTask;
return result;
}
}