public override void SetDatas() { MGgDataMapping dataMapping = MCgDataMapping.Get <MGgDataMapping>(); MGgPlayerState myPlayerState = (MGgPlayerState)PlayerState; if (!bPlacedInWorld || !MyInfo.IsValid()) { MyInfo.Copy(myPlayerState.PlayerData.Info); } MyData_Character = dataMapping.LoadData <MGgData_Character>(EGgAssetType.Characters, MyInfo.Character); MyData_CharacterMeshSkin = dataMapping.LoadData <MGgData_CharacterMeshSkin>(EGgAssetType.CharacterMeshSkins, MyInfo.MeshSkin); MyData_CharacterMaterialSkin = dataMapping.LoadData <MGgData_CharacterMaterialSkin>(EGgAssetType.CharacterMaterialSkins, MyInfo.MaterialSkin); Data_Weapons.Clear(); CurrentWeaponCount = 1; //Data_Weapons.Reserve(CurrentWeaponCount); for (int i = 0; i < CurrentWeaponCount; ++i) { MGgData_Weapon data = dataMapping.LoadData <MGgData_Weapon>(EGgAssetType.Weapons, MyInfo.Weapon); Data_Weapons.Add(data); } Data_WeaponMaterialSkins.Clear(); //Data_WeaponMaterialSkins.Reserve(CurrentWeaponCount); for (int i = 0; i < CurrentWeaponCount; ++i) { MGgData_WeaponMaterialSkin data = dataMapping.LoadData <MGgData_WeaponMaterialSkin>(EGgAssetType.WeaponMaterialSkins, MyInfo.WeaponMaterialSkin); Data_WeaponMaterialSkins.Add(data); } }
protected override void PostProcessInput(float deltaTime) { base.PostProcessInput(deltaTime); FGgManager_Input manager = (FGgManager_Input)Manager_Input; manager.PostProcessInput(deltaTime); FCgInputFrame inputFrame = manager.CurrentInputFrame; // Reset PriorityList foreach (FCgGameEventInfo info in GameEventInfoPriorityList) { info.Reset(); } // Process GameEventDefinitions foreach (FCgGameEventDefinition def in manager.GameEventDefinitions_Game) { def.Sentence.ProcessInput(inputFrame); if (def.Sentence.Completed) { EGgGameEvent_Game e = FEGgGameEvent_Game_Helper.ToType(def.Event); GameEventInfoPriorityList[(byte)e].Event = def.Event; } } // Process QueuedGameEvents foreach (FCgGameEventInfo info in manager.QueuedGameEventInfosForNextFrame) { FECgGameEvent _event = info.Event; EGgGameEvent_Game e = FEGgGameEvent_Game_Helper.ToType(_event); GameEventInfoPriorityList[(byte)e].Event = _event; } // Add events to Local SnapShot MGgPlayerState myPlayerState = (MGgPlayerState)PlayerState; //myPlayerState.CurrentSnapShot.Reset(); for (byte i = 0; i < EGG_GAME_EVENT_GAME_MAX; ++i) { FCgGameEventInfo info = GameEventInfoPriorityList[i]; if (!info.IsValid()) { continue; } myPlayerState.CurrentSnapShot.AddGameEvent(info.Event); } FGgSnapShot_Player snapShot = (FGgSnapShot_Player)myPlayerState.CurrentSnapShot; snapShot.CurrentMousePosition = manager.CurrentMousePosition; //myPlayerState.ProcessCurrentLocalSnapShot(deltaTime); manager.ClearQueuedGameEvents(); }