From e6bbe9300dcd9f84355dcab501fb8ec7ab9afa0d Mon Sep 17 00:00:00 2001 From: Tom Simons Date: Tue, 27 Aug 2024 11:48:27 +0200 Subject: [PATCH 1/2] added function to set timeSpeed with an absolute value increased the max speed to max 12 hours per second --- Runtime/Scripts/SunTime.cs | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/Runtime/Scripts/SunTime.cs b/Runtime/Scripts/SunTime.cs index 65268c3..eff0983 100644 --- a/Runtime/Scripts/SunTime.cs +++ b/Runtime/Scripts/SunTime.cs @@ -227,9 +227,15 @@ public void SetUpdateSteps(int i) frameSteps = i; } - public void SetTimeSpeed(float multiplicationFactor) + public void MultiplyTimeSpeed(float multiplicationFactor) { - timeSpeed = Math.Clamp(timeSpeed * multiplicationFactor, 1, 10000); + timeSpeed = Math.Clamp(timeSpeed * multiplicationFactor, 1, 43200); + timeSpeedChanged.Invoke(timeSpeed); + } + + public void SetTimeSpeed(float speed) + { + timeSpeed = Math.Clamp(speed, 1, 43200); timeSpeedChanged.Invoke(timeSpeed); } From ac1ac192b1beffbb46300501dc66253722e40b53 Mon Sep 17 00:00:00 2001 From: Tom Simons Date: Tue, 27 Aug 2024 11:50:56 +0200 Subject: [PATCH 2/2] prepared package for release, fixed wrong date in changelog --- CHANGELOG.md | 8 +++++++- package.json | 2 +- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 8aac580..5f0e56a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,7 +5,13 @@ All notable changes to this package will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). -## [1.1.0] - 2023-07-27 +## [1.2.0] - 2023-08-27 + +### Added +- Added function to set timeSpeed with an absolute value +- Increased the max speed to max 12 hours per second + +## [1.1.0] - 2023-08-26 ### Added - A DateTime object is now the main source of time instead of multiple ints. diff --git a/package.json b/package.json index 9b2c49b..5b202e3 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "eu.netherlands3d.sun", "displayName": "Netherlands3D - Sun, Time of Day and Shadows", - "version": "1.1.0", + "version": "1.2.0", "unity": "2022.2", "description": "", "type": "library",