diff --git a/MrBigsock/Assets/Code/Character.cs b/MrBigsock/Assets/Code/Character.cs index 5a1579b6c6f56eb09c266ec04344845ab7ed9526..968d7824f6be86f034471e74ca27da19d2898070 100644 --- a/MrBigsock/Assets/Code/Character.cs +++ b/MrBigsock/Assets/Code/Character.cs @@ -545,9 +545,9 @@ namespace BigSock { */ public TimeSpan IFrameDuration { get => _iFrameDuration; - private set => _iFrameDuration = value; + protected set => _iFrameDuration = value; } - public TimeSpan _iFrameDuration = new TimeSpan(0, 0, 0, 0, 333); + public TimeSpan _iFrameDuration = new TimeSpan(0, 0, 0, 0, 0); @@ -676,7 +676,7 @@ namespace BigSock { */ public bool AddIFrames(TimeSpan amount) { // Get when the IFrames would expire. - var nextCanTakeDamage = DateTime.Now + IFrameDuration; + var nextCanTakeDamage = DateTime.Now + amount; // Only if that's later than current. if(nextCanTakeDamage > NextTimeCanTakeDamage) { diff --git a/MrBigsock/Assets/Code/PlayerController.cs b/MrBigsock/Assets/Code/PlayerController.cs index cfb1e8f64bce7c461e2c126023b51cef834af3ce..e17bf5c1527a9e6a906df0bca34d3fe6302b99c6 100644 --- a/MrBigsock/Assets/Code/PlayerController.cs +++ b/MrBigsock/Assets/Code/PlayerController.cs @@ -63,6 +63,7 @@ namespace BigSock { public PlayerController() { + IFrameDuration = new TimeSpan(0, 0, 0, 0, 250); //TryPickUpItem(ItemService.SINGLETON.Get(201)); //TryPickUpItem(ItemService.SINGLETON.Get(105)); //TryPickUpItem(ItemService.SINGLETON.Get(202));