void Actor::Tick( float Dt ) { SimulatePhysics( Dt ); for( uint32_t Idx = 0; Idx < array::size( mComponents ); ++Idx ) { mComponents[Idx]->Tick( Dt ); } }
void VenomModuleUpdate(GameMemory* memory) { GameData* data = (GameData*)memory->userdata; EntityContainer* entityContainer = &data->entityContainer; EditorData* editorData = &memory->editor; RenderState* rs = &memory->renderState; AssetManifest *manifest = &memory->assetManifest; const SystemInfo* sys = &memory->systemInfo; InputState* input = &memory->inputState; Entity *player = GetEntity(data->playerEntityIndex, entityContainer); EditorData* editor = &memory->editor; bool editorHandledInput = process_editor_mode(memory, entityContainer, editor, input, &editor->editorCamera); Engine *engine = GetEngine(); FinalizeEngineTasks(engine); const F32 deltaTime = memory->deltaTime; if (engine->isPaused == false) { if (editorHandledInput == false) { PlayerInput playerInput = KeyboardAndMouseToPlayerInput(input); if (playerInput.lookModeActive == false) { UpdateMousePicker(&data->camera); } ThirdPersonPlayerControl(player, &data->camera, &playerInput, memory->deltaTime); } //UpdateTerrainFromViewPosition(&data->terrain, player->position); UpdateAnimationStates(entityContainer, deltaTime); SimulatePhysics(&engine->physicsSimulation, entityContainer); } }