private void Update() { if (UFLevel.player == null) { return; } playerMissingTime += Time.deltaTime; playerMissingFrames++; if (playerMissingTime > 1f && playerMissingFrames > 10) { UFLevel.GetPlayer <UFPlayerLife>().TakeDamage(500f * Time.deltaTime, UFPlayerLife.DamageType.exitLevel, true); } }
private void SaveProperties() { if (LoweringRecord()) { Global.match.TrackDifficulty(difficultyDropdown.value); } Global.save.playerName = FilterName(playerNameInput.text); Global.save.difficulty = difficultyDropdown.value; Global.save.allowShortJump = shortJumpToggle.isOn; Global.save.overrideStats = overrideStatsToggle.isOn; Global.save.stableJump = stabilizeDoubleJumpToggle.isOn; ApplyVolume(); if (inLevel) { Global.save.SetPlayerStats(UFLevel.GetPlayer <PlayerMovement>()); } }