void CPlayerBase::update(float elapsed) {
	PROFILE_FUNCTION("update base");
	if (camera.isValid()) {
		if (onCinematic) {
			UpdateCinematic(elapsed);
		}
		else if (controlEnabled || only_sense) {
			bool alive = !checkDead();
			if (alive && inputEnabled) {
				energy_decrease = energy_default_decrease; // Default if nobody change that this frame
				UpdateSenseVision();
				if (!only_sense) {
					UpdateMoves();
					UpdateInputActions();
				}
				setLife(getLife() - getDeltaTime() * energy_decrease);
			}
			Recalc();
			if (alive) {
				//UpdateMoves();
				myUpdate();
				update_msgs();
			}
		}
		//UpdateAnimation();
	}
}
Esempio n. 2
0
void CFreeCamera::Update(float ElapsedTime){
	
	UpdateInputActions();

	UpdateCamera(ElapsedTime);
	UpdateCameraSpeed();
	UpdatePlayerPosition(ElapsedTime);

}
Esempio n. 3
0
void ezInputManager::Update(ezTime tTimeDifference)
{
  PollHardware();

  UpdateInputSlotStates();

  s_LastCharacter = ezInputDevice::RetrieveLastCharacterFromAllDevices();

  UpdateInputActions(tTimeDifference);

  ezInputDevice::ResetAllDevices();

  ezInputDevice::UpdateAllHardwareStates(tTimeDifference);

  s_bInputSlotResetRequired = true;
}