mirror of
https://github.com/aharabada/glitchy-engine-beef.git
synced 2026-09-06 05:01:53 +00:00
Start of Script Instance deserialization
- Also deserialize when stopping the game to restore pre play state - Fixed ancient bug where ClearDictionaryAndDeleteKeys falsly deletes the dictionary - Added ClearDictionaryAndDeleteValues helper mixin
This commit is contained in:
@@ -67,7 +67,17 @@ namespace GlitchyEngine
|
||||
{
|
||||
for (var value in dictionary)
|
||||
delete value.key;
|
||||
delete dictionary;
|
||||
dictionary.Clear();
|
||||
}
|
||||
}
|
||||
|
||||
public static mixin ClearDictionaryAndDeleteValues(var dictionary)
|
||||
{
|
||||
if (dictionary != null)
|
||||
{
|
||||
for (var value in dictionary)
|
||||
delete value.value;
|
||||
dictionary.Clear();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user