jamesperet 3 rokov pred
commit
ae104f739b
100 zmenil súbory, kde vykonal 3869 pridanie a 0 odobranie
  1. 71 0
      .gitignore
  2. 8 0
      Documentation.meta
  3. 8 0
      Editor.meta
  4. 57 0
      Editor/IconFoldoutGroupAttributeDrawer.cs
  5. 11 0
      Editor/IconFoldoutGroupAttributeDrawer.cs.meta
  6. 8 0
      Editor/Icons.meta
  7. BIN
      Editor/Icons/CompareBoolGameActionConditionIcon.png
  8. 92 0
      Editor/Icons/CompareBoolGameActionConditionIcon.png.meta
  9. BIN
      Editor/Icons/CompareStringsGameActionConditionIcon.png
  10. 92 0
      Editor/Icons/CompareStringsGameActionConditionIcon.png.meta
  11. BIN
      Editor/Icons/ConditionalGameAcionIcon.png
  12. 92 0
      Editor/Icons/ConditionalGameAcionIcon.png.meta
  13. BIN
      Editor/Icons/DebugLogGameActionIcon.png
  14. 92 0
      Editor/Icons/DebugLogGameActionIcon.png.meta
  15. BIN
      Editor/Icons/InstantiateGameActionIcon.png
  16. 92 0
      Editor/Icons/InstantiateGameActionIcon.png.meta
  17. BIN
      Editor/Icons/OnEventGameActionTriggerIcon.png
  18. 92 0
      Editor/Icons/OnEventGameActionTriggerIcon.png.meta
  19. BIN
      Editor/Icons/OnStorylineGameActionTriggerIcon.png
  20. 92 0
      Editor/Icons/OnStorylineGameActionTriggerIcon.png.meta
  21. BIN
      Editor/Icons/OnTriggerEnterGameActionTriggerIcon.png
  22. 92 0
      Editor/Icons/OnTriggerEnterGameActionTriggerIcon.png.meta
  23. BIN
      Editor/Icons/WaitGameActionIcon.png
  24. 92 0
      Editor/Icons/WaitGameActionIcon.png.meta
  25. 32 0
      Readme.md
  26. 7 0
      Readme.md.meta
  27. 8 0
      Runtime.meta
  28. 99 0
      Runtime/ActionController.cs
  29. 11 0
      Runtime/ActionController.cs.meta
  30. 8 0
      Runtime/Attributes.meta
  31. 28 0
      Runtime/Attributes/IconFoldoutGroupAttribute.cs
  32. 11 0
      Runtime/Attributes/IconFoldoutGroupAttribute.cs.meta
  33. 8 0
      Runtime/BuildTools.meta
  34. 13 0
      Runtime/BuildTools/BuildConfig.cs
  35. 11 0
      Runtime/BuildTools/BuildConfig.cs.meta
  36. 29 0
      Runtime/CommandInvoker.cs
  37. 11 0
      Runtime/CommandInvoker.cs.meta
  38. 8 0
      Runtime/Commands.meta
  39. 26 0
      Runtime/Commands/ObjectChangePositionCommand.cs
  40. 11 0
      Runtime/Commands/ObjectChangePositionCommand.cs.meta
  41. 12 0
      Runtime/ConditionType.cs
  42. 11 0
      Runtime/ConditionType.cs.meta
  43. 8 0
      Runtime/ConfigOptions.meta
  44. 36 0
      Runtime/ConfigOptions/ConfigOptionBase.cs
  45. 11 0
      Runtime/ConfigOptions/ConfigOptionBase.cs.meta
  46. 23 0
      Runtime/ConfigOptions/ConfigOptionData.cs
  47. 11 0
      Runtime/ConfigOptions/ConfigOptionData.cs.meta
  48. 73 0
      Runtime/ConfigOptions/ConfigOptionUiData.cs
  49. 11 0
      Runtime/ConfigOptions/ConfigOptionUiData.cs.meta
  50. 26 0
      Runtime/ConfigOptions/ConfigOptionsManager.cs
  51. 11 0
      Runtime/ConfigOptions/ConfigOptionsManager.cs.meta
  52. 25 0
      Runtime/ConfigOptions/IConfigOption.cs
  53. 11 0
      Runtime/ConfigOptions/IConfigOption.cs.meta
  54. 8 0
      Runtime/ConfigOptions/Templates.meta
  55. 62 0
      Runtime/ConfigOptions/Templates/FullscreenConfigOption.cs
  56. 11 0
      Runtime/ConfigOptions/Templates/FullscreenConfigOption.cs.meta
  57. 130 0
      Runtime/ConfigOptions/Templates/ScreenResolutionConfigOption.cs
  58. 11 0
      Runtime/ConfigOptions/Templates/ScreenResolutionConfigOption.cs.meta
  59. 64 0
      Runtime/ConfigOptions/Templates/VolumeConfigOption.cs
  60. 11 0
      Runtime/ConfigOptions/Templates/VolumeConfigOption.cs.meta
  61. 8 0
      Runtime/EventManager.meta
  62. 64 0
      Runtime/EventManager/ActivityMessageEvents.cs
  63. 11 0
      Runtime/EventManager/ActivityMessageEvents.cs.meta
  64. 12 0
      Runtime/EventManager/EventManager.cs
  65. 11 0
      Runtime/EventManager/EventManager.cs.meta
  66. 20 0
      Runtime/EventManager/EventResponse.cs
  67. 11 0
      Runtime/EventManager/EventResponse.cs.meta
  68. 19 0
      Runtime/EventManager/FloatingMessageEvents.cs
  69. 11 0
      Runtime/EventManager/FloatingMessageEvents.cs.meta
  70. 56 0
      Runtime/EventManager/GamePlayEvents.cs
  71. 11 0
      Runtime/EventManager/GamePlayEvents.cs.meta
  72. 322 0
      Runtime/EventManager/GenericEvents.cs
  73. 11 0
      Runtime/EventManager/GenericEvents.cs.meta
  74. 56 0
      Runtime/EventManager/InteractionEvents.cs
  75. 11 0
      Runtime/EventManager/InteractionEvents.cs.meta
  76. 39 0
      Runtime/EventManager/MenuEvents.cs
  77. 11 0
      Runtime/EventManager/MenuEvents.cs.meta
  78. 42 0
      Runtime/EventManager/PlayerEvents.cs
  79. 11 0
      Runtime/EventManager/PlayerEvents.cs.meta
  80. 107 0
      Runtime/EventManager/RequestEvents.cs
  81. 11 0
      Runtime/EventManager/RequestEvents.cs.meta
  82. 20 0
      Runtime/EventManager/SerializationEvents.cs
  83. 11 0
      Runtime/EventManager/SerializationEvents.cs.meta
  84. 74 0
      Runtime/EventManager/TransitionEvents.cs
  85. 11 0
      Runtime/EventManager/TransitionEvents.cs.meta
  86. 36 0
      Runtime/FxController.cs
  87. 11 0
      Runtime/FxController.cs.meta
  88. 8 0
      Runtime/GameActions.meta
  89. 8 0
      Runtime/GameActions/Actions.meta
  90. 231 0
      Runtime/GameActions/Actions/ConditionalGameAction.cs
  91. 11 0
      Runtime/GameActions/Actions/ConditionalGameAction.cs.meta
  92. 146 0
      Runtime/GameActions/Actions/DebugLogGameAction.cs
  93. 11 0
      Runtime/GameActions/Actions/DebugLogGameAction.cs.meta
  94. 98 0
      Runtime/GameActions/Actions/ExitApplicationGameAction.cs
  95. 11 0
      Runtime/GameActions/Actions/ExitApplicationGameAction.cs.meta
  96. 152 0
      Runtime/GameActions/Actions/GameObjectControllerGameAction.cs
  97. 11 0
      Runtime/GameActions/Actions/GameObjectControllerGameAction.cs.meta
  98. 98 0
      Runtime/GameActions/Actions/InstantiateGameAction.cs
  99. 11 0
      Runtime/GameActions/Actions/InstantiateGameAction.cs.meta
  100. 177 0
      Runtime/GameActions/Actions/StringManipulationGameAction.cs

+ 71 - 0
.gitignore

@@ -0,0 +1,71 @@
+# This .gitignore file should be placed at the root of your Unity project directory
+#
+# Get latest from https://github.com/github/gitignore/blob/master/Unity.gitignore
+#
+/[Ll]ibrary/
+/[Tt]emp/
+/[Oo]bj/
+/[Bb]uild/
+/[Bb]uilds/
+/[Ll]ogs/
+/[Uu]ser[Ss]ettings/
+
+# MemoryCaptures can get excessive in size.
+# They also could contain extremely sensitive data
+/[Mm]emoryCaptures/
+
+# Asset meta data should only be ignored when the corresponding asset is also ignored
+!/[Aa]ssets/**/*.meta
+
+# Uncomment this line if you wish to ignore the asset store tools plugin
+# /[Aa]ssets/AssetStoreTools*
+
+# Autogenerated Jetbrains Rider plugin
+/[Aa]ssets/Plugins/Editor/JetBrains*
+
+# Visual Studio cache directory
+.vs/
+
+# Gradle cache directory
+.gradle/
+
+# Autogenerated VS/MD/Consulo solution and project files
+ExportedObj/
+.consulo/
+*.csproj
+*.unityproj
+*.sln
+*.suo
+*.tmp
+*.user
+*.userprefs
+*.pidb
+*.booproj
+*.svd
+*.pdb
+*.mdb
+*.opendb
+*.VC.db
+
+# Unity3D generated meta files
+*.pidb.meta
+*.pdb.meta
+*.mdb.meta
+
+# Unity3D generated file on crash reports
+sysinfo.txt
+
+# Builds
+*.apk
+*.aab
+*.unitypackage
+
+# Crashlytics generated file
+crashlytics-build.properties
+
+# Packed Addressables
+/[Aa]ssets/[Aa]ddressable[Aa]ssets[Dd]ata/*/*.bin*
+
+# Temporary auto-generated Android Assets
+/[Aa]ssets/[Ss]treamingAssets/aa.meta
+/[Aa]ssets/[Ss]treamingAssets/aa/*

+ 8 - 0
Documentation.meta

@@ -0,0 +1,8 @@
+fileFormatVersion: 2
+guid: 7874ca1b91b5bf24dab14c3c08808e37
+folderAsset: yes
+DefaultImporter:
+  externalObjects: {}
+  userData: 
+  assetBundleName: 
+  assetBundleVariant: 

+ 8 - 0
Editor.meta

@@ -0,0 +1,8 @@
+fileFormatVersion: 2
+guid: a01e28e954b335444ac2952884d41424
+folderAsset: yes
+DefaultImporter:
+  externalObjects: {}
+  userData: 
+  assetBundleName: 
+  assetBundleVariant: 

+ 57 - 0
Editor/IconFoldoutGroupAttributeDrawer.cs

@@ -0,0 +1,57 @@
+using Sirenix.OdinInspector.Editor;
+using Sirenix.OdinInspector.Editor.ValueResolvers;
+using Sirenix.Utilities.Editor;
+using UnityEngine;
+using UnityEditor;
+using KairoEngine.Core;
+
+namespace KairoEngine.Core.Editor
+{
+    public class IconFoldoutGroupAttributeDrawer :  OdinGroupDrawer<IconFoldoutGroupAttribute>
+    {
+        private LocalPersistentContext<bool> isExpanded;
+
+        protected override void Initialize()
+        {
+            this.isExpanded = this.GetPersistentValue<bool>(
+                "IconFoldoutGroupAttributeDrawer.isExpanded",
+                GeneralDrawerConfig.Instance.ExpandFoldoutByDefault);
+        }
+
+        protected override void DrawPropertyLayout(GUIContent label)
+        {
+            SirenixEditorGUI.BeginBox();
+            SirenixEditorGUI.BeginBoxHeader();
+            string text = ValueResolver.GetForString(this.Property, this.Attribute.text, null).GetValue();
+            Texture2D image = EditorGUIUtility.FindTexture(this.Attribute.iconPath);
+            if(image == null)
+            {
+                image = new Texture2D(1, 1);
+                var data = System.IO.File.ReadAllBytes(this.Attribute.iconPath);
+                if(data != null) image.LoadImage(data);
+                image.Apply();
+            }
+            label = new GUIContent(text);
+            var styleCollapse = new GUIStyle(EditorStyles.foldout);
+            Rect rect = EditorGUILayout.GetControlRect();
+            GUI.DrawTexture(new Rect(rect.x, rect.y + 2, 14, 14), image);
+            rect.x += 18;
+            rect.width -= 18;
+            this.isExpanded.Value = SirenixEditorGUI.Foldout(rect, this.isExpanded.Value, label, styleCollapse);
+            SirenixEditorGUI.EndBoxHeader();
+
+            if (SirenixEditorGUI.BeginFadeGroup(this, this.isExpanded.Value))
+            {
+                for (int i = 0; i < this.Property.Children.Count; i++)
+                {
+                    this.Property.Children[i].Draw();
+                }
+            }
+
+            SirenixEditorGUI.EndFadeGroup();
+            SirenixEditorGUI.EndBox();
+        }
+    }
+}
+
+

+ 11 - 0
Editor/IconFoldoutGroupAttributeDrawer.cs.meta

@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: a580408ddcee61741b4469fb71db73ee
+MonoImporter:
+  externalObjects: {}
+  serializedVersion: 2
+  defaultReferences: []
+  executionOrder: 0
+  icon: {instanceID: 0}
+  userData: 
+  assetBundleName: 
+  assetBundleVariant: 

+ 8 - 0
Editor/Icons.meta

@@ -0,0 +1,8 @@
+fileFormatVersion: 2
+guid: 9275f239d7bf6f44c99fa60e1c878eee
+folderAsset: yes
+DefaultImporter:
+  externalObjects: {}
+  userData: 
+  assetBundleName: 
+  assetBundleVariant: 

BIN
Editor/Icons/CompareBoolGameActionConditionIcon.png


+ 92 - 0
Editor/Icons/CompareBoolGameActionConditionIcon.png.meta

@@ -0,0 +1,92 @@
+fileFormatVersion: 2
+guid: e4c42e384c946bf4aa8ebeece48cbf6d
+TextureImporter:
+  internalIDToNameTable: []
+  externalObjects: {}
+  serializedVersion: 11
+  mipmaps:
+    mipMapMode: 0
+    enableMipMap: 1
+    sRGBTexture: 1
+    linearTexture: 0
+    fadeOut: 0
+    borderMipMap: 0
+    mipMapsPreserveCoverage: 0
+    alphaTestReferenceValue: 0.5
+    mipMapFadeDistanceStart: 1
+    mipMapFadeDistanceEnd: 3
+  bumpmap:
+    convertToNormalMap: 0
+    externalNormalMap: 0
+    heightScale: 0.25
+    normalMapFilter: 0
+  isReadable: 0
+  streamingMipmaps: 0
+  streamingMipmapsPriority: 0
+  grayScaleToAlpha: 0
+  generateCubemap: 6
+  cubemapConvolution: 0
+  seamlessCubemap: 0
+  textureFormat: 1
+  maxTextureSize: 2048
+  textureSettings:
+    serializedVersion: 2
+    filterMode: -1
+    aniso: -1
+    mipBias: -100
+    wrapU: -1
+    wrapV: -1
+    wrapW: -1
+  nPOTScale: 1
+  lightmap: 0
+  compressionQuality: 50
+  spriteMode: 0
+  spriteExtrude: 1
+  spriteMeshType: 1
+  alignment: 0
+  spritePivot: {x: 0.5, y: 0.5}
+  spritePixelsToUnits: 100
+  spriteBorder: {x: 0, y: 0, z: 0, w: 0}
+  spriteGenerateFallbackPhysicsShape: 1
+  alphaUsage: 1
+  alphaIsTransparency: 0
+  spriteTessellationDetail: -1
+  textureType: 0
+  textureShape: 1
+  singleChannelComponent: 0
+  maxTextureSizeSet: 0
+  compressionQualitySet: 0
+  textureFormatSet: 0
+  applyGammaDecoding: 0
+  platformSettings:
+  - serializedVersion: 3
+    buildTarget: DefaultTexturePlatform
+    maxTextureSize: 2048
+    resizeAlgorithm: 0
+    textureFormat: -1
+    textureCompression: 1
+    compressionQuality: 50
+    crunchedCompression: 0
+    allowsAlphaSplitting: 0
+    overridden: 0
+    androidETC2FallbackOverride: 0
+    forceMaximumCompressionQuality_BC6H_BC7: 0
+  spriteSheet:
+    serializedVersion: 2
+    sprites: []
+    outline: []
+    physicsShape: []
+    bones: []
+    spriteID: 
+    internalID: 0
+    vertices: []
+    indices: 
+    edges: []
+    weights: []
+    secondaryTextures: []
+  spritePackingTag: 
+  pSDRemoveMatte: 0
+  pSDShowRemoveMatteOption: 0
+  userData: 
+  assetBundleName: 
+  assetBundleVariant: 

BIN
Editor/Icons/CompareStringsGameActionConditionIcon.png


+ 92 - 0
Editor/Icons/CompareStringsGameActionConditionIcon.png.meta

@@ -0,0 +1,92 @@
+fileFormatVersion: 2
+guid: 3231d6dd21da9244a8b5d62ce0f4f650
+TextureImporter:
+  internalIDToNameTable: []
+  externalObjects: {}
+  serializedVersion: 11
+  mipmaps:
+    mipMapMode: 0
+    enableMipMap: 1
+    sRGBTexture: 1
+    linearTexture: 0
+    fadeOut: 0
+    borderMipMap: 0
+    mipMapsPreserveCoverage: 0
+    alphaTestReferenceValue: 0.5
+    mipMapFadeDistanceStart: 1
+    mipMapFadeDistanceEnd: 3
+  bumpmap:
+    convertToNormalMap: 0
+    externalNormalMap: 0
+    heightScale: 0.25
+    normalMapFilter: 0
+  isReadable: 0
+  streamingMipmaps: 0
+  streamingMipmapsPriority: 0
+  grayScaleToAlpha: 0
+  generateCubemap: 6
+  cubemapConvolution: 0
+  seamlessCubemap: 0
+  textureFormat: 1
+  maxTextureSize: 2048
+  textureSettings:
+    serializedVersion: 2
+    filterMode: -1
+    aniso: -1
+    mipBias: -100
+    wrapU: -1
+    wrapV: -1
+    wrapW: -1
+  nPOTScale: 1
+  lightmap: 0
+  compressionQuality: 50
+  spriteMode: 0
+  spriteExtrude: 1
+  spriteMeshType: 1
+  alignment: 0
+  spritePivot: {x: 0.5, y: 0.5}
+  spritePixelsToUnits: 100
+  spriteBorder: {x: 0, y: 0, z: 0, w: 0}
+  spriteGenerateFallbackPhysicsShape: 1
+  alphaUsage: 1
+  alphaIsTransparency: 0
+  spriteTessellationDetail: -1
+  textureType: 0
+  textureShape: 1
+  singleChannelComponent: 0
+  maxTextureSizeSet: 0
+  compressionQualitySet: 0
+  textureFormatSet: 0
+  applyGammaDecoding: 0
+  platformSettings:
+  - serializedVersion: 3
+    buildTarget: DefaultTexturePlatform
+    maxTextureSize: 2048
+    resizeAlgorithm: 0
+    textureFormat: -1
+    textureCompression: 1
+    compressionQuality: 50
+    crunchedCompression: 0
+    allowsAlphaSplitting: 0
+    overridden: 0
+    androidETC2FallbackOverride: 0
+    forceMaximumCompressionQuality_BC6H_BC7: 0
+  spriteSheet:
+    serializedVersion: 2
+    sprites: []
+    outline: []
+    physicsShape: []
+    bones: []
+    spriteID: 
+    internalID: 0
+    vertices: []
+    indices: 
+    edges: []
+    weights: []
+    secondaryTextures: []
+  spritePackingTag: 
+  pSDRemoveMatte: 0
+  pSDShowRemoveMatteOption: 0
+  userData: 
+  assetBundleName: 
+  assetBundleVariant: 

BIN
Editor/Icons/ConditionalGameAcionIcon.png


+ 92 - 0
Editor/Icons/ConditionalGameAcionIcon.png.meta

@@ -0,0 +1,92 @@
+fileFormatVersion: 2
+guid: 26e42a1460a51924d908f2ac622daca4
+TextureImporter:
+  internalIDToNameTable: []
+  externalObjects: {}
+  serializedVersion: 11
+  mipmaps:
+    mipMapMode: 0
+    enableMipMap: 1
+    sRGBTexture: 1
+    linearTexture: 0
+    fadeOut: 0
+    borderMipMap: 0
+    mipMapsPreserveCoverage: 0
+    alphaTestReferenceValue: 0.5
+    mipMapFadeDistanceStart: 1
+    mipMapFadeDistanceEnd: 3
+  bumpmap:
+    convertToNormalMap: 0
+    externalNormalMap: 0
+    heightScale: 0.25
+    normalMapFilter: 0
+  isReadable: 0
+  streamingMipmaps: 0
+  streamingMipmapsPriority: 0
+  grayScaleToAlpha: 0
+  generateCubemap: 6
+  cubemapConvolution: 0
+  seamlessCubemap: 0
+  textureFormat: 1
+  maxTextureSize: 2048
+  textureSettings:
+    serializedVersion: 2
+    filterMode: -1
+    aniso: -1
+    mipBias: -100
+    wrapU: -1
+    wrapV: -1
+    wrapW: -1
+  nPOTScale: 1
+  lightmap: 0
+  compressionQuality: 50
+  spriteMode: 0
+  spriteExtrude: 1
+  spriteMeshType: 1
+  alignment: 0
+  spritePivot: {x: 0.5, y: 0.5}
+  spritePixelsToUnits: 100
+  spriteBorder: {x: 0, y: 0, z: 0, w: 0}
+  spriteGenerateFallbackPhysicsShape: 1
+  alphaUsage: 1
+  alphaIsTransparency: 0
+  spriteTessellationDetail: -1
+  textureType: 0
+  textureShape: 1
+  singleChannelComponent: 0
+  maxTextureSizeSet: 0
+  compressionQualitySet: 0
+  textureFormatSet: 0
+  applyGammaDecoding: 0
+  platformSettings:
+  - serializedVersion: 3
+    buildTarget: DefaultTexturePlatform
+    maxTextureSize: 2048
+    resizeAlgorithm: 0
+    textureFormat: -1
+    textureCompression: 1
+    compressionQuality: 50
+    crunchedCompression: 0
+    allowsAlphaSplitting: 0
+    overridden: 0
+    androidETC2FallbackOverride: 0
+    forceMaximumCompressionQuality_BC6H_BC7: 0
+  spriteSheet:
+    serializedVersion: 2
+    sprites: []
+    outline: []
+    physicsShape: []
+    bones: []
+    spriteID: 
+    internalID: 0
+    vertices: []
+    indices: 
+    edges: []
+    weights: []
+    secondaryTextures: []
+  spritePackingTag: 
+  pSDRemoveMatte: 0
+  pSDShowRemoveMatteOption: 0
+  userData: 
+  assetBundleName: 
+  assetBundleVariant: 

BIN
Editor/Icons/DebugLogGameActionIcon.png


+ 92 - 0
Editor/Icons/DebugLogGameActionIcon.png.meta

@@ -0,0 +1,92 @@
+fileFormatVersion: 2
+guid: 384f8a83dc69e0040bc7bf836630a052
+TextureImporter:
+  internalIDToNameTable: []
+  externalObjects: {}
+  serializedVersion: 11
+  mipmaps:
+    mipMapMode: 0
+    enableMipMap: 1
+    sRGBTexture: 1
+    linearTexture: 0
+    fadeOut: 0
+    borderMipMap: 0
+    mipMapsPreserveCoverage: 0
+    alphaTestReferenceValue: 0.5
+    mipMapFadeDistanceStart: 1
+    mipMapFadeDistanceEnd: 3
+  bumpmap:
+    convertToNormalMap: 0
+    externalNormalMap: 0
+    heightScale: 0.25
+    normalMapFilter: 0
+  isReadable: 0
+  streamingMipmaps: 0
+  streamingMipmapsPriority: 0
+  grayScaleToAlpha: 0
+  generateCubemap: 6
+  cubemapConvolution: 0
+  seamlessCubemap: 0
+  textureFormat: 1
+  maxTextureSize: 2048
+  textureSettings:
+    serializedVersion: 2
+    filterMode: -1
+    aniso: -1
+    mipBias: -100
+    wrapU: -1
+    wrapV: -1
+    wrapW: -1
+  nPOTScale: 1
+  lightmap: 0
+  compressionQuality: 50
+  spriteMode: 0
+  spriteExtrude: 1
+  spriteMeshType: 1
+  alignment: 0
+  spritePivot: {x: 0.5, y: 0.5}
+  spritePixelsToUnits: 100
+  spriteBorder: {x: 0, y: 0, z: 0, w: 0}
+  spriteGenerateFallbackPhysicsShape: 1
+  alphaUsage: 1
+  alphaIsTransparency: 0
+  spriteTessellationDetail: -1
+  textureType: 0
+  textureShape: 1
+  singleChannelComponent: 0
+  maxTextureSizeSet: 0
+  compressionQualitySet: 0
+  textureFormatSet: 0
+  applyGammaDecoding: 0
+  platformSettings:
+  - serializedVersion: 3
+    buildTarget: DefaultTexturePlatform
+    maxTextureSize: 2048
+    resizeAlgorithm: 0
+    textureFormat: -1
+    textureCompression: 1
+    compressionQuality: 50
+    crunchedCompression: 0
+    allowsAlphaSplitting: 0
+    overridden: 0
+    androidETC2FallbackOverride: 0
+    forceMaximumCompressionQuality_BC6H_BC7: 0
+  spriteSheet:
+    serializedVersion: 2
+    sprites: []
+    outline: []
+    physicsShape: []
+    bones: []
+    spriteID: 
+    internalID: 0
+    vertices: []
+    indices: 
+    edges: []
+    weights: []
+    secondaryTextures: []
+  spritePackingTag: 
+  pSDRemoveMatte: 0
+  pSDShowRemoveMatteOption: 0
+  userData: 
+  assetBundleName: 
+  assetBundleVariant: 

BIN
Editor/Icons/InstantiateGameActionIcon.png


+ 92 - 0
Editor/Icons/InstantiateGameActionIcon.png.meta

@@ -0,0 +1,92 @@
+fileFormatVersion: 2
+guid: a06da78a113853046bb1201fc38a45ab
+TextureImporter:
+  internalIDToNameTable: []
+  externalObjects: {}
+  serializedVersion: 11
+  mipmaps:
+    mipMapMode: 0
+    enableMipMap: 1
+    sRGBTexture: 1
+    linearTexture: 0
+    fadeOut: 0
+    borderMipMap: 0
+    mipMapsPreserveCoverage: 0
+    alphaTestReferenceValue: 0.5
+    mipMapFadeDistanceStart: 1
+    mipMapFadeDistanceEnd: 3
+  bumpmap:
+    convertToNormalMap: 0
+    externalNormalMap: 0
+    heightScale: 0.25
+    normalMapFilter: 0
+  isReadable: 0
+  streamingMipmaps: 0
+  streamingMipmapsPriority: 0
+  grayScaleToAlpha: 0
+  generateCubemap: 6
+  cubemapConvolution: 0
+  seamlessCubemap: 0
+  textureFormat: 1
+  maxTextureSize: 2048
+  textureSettings:
+    serializedVersion: 2
+    filterMode: -1
+    aniso: -1
+    mipBias: -100
+    wrapU: -1
+    wrapV: -1
+    wrapW: -1
+  nPOTScale: 1
+  lightmap: 0
+  compressionQuality: 50
+  spriteMode: 0
+  spriteExtrude: 1
+  spriteMeshType: 1
+  alignment: 0
+  spritePivot: {x: 0.5, y: 0.5}
+  spritePixelsToUnits: 100
+  spriteBorder: {x: 0, y: 0, z: 0, w: 0}
+  spriteGenerateFallbackPhysicsShape: 1
+  alphaUsage: 1
+  alphaIsTransparency: 0
+  spriteTessellationDetail: -1
+  textureType: 0
+  textureShape: 1
+  singleChannelComponent: 0
+  maxTextureSizeSet: 0
+  compressionQualitySet: 0
+  textureFormatSet: 0
+  applyGammaDecoding: 0
+  platformSettings:
+  - serializedVersion: 3
+    buildTarget: DefaultTexturePlatform
+    maxTextureSize: 2048
+    resizeAlgorithm: 0
+    textureFormat: -1
+    textureCompression: 1
+    compressionQuality: 50
+    crunchedCompression: 0
+    allowsAlphaSplitting: 0
+    overridden: 0
+    androidETC2FallbackOverride: 0
+    forceMaximumCompressionQuality_BC6H_BC7: 0
+  spriteSheet:
+    serializedVersion: 2
+    sprites: []
+    outline: []
+    physicsShape: []
+    bones: []
+    spriteID: 
+    internalID: 0
+    vertices: []
+    indices: 
+    edges: []
+    weights: []
+    secondaryTextures: []
+  spritePackingTag: 
+  pSDRemoveMatte: 0
+  pSDShowRemoveMatteOption: 0
+  userData: 
+  assetBundleName: 
+  assetBundleVariant: 

BIN
Editor/Icons/OnEventGameActionTriggerIcon.png


+ 92 - 0
Editor/Icons/OnEventGameActionTriggerIcon.png.meta

@@ -0,0 +1,92 @@
+fileFormatVersion: 2
+guid: 9f61448304f9e374eb4980888e0d0ba4
+TextureImporter:
+  internalIDToNameTable: []
+  externalObjects: {}
+  serializedVersion: 11
+  mipmaps:
+    mipMapMode: 0
+    enableMipMap: 1
+    sRGBTexture: 1
+    linearTexture: 0
+    fadeOut: 0
+    borderMipMap: 0
+    mipMapsPreserveCoverage: 0
+    alphaTestReferenceValue: 0.5
+    mipMapFadeDistanceStart: 1
+    mipMapFadeDistanceEnd: 3
+  bumpmap:
+    convertToNormalMap: 0
+    externalNormalMap: 0
+    heightScale: 0.25
+    normalMapFilter: 0
+  isReadable: 0
+  streamingMipmaps: 0
+  streamingMipmapsPriority: 0
+  grayScaleToAlpha: 0
+  generateCubemap: 6
+  cubemapConvolution: 0
+  seamlessCubemap: 0
+  textureFormat: 1
+  maxTextureSize: 2048
+  textureSettings:
+    serializedVersion: 2
+    filterMode: -1
+    aniso: -1
+    mipBias: -100
+    wrapU: -1
+    wrapV: -1
+    wrapW: -1
+  nPOTScale: 1
+  lightmap: 0
+  compressionQuality: 50
+  spriteMode: 0
+  spriteExtrude: 1
+  spriteMeshType: 1
+  alignment: 0
+  spritePivot: {x: 0.5, y: 0.5}
+  spritePixelsToUnits: 100
+  spriteBorder: {x: 0, y: 0, z: 0, w: 0}
+  spriteGenerateFallbackPhysicsShape: 1
+  alphaUsage: 1
+  alphaIsTransparency: 0
+  spriteTessellationDetail: -1
+  textureType: 0
+  textureShape: 1
+  singleChannelComponent: 0
+  maxTextureSizeSet: 0
+  compressionQualitySet: 0
+  textureFormatSet: 0
+  applyGammaDecoding: 0
+  platformSettings:
+  - serializedVersion: 3
+    buildTarget: DefaultTexturePlatform
+    maxTextureSize: 2048
+    resizeAlgorithm: 0
+    textureFormat: -1
+    textureCompression: 1
+    compressionQuality: 50
+    crunchedCompression: 0
+    allowsAlphaSplitting: 0
+    overridden: 0
+    androidETC2FallbackOverride: 0
+    forceMaximumCompressionQuality_BC6H_BC7: 0
+  spriteSheet:
+    serializedVersion: 2
+    sprites: []
+    outline: []
+    physicsShape: []
+    bones: []
+    spriteID: 
+    internalID: 0
+    vertices: []
+    indices: 
+    edges: []
+    weights: []
+    secondaryTextures: []
+  spritePackingTag: 
+  pSDRemoveMatte: 0
+  pSDShowRemoveMatteOption: 0
+  userData: 
+  assetBundleName: 
+  assetBundleVariant: 

BIN
Editor/Icons/OnStorylineGameActionTriggerIcon.png


+ 92 - 0
Editor/Icons/OnStorylineGameActionTriggerIcon.png.meta

@@ -0,0 +1,92 @@
+fileFormatVersion: 2
+guid: 32be6e0e437680344b43dbbbec02ec5b
+TextureImporter:
+  internalIDToNameTable: []
+  externalObjects: {}
+  serializedVersion: 11
+  mipmaps:
+    mipMapMode: 0
+    enableMipMap: 1
+    sRGBTexture: 1
+    linearTexture: 0
+    fadeOut: 0
+    borderMipMap: 0
+    mipMapsPreserveCoverage: 0
+    alphaTestReferenceValue: 0.5
+    mipMapFadeDistanceStart: 1
+    mipMapFadeDistanceEnd: 3
+  bumpmap:
+    convertToNormalMap: 0
+    externalNormalMap: 0
+    heightScale: 0.25
+    normalMapFilter: 0
+  isReadable: 0
+  streamingMipmaps: 0
+  streamingMipmapsPriority: 0
+  grayScaleToAlpha: 0
+  generateCubemap: 6
+  cubemapConvolution: 0
+  seamlessCubemap: 0
+  textureFormat: 1
+  maxTextureSize: 2048
+  textureSettings:
+    serializedVersion: 2
+    filterMode: -1
+    aniso: -1
+    mipBias: -100
+    wrapU: -1
+    wrapV: -1
+    wrapW: -1
+  nPOTScale: 1
+  lightmap: 0
+  compressionQuality: 50
+  spriteMode: 0
+  spriteExtrude: 1
+  spriteMeshType: 1
+  alignment: 0
+  spritePivot: {x: 0.5, y: 0.5}
+  spritePixelsToUnits: 100
+  spriteBorder: {x: 0, y: 0, z: 0, w: 0}
+  spriteGenerateFallbackPhysicsShape: 1
+  alphaUsage: 1
+  alphaIsTransparency: 0
+  spriteTessellationDetail: -1
+  textureType: 0
+  textureShape: 1
+  singleChannelComponent: 0
+  maxTextureSizeSet: 0
+  compressionQualitySet: 0
+  textureFormatSet: 0
+  applyGammaDecoding: 0
+  platformSettings:
+  - serializedVersion: 3
+    buildTarget: DefaultTexturePlatform
+    maxTextureSize: 2048
+    resizeAlgorithm: 0
+    textureFormat: -1
+    textureCompression: 1
+    compressionQuality: 50
+    crunchedCompression: 0
+    allowsAlphaSplitting: 0
+    overridden: 0
+    androidETC2FallbackOverride: 0
+    forceMaximumCompressionQuality_BC6H_BC7: 0
+  spriteSheet:
+    serializedVersion: 2
+    sprites: []
+    outline: []
+    physicsShape: []
+    bones: []
+    spriteID: 
+    internalID: 0
+    vertices: []
+    indices: 
+    edges: []
+    weights: []
+    secondaryTextures: []
+  spritePackingTag: 
+  pSDRemoveMatte: 0
+  pSDShowRemoveMatteOption: 0
+  userData: 
+  assetBundleName: 
+  assetBundleVariant: 

BIN
Editor/Icons/OnTriggerEnterGameActionTriggerIcon.png


+ 92 - 0
Editor/Icons/OnTriggerEnterGameActionTriggerIcon.png.meta

@@ -0,0 +1,92 @@
+fileFormatVersion: 2
+guid: 284de289369cd534d9ee27114e94a3d0
+TextureImporter:
+  internalIDToNameTable: []
+  externalObjects: {}
+  serializedVersion: 11
+  mipmaps:
+    mipMapMode: 0
+    enableMipMap: 1
+    sRGBTexture: 1
+    linearTexture: 0
+    fadeOut: 0
+    borderMipMap: 0
+    mipMapsPreserveCoverage: 0
+    alphaTestReferenceValue: 0.5
+    mipMapFadeDistanceStart: 1
+    mipMapFadeDistanceEnd: 3
+  bumpmap:
+    convertToNormalMap: 0
+    externalNormalMap: 0
+    heightScale: 0.25
+    normalMapFilter: 0
+  isReadable: 0
+  streamingMipmaps: 0
+  streamingMipmapsPriority: 0
+  grayScaleToAlpha: 0
+  generateCubemap: 6
+  cubemapConvolution: 0
+  seamlessCubemap: 0
+  textureFormat: 1
+  maxTextureSize: 2048
+  textureSettings:
+    serializedVersion: 2
+    filterMode: -1
+    aniso: -1
+    mipBias: -100
+    wrapU: -1
+    wrapV: -1
+    wrapW: -1
+  nPOTScale: 1
+  lightmap: 0
+  compressionQuality: 50
+  spriteMode: 0
+  spriteExtrude: 1
+  spriteMeshType: 1
+  alignment: 0
+  spritePivot: {x: 0.5, y: 0.5}
+  spritePixelsToUnits: 100
+  spriteBorder: {x: 0, y: 0, z: 0, w: 0}
+  spriteGenerateFallbackPhysicsShape: 1
+  alphaUsage: 1
+  alphaIsTransparency: 0
+  spriteTessellationDetail: -1
+  textureType: 0
+  textureShape: 1
+  singleChannelComponent: 0
+  maxTextureSizeSet: 0
+  compressionQualitySet: 0
+  textureFormatSet: 0
+  applyGammaDecoding: 0
+  platformSettings:
+  - serializedVersion: 3
+    buildTarget: DefaultTexturePlatform
+    maxTextureSize: 2048
+    resizeAlgorithm: 0
+    textureFormat: -1
+    textureCompression: 1
+    compressionQuality: 50
+    crunchedCompression: 0
+    allowsAlphaSplitting: 0
+    overridden: 0
+    androidETC2FallbackOverride: 0
+    forceMaximumCompressionQuality_BC6H_BC7: 0
+  spriteSheet:
+    serializedVersion: 2
+    sprites: []
+    outline: []
+    physicsShape: []
+    bones: []
+    spriteID: 
+    internalID: 0
+    vertices: []
+    indices: 
+    edges: []
+    weights: []
+    secondaryTextures: []
+  spritePackingTag: 
+  pSDRemoveMatte: 0
+  pSDShowRemoveMatteOption: 0
+  userData: 
+  assetBundleName: 
+  assetBundleVariant: 

BIN
Editor/Icons/WaitGameActionIcon.png


+ 92 - 0
Editor/Icons/WaitGameActionIcon.png.meta

@@ -0,0 +1,92 @@
+fileFormatVersion: 2
+guid: 7b846f9b290d0dc429ebcac4d9c065d8
+TextureImporter:
+  internalIDToNameTable: []
+  externalObjects: {}
+  serializedVersion: 11
+  mipmaps:
+    mipMapMode: 0
+    enableMipMap: 1
+    sRGBTexture: 1
+    linearTexture: 0
+    fadeOut: 0
+    borderMipMap: 0
+    mipMapsPreserveCoverage: 0
+    alphaTestReferenceValue: 0.5
+    mipMapFadeDistanceStart: 1
+    mipMapFadeDistanceEnd: 3
+  bumpmap:
+    convertToNormalMap: 0
+    externalNormalMap: 0
+    heightScale: 0.25
+    normalMapFilter: 0
+  isReadable: 0
+  streamingMipmaps: 0
+  streamingMipmapsPriority: 0
+  grayScaleToAlpha: 0
+  generateCubemap: 6
+  cubemapConvolution: 0
+  seamlessCubemap: 0
+  textureFormat: 1
+  maxTextureSize: 2048
+  textureSettings:
+    serializedVersion: 2
+    filterMode: -1
+    aniso: -1
+    mipBias: -100
+    wrapU: -1
+    wrapV: -1
+    wrapW: -1
+  nPOTScale: 1
+  lightmap: 0
+  compressionQuality: 50
+  spriteMode: 0
+  spriteExtrude: 1
+  spriteMeshType: 1
+  alignment: 0
+  spritePivot: {x: 0.5, y: 0.5}
+  spritePixelsToUnits: 100
+  spriteBorder: {x: 0, y: 0, z: 0, w: 0}
+  spriteGenerateFallbackPhysicsShape: 1
+  alphaUsage: 1
+  alphaIsTransparency: 0
+  spriteTessellationDetail: -1
+  textureType: 0
+  textureShape: 1
+  singleChannelComponent: 0
+  maxTextureSizeSet: 0
+  compressionQualitySet: 0
+  textureFormatSet: 0
+  applyGammaDecoding: 0
+  platformSettings:
+  - serializedVersion: 3
+    buildTarget: DefaultTexturePlatform
+    maxTextureSize: 2048
+    resizeAlgorithm: 0
+    textureFormat: -1
+    textureCompression: 1
+    compressionQuality: 50
+    crunchedCompression: 0
+    allowsAlphaSplitting: 0
+    overridden: 0
+    androidETC2FallbackOverride: 0
+    forceMaximumCompressionQuality_BC6H_BC7: 0
+  spriteSheet:
+    serializedVersion: 2
+    sprites: []
+    outline: []
+    physicsShape: []
+    bones: []
+    spriteID: 
+    internalID: 0
+    vertices: []
+    indices: 
+    edges: []
+    weights: []
+    secondaryTextures: []
+  spritePackingTag: 
+  pSDRemoveMatte: 0
+  pSDShowRemoveMatteOption: 0
+  userData: 
+  assetBundleName: 
+  assetBundleVariant: 

+ 32 - 0
Readme.md

@@ -0,0 +1,32 @@
+# 📦 KairoEngine.Core v0.1.3
+
+This contains the base code that other packages will use. It includes code for the module system, event system and common interfaces.
+
+### 🛑Required packages
+
+- ``Sirenix.OdinInspector``
+- `zenject`
+- `UniRX`
+- `QFSW.MOP2`
+- ``Unity.Mathmatics``
+
+### 🔷Components
+
+- ``GameInstaller``
+
+### 📑Templates
+
+- **Game Config** – Scriptable object template that holds data about modules and the game. Each game will have its own game config with different module settings.
+
+### 📄Namespaces
+
+- `KairoEngine.Core`
+
+- `KairoEngine.Core.ModuleSystem`
+
+### 🎈Back Log
+
+- [ ] Game State register and check
+  Ex: Check if game is paused, Check if player input is allowed...
+
+- [ ] Move ``UiInputBlocker`` from the **UI** package to this package.

+ 7 - 0
Readme.md.meta

@@ -0,0 +1,7 @@
+fileFormatVersion: 2
+guid: bbfb4aa2ff4f3284381f99bbb92222ee
+TextScriptImporter:
+  externalObjects: {}
+  userData: 
+  assetBundleName: 
+  assetBundleVariant: 

+ 8 - 0
Runtime.meta

@@ -0,0 +1,8 @@
+fileFormatVersion: 2
+guid: 5c18f9506f824f74d9c8f169f9860106
+folderAsset: yes
+DefaultImporter:
+  externalObjects: {}
+  userData: 
+  assetBundleName: 
+  assetBundleVariant: 

+ 99 - 0
Runtime/ActionController.cs

@@ -0,0 +1,99 @@
+using System.Collections;
+using System.Collections.Generic;
+using UnityEngine;
+using Sirenix.OdinInspector;
+
+namespace KairoEngine.Core
+{
+    public class ActionController : MonoBehaviour
+    {
+        [ShowInInspector]
+        private List<IAction> actionList;
+        
+        void Start()
+        {
+            actionList = new List<IAction>();
+        }
+
+        void Update()
+        {
+            // Remove actions that are done
+            for (int i = 0; i < actionList.Count; i++)
+            {
+                if(actionList[i].IsDone()) 
+                {
+                    actionList.RemoveAt(i);
+                    i -= 1;
+                }
+            }
+            // Run Update on all actions
+            for (int i = 0; i < actionList.Count; i++)
+            {
+                actionList[i].Update();
+            }
+            
+        }
+
+        public void AddAction(IAction action)
+        {
+            if(actionList == null || action == null) return;
+            action.Start();
+            actionList.Add(action);
+        }
+        public bool HasAction(IAction action)
+        {
+            if(actionList == null) return false;
+            for (int i = 0; i < actionList.Count; i++)
+            {
+                if(actionList[i].GetType().ToString() == action.GetType().ToString())
+                {
+                    return true;
+                }
+            }
+            return false;
+        }
+        public bool IsActionDone(IAction action)
+        {
+            for (int i = 0; i < actionList.Count; i++)
+            {
+                if(actionList[i] == action)
+                {
+                    return actionList[i].IsDone();
+                }
+            }
+            return false;
+        }
+        public void ChangeAction(IAction action)
+        {
+            for (int i = 0; i < actionList.Count; i++)
+            {
+                if(actionList[i].GetType() == action.GetType())
+                {
+                    actionList[i] = action;
+                    //actionList[i].Start();
+                }
+            }
+        }
+
+        public void CancelAction(string actionType)
+        {
+            for (int i = 0; i < actionList.Count; i++)
+            {
+                if(actionList[i].GetType().ToString() == "kairoEngine." + actionType)
+                {
+                    actionList[i].End();
+                }
+            }
+        }
+
+        public void CancelActions()
+        {
+            if(actionList == null) return;
+            for (int i = 0; i < actionList.Count; i++)
+            {
+                actionList[i].End();
+            }
+            actionList = new List<IAction>();
+        }
+    }
+}

+ 11 - 0
Runtime/ActionController.cs.meta

@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: 6c55fbecc97944d41ae33f9afa1e3540
+MonoImporter:
+  externalObjects: {}
+  serializedVersion: 2
+  defaultReferences: []
+  executionOrder: 0
+  icon: {instanceID: 0}
+  userData: 
+  assetBundleName: 
+  assetBundleVariant: 

+ 8 - 0
Runtime/Attributes.meta

@@ -0,0 +1,8 @@
+fileFormatVersion: 2
+guid: 5154e2022601f5340acc95459d4a3a67
+folderAsset: yes
+DefaultImporter:
+  externalObjects: {}
+  userData: 
+  assetBundleName: 
+  assetBundleVariant: 

+ 28 - 0
Runtime/Attributes/IconFoldoutGroupAttribute.cs

@@ -0,0 +1,28 @@
+using System;
+using Sirenix.OdinInspector;
+
+namespace KairoEngine.Core
+{
+    public class IconFoldoutGroupAttribute : PropertyGroupAttribute
+    {
+
+        public string iconPath;
+        public string text;
+
+        public IconFoldoutGroupAttribute(string path) : base(path) { }
+
+        public IconFoldoutGroupAttribute(string path, string iconPath) : base(path) 
+        { 
+            this.text = path;
+            this.iconPath = iconPath;
+        }
+
+        protected override void CombineValuesWith(PropertyGroupAttribute other)
+        {
+            var otherAttr = (IconFoldoutGroupAttribute)other;
+        }
+
+    }
+}
+
+

+ 11 - 0
Runtime/Attributes/IconFoldoutGroupAttribute.cs.meta

@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: 63a42968731a8c8468da213155bf194a
+MonoImporter:
+  externalObjects: {}
+  serializedVersion: 2
+  defaultReferences: []
+  executionOrder: 0
+  icon: {instanceID: 0}
+  userData: 
+  assetBundleName: 
+  assetBundleVariant: 

+ 8 - 0
Runtime/BuildTools.meta

@@ -0,0 +1,8 @@
+fileFormatVersion: 2
+guid: e9380a4157c528b489e0ba0b97754f2a
+folderAsset: yes
+DefaultImporter:
+  externalObjects: {}
+  userData: 
+  assetBundleName: 
+  assetBundleVariant: 

+ 13 - 0
Runtime/BuildTools/BuildConfig.cs

@@ -0,0 +1,13 @@
+using System.Collections;
+using System.Collections.Generic;
+using UnityEngine;
+
+namespace KairoEngine.Core
+{
+    [System.Serializable]
+    public class BuildConfig
+    {
+        public string appName;
+        public string version = "1.0.0";
+    }
+}

+ 11 - 0
Runtime/BuildTools/BuildConfig.cs.meta

@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: 3524494a429e929418bb3ee8ead8b454
+MonoImporter:
+  externalObjects: {}
+  serializedVersion: 2
+  defaultReferences: []
+  executionOrder: 0
+  icon: {instanceID: 0}
+  userData: 
+  assetBundleName: 
+  assetBundleVariant: 

+ 29 - 0
Runtime/CommandInvoker.cs

@@ -0,0 +1,29 @@
+using System.Collections;
+using System.Collections.Generic;
+using UnityEngine;
+
+namespace KairoEngine.Core
+{
+    public class CommandInvoker : MonoBehaviour
+    {
+        static Queue<ICommand> commandBuffer;
+
+        private void Awake()
+        {
+            commandBuffer = new Queue<ICommand>();
+        }
+
+        public static void AddCommand(ICommand command)
+        {
+            commandBuffer.Enqueue(command);
+        }
+        void Update()
+        {
+            while(commandBuffer.Count > 0)
+            {
+                ICommand command = commandBuffer.Dequeue();
+                command.Execute();
+            }
+        }
+    }
+}

+ 11 - 0
Runtime/CommandInvoker.cs.meta

@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: 16568fa158860d54b8cc31ae22cbadb7
+MonoImporter:
+  externalObjects: {}
+  serializedVersion: 2
+  defaultReferences: []
+  executionOrder: 0
+  icon: {instanceID: 0}
+  userData: 
+  assetBundleName: 
+  assetBundleVariant: 

+ 8 - 0
Runtime/Commands.meta

@@ -0,0 +1,8 @@
+fileFormatVersion: 2
+guid: 45c84c479913906448d8763cd22cecaf
+folderAsset: yes
+DefaultImporter:
+  externalObjects: {}
+  userData: 
+  assetBundleName: 
+  assetBundleVariant: 

+ 26 - 0
Runtime/Commands/ObjectChangePositionCommand.cs

@@ -0,0 +1,26 @@
+using System.Collections;
+using System.Collections.Generic;
+using UnityEngine;
+
+namespace KairoEngine.Core
+{
+    public class ObjectChangePositionCommand : ICommand
+    {
+        GameObject obj;
+        Vector3 position;
+        Quaternion rotation;
+
+        public ObjectChangePositionCommand(GameObject obj, Vector3 position, Quaternion rotation)
+        {
+            this.obj = obj;
+            this.position = position;
+            this.rotation = rotation;
+        }
+
+        public void Execute()
+        {
+            obj.transform.position = position;
+            obj.transform.rotation = rotation;
+        }
+    }
+}

+ 11 - 0
Runtime/Commands/ObjectChangePositionCommand.cs.meta

@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: 8e63793e03c45de498ae3587a002d9e4
+MonoImporter:
+  externalObjects: {}
+  serializedVersion: 2
+  defaultReferences: []
+  executionOrder: 0
+  icon: {instanceID: 0}
+  userData: 
+  assetBundleName: 
+  assetBundleVariant: 

+ 12 - 0
Runtime/ConditionType.cs

@@ -0,0 +1,12 @@
+using System.Collections;
+using System.Collections.Generic;
+using UnityEngine;
+
+namespace KairoEngine.Core
+{
+ public enum ConditionType
+ {
+     AND,
+     OR
+ }
+}

+ 11 - 0
Runtime/ConditionType.cs.meta

@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: c1b3d794fb0925946a05668f9cb5b06e
+MonoImporter:
+  externalObjects: {}
+  serializedVersion: 2
+  defaultReferences: []
+  executionOrder: 0
+  icon: {instanceID: 0}
+  userData: 
+  assetBundleName: 
+  assetBundleVariant: 

+ 8 - 0
Runtime/ConfigOptions.meta

@@ -0,0 +1,8 @@
+fileFormatVersion: 2
+guid: fcd9cc79452ac6c428c006eda8fe7f15
+folderAsset: yes
+DefaultImporter:
+  externalObjects: {}
+  userData: 
+  assetBundleName: 
+  assetBundleVariant: 

+ 36 - 0
Runtime/ConfigOptions/ConfigOptionBase.cs

@@ -0,0 +1,36 @@
+using System.Collections;
+using System.Collections.Generic;
+using UnityEngine;
+using Sirenix.OdinInspector;
+
+namespace KairoEngine.Core.ConfigOptions
+{
+    public class ConfigOptionBase : ScriptableObject, IConfigOption
+    {
+            [PropertyOrder(0), HorizontalGroup("id")] public string title;
+            [PropertyOrder(1), HorizontalGroup("id", 0.3f), HideLabel] public string id;
+            [PropertyOrder(3)] public ConfigOptionUIType uiElementType;
+
+            public virtual ConfigOptionUiData GetUiData()
+            {
+                throw new System.NotImplementedException();
+            }
+
+            public virtual void LoadValue(bool debug)
+            {
+                throw new System.NotImplementedException();
+            }
+
+            public virtual void SetDefaultValue()
+            {
+                throw new System.NotImplementedException();
+            }
+
+            public virtual void SetValue(ConfigOptionData data, bool save = false)
+            {
+                throw new System.NotImplementedException();
+            }
+
+    }
+
+}

+ 11 - 0
Runtime/ConfigOptions/ConfigOptionBase.cs.meta

@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: 3d6594de60e26af44a201d92d0bbd831
+MonoImporter:
+  externalObjects: {}
+  serializedVersion: 2
+  defaultReferences: []
+  executionOrder: 0
+  icon: {instanceID: 0}
+  userData: 
+  assetBundleName: 
+  assetBundleVariant: 

+ 23 - 0
Runtime/ConfigOptions/ConfigOptionData.cs

@@ -0,0 +1,23 @@
+using System.Collections;
+using System.Collections.Generic;
+using UnityEngine;
+
+namespace KairoEngine.Core.ConfigOptions
+{
+    [System.Serializable]
+    public class ConfigOptionData
+    {
+        public string stringValue1;
+        public string stringValue2;
+        public int intValue;
+        public float floatValue;
+
+        public ConfigOptionData(string stringValue1, string stringValue2, int intValue, float floatValue)
+        {
+            this.stringValue1 = stringValue1;
+            this.stringValue2 = stringValue2;
+            this.intValue = intValue;
+            this.floatValue = floatValue;
+        }
+    }
+}

+ 11 - 0
Runtime/ConfigOptions/ConfigOptionData.cs.meta

@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: 48a2f399702d0fd4fb37bdf41f751aa8
+MonoImporter:
+  externalObjects: {}
+  serializedVersion: 2
+  defaultReferences: []
+  executionOrder: 0
+  icon: {instanceID: 0}
+  userData: 
+  assetBundleName: 
+  assetBundleVariant: 

+ 73 - 0
Runtime/ConfigOptions/ConfigOptionUiData.cs

@@ -0,0 +1,73 @@
+using System.Collections;
+using System.Collections.Generic;
+using UnityEngine;
+
+namespace KairoEngine.Core.ConfigOptions
+{
+    [System.Serializable]
+    public class ConfigOptionUiData
+    {
+        public string name;
+        public string description;
+        public ConfigOptionUIType uiElementType;
+        public SliderData sliderData;
+        public CheckboxData checkboxData;
+        public DropdownData dropdownData;
+        
+        [System.Serializable] public class SliderData
+        {
+            public float minValue, maxValue, currentValue;
+            public SliderData(float minValue, float maxValue, float currentValue)
+            {
+                this.minValue = minValue;
+                this.maxValue = maxValue;
+                this.currentValue = currentValue;
+            }
+        }
+        [System.Serializable] public class CheckboxData
+        {
+            public bool currentValue;
+
+            public CheckboxData(bool value)
+            {
+                this.currentValue = value;
+            }
+        }
+
+        [System.Serializable] public class DropdownData
+        {
+            public int currentValue;
+            public List<string> options;
+
+            public DropdownData(int currentValue, List<string> options)
+            {
+                this.currentValue = currentValue;
+                this.options = options;
+            }
+        }
+
+        public ConfigOptionUiData(string name, string description, SliderData sliderData)
+        {
+            this.name = name;
+            this.description = description;
+            this.uiElementType = ConfigOptionUIType.Slider;
+            this.sliderData = sliderData;
+        }
+
+        public ConfigOptionUiData(string name, string description,  CheckboxData checkboxData)
+        {
+            this.name = name;
+            this.description = description;
+            this.uiElementType = ConfigOptionUIType.Checkbox;
+            this.checkboxData = checkboxData;
+        }
+
+        public ConfigOptionUiData(string name, string description, DropdownData dropdownData)
+        {
+            this.name = name;
+            this.description = description;
+            this.uiElementType = ConfigOptionUIType.Dropdown;
+            this.dropdownData = dropdownData;
+        }
+    }
+}

+ 11 - 0
Runtime/ConfigOptions/ConfigOptionUiData.cs.meta

@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: b00a44af08753d54aa6de6f3c5cf7643
+MonoImporter:
+  externalObjects: {}
+  serializedVersion: 2
+  defaultReferences: []
+  executionOrder: 0
+  icon: {instanceID: 0}
+  userData: 
+  assetBundleName: 
+  assetBundleVariant: 

+ 26 - 0
Runtime/ConfigOptions/ConfigOptionsManager.cs

@@ -0,0 +1,26 @@
+using System.Collections;
+using System.Collections.Generic;
+using UnityEngine;
+using Sirenix.OdinInspector;
+
+namespace KairoEngine.Core.ConfigOptions
+{
+    [System.Serializable]
+    public class ConfigOptionsManager
+    {
+        
+        [ShowInInspector, LabelText("Configuration"), PropertySpace(4,4)] public List<ConfigOptionBase> list = new List<ConfigOptionBase>();
+        [LabelText("Debug config loading")] public bool debug = false;
+
+        public static void SetConfigOption(string title, ConfigOptionData data)
+        {
+
+        }
+
+        public static void SetConfigOptionToDefault(string title)
+        {
+
+        }
+    }
+
+}

+ 11 - 0
Runtime/ConfigOptions/ConfigOptionsManager.cs.meta

@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: a72b070dcd5d9594483fe9c65ae0c159
+MonoImporter:
+  externalObjects: {}
+  serializedVersion: 2
+  defaultReferences: []
+  executionOrder: 0
+  icon: {instanceID: 0}
+  userData: 
+  assetBundleName: 
+  assetBundleVariant: 

+ 25 - 0
Runtime/ConfigOptions/IConfigOption.cs

@@ -0,0 +1,25 @@
+using System.Collections;
+using System.Collections.Generic;
+using UnityEngine;
+
+namespace KairoEngine.Core.ConfigOptions
+{
+    public enum ConfigOptionUIType
+    {
+        Slider,
+        Checkbox,
+        Dropdown,
+        KeyMapping,
+        Text
+    }
+
+    public interface IConfigOption
+    {
+        void SetDefaultValue();
+        void LoadValue(bool debug);
+        void SetValue(ConfigOptionData data, bool save = false);
+        ConfigOptionUiData GetUiData();
+    }
+}
+
+

+ 11 - 0
Runtime/ConfigOptions/IConfigOption.cs.meta

@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: 01a0716d50c44b248821ddecf318fe3a
+MonoImporter:
+  externalObjects: {}
+  serializedVersion: 2
+  defaultReferences: []
+  executionOrder: 0
+  icon: {instanceID: 0}
+  userData: 
+  assetBundleName: 
+  assetBundleVariant: 

+ 8 - 0
Runtime/ConfigOptions/Templates.meta

@@ -0,0 +1,8 @@
+fileFormatVersion: 2
+guid: 00aa3949c1f04ce408b98921988b29c8
+folderAsset: yes
+DefaultImporter:
+  externalObjects: {}
+  userData: 
+  assetBundleName: 
+  assetBundleVariant: 

+ 62 - 0
Runtime/ConfigOptions/Templates/FullscreenConfigOption.cs

@@ -0,0 +1,62 @@
+using System.Collections;
+using System.Collections.Generic;
+using UnityEngine;
+using Sirenix.OdinInspector;
+using UnityEngine.Audio;
+
+namespace KairoEngine.Core.ConfigOptions
+{
+    [CreateAssetMenu(fileName = "FullscreenConfigOption", menuName = "KairoEngine/ConfigOptions/Fullscreen", order = 3), HideMonoScript]
+    public class FullscreenConfigOption : ConfigOptionBase
+    {
+        [PropertyOrder(5)] public bool defaultIsFullscreen = true;
+        [PropertyOrder(6), TextArea(), HideLabel, PropertySpace(4,0)] public string description;
+
+        private bool isFullscreen = true;
+        private bool showDebug = false;
+
+        public override ConfigOptionUiData GetUiData()
+        {
+            var checkboxData = new ConfigOptionUiData.CheckboxData(defaultIsFullscreen);
+            return new ConfigOptionUiData(title, description, checkboxData);
+        }
+
+        public override void LoadValue(bool debug)
+        {
+            isFullscreen  = PlayerPrefs.GetInt(id, defaultIsFullscreen ? 1 : 0) == 1 ? true : false;
+            showDebug = debug;
+            ApplyConfig();
+        }
+
+        public override void SetDefaultValue()
+        {
+            isFullscreen = defaultIsFullscreen;
+            PlayerPrefs.SetInt(id, isFullscreen ? 1 : 0);
+            ApplyConfig();
+        }
+
+        public override void SetValue(ConfigOptionData data, bool save = false)
+        {
+            isFullscreen = data.intValue == 1 ? true : false;
+            ApplyConfig();
+            if(save) PlayerPrefs.SetInt(id, data.intValue);
+        }
+
+        private void ApplyConfig() 
+        {
+            if(Screen.fullScreen != isFullscreen)
+            {
+                Screen.fullScreen = isFullscreen;
+                if(showDebug) Debug.Log($"Changed display mode to {(Screen.fullScreen ? "fullscreen" : "windowed")}");
+            } 
+            else if(showDebug) Debug.Log($"Display mode is already set to {(Screen.fullScreen ? "fullscreen" : "windowed")}");
+        }
+
+        [Button("Apply Default"), PropertyOrder(100), PropertySpace(4,4)]
+        private void ApplyDefaultConfig()
+        {
+            isFullscreen = defaultIsFullscreen;
+            ApplyConfig();
+        }
+    }
+}

+ 11 - 0
Runtime/ConfigOptions/Templates/FullscreenConfigOption.cs.meta

@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: f05749329da301645bce9f5a7474b5d6
+MonoImporter:
+  externalObjects: {}
+  serializedVersion: 2
+  defaultReferences: []
+  executionOrder: 0
+  icon: {instanceID: 0}
+  userData: 
+  assetBundleName: 
+  assetBundleVariant: 

+ 130 - 0
Runtime/ConfigOptions/Templates/ScreenResolutionConfigOption.cs

@@ -0,0 +1,130 @@
+using System.Collections;
+using System.Collections.Generic;
+using UnityEngine;
+using Sirenix.OdinInspector;
+using UnityEngine.UI;
+
+namespace KairoEngine.Core.ConfigOptions
+{
+    [CreateAssetMenu(fileName = "ScreenResolutionConfigOption", menuName = "KairoEngine/ConfigOptions/Screen Resolution", order = 1), HideMonoScript]
+    public class ScreenResolutionConfigOption : ConfigOptionBase
+    {
+        [PropertyOrder(10)] public int defaultResolutionIndex;
+
+        [PropertyOrder(11), ListDrawerSettings(ShowPaging = false), PropertySpace(4,4)]
+        public List<ResolutionData> resolutionList;
+        [PropertyOrder(12), TextArea(), HideLabel, PropertySpace(0, 4)] public string description;
+        private int currentResolutionIndex;
+        private bool showDebug = false;
+
+        public override ConfigOptionUiData GetUiData()
+        {
+            var options = new List<string>();
+            for (int i = 0; i < resolutionList.Count; i++)
+            {
+                options.Add(resolutionList[i].title);
+            }
+            var dropdownData = new ConfigOptionUiData.DropdownData(currentResolutionIndex, options);
+            return new ConfigOptionUiData(title, description, dropdownData);
+        }
+
+        public override void LoadValue(bool debug)
+        {
+            currentResolutionIndex  = PlayerPrefs.GetInt(id, defaultResolutionIndex);
+            showDebug = debug;
+            ApplyConfig();
+            //if(debug) Debug.Log($"{title} changed to {resolutionList[currentResolutionIndex].title}.");
+        }
+
+        public override void SetDefaultValue()
+        {
+            currentResolutionIndex = defaultResolutionIndex;
+            PlayerPrefs.SetInt(id, currentResolutionIndex);
+            ApplyConfig();
+        }
+
+        public override void SetValue(ConfigOptionData data, bool save = false)
+        {
+            PlayerPrefs.SetInt(id, data.intValue);
+            currentResolutionIndex = data.intValue;
+            ApplyConfig();
+            if(save) PlayerPrefs.SetFloat(id, currentResolutionIndex);
+        }
+
+        private void ApplyConfig() 
+        {
+            Resolution res = resolutionList[currentResolutionIndex].ToResolution();
+            if(Screen.currentResolution.ToString() != res.ToString())
+            {
+                Screen.SetResolution(res.width, res.height, Screen.fullScreen, res.refreshRate);
+                if(showDebug) Debug.Log($"Changing resolution to {res.ToString()}");
+            }
+            else if(showDebug) Debug.Log($"Current resolution is already set to {res.ToString()}");
+        }
+
+        [Button("Apply Default"), PropertyOrder(13), ButtonGroup("Actions")]
+        private void ApplyDefaultConfig()
+        {
+            currentResolutionIndex = defaultResolutionIndex;
+            ApplyConfig();
+        }
+
+        [Button("Reset Resolution List"), PropertyOrder(14), ButtonGroup("Actions")]
+        private void SetResolutions() 
+        {
+            resolutionList.Clear();
+            var resolutions = FilteredResolutions();
+            for (int i = 0; i < resolutions.Length; i++)
+            {
+                var res = resolutions[i];
+                resolutionList.Add(new ResolutionData(res.ToString(), res.width, res.height, res.refreshRate));
+            }
+        }
+
+        private Resolution[] FilteredResolutions()
+        {
+            Resolution[] resolutions = Screen.resolutions;
+            List<Resolution> filtered = new List<Resolution>();
+            for (int i = 0; i < resolutions.Length; i++)
+            {
+                if(resolutions[i].refreshRate == 59) continue;
+                if(resolutions[i].refreshRate == 50) continue;
+                if(resolutions[i].refreshRate == 30) continue;
+                if(resolutions[i].refreshRate == 29) continue;
+                if(resolutions[i].refreshRate == 25) continue;
+                if(resolutions[i].refreshRate == 24) continue;
+                if(resolutions[i].refreshRate == 23) continue;
+                filtered.Add(resolutions[i]);
+            }
+            return filtered.ToArray();
+        }
+
+        [System.Serializable]
+        public class ResolutionData
+        {
+            [ReadOnly, HideLabel] public string title;
+            [HideInInspector] public int width;
+
+            [HideInInspector] public int height;
+
+            [HideInInspector] public int refreshRate;
+
+            public ResolutionData(string title, int width, int height, int refreshRate)
+            {
+                this.title = title;
+                this.width = width;
+                this.height = height;
+                this.refreshRate = refreshRate;
+            }
+
+            public Resolution ToResolution()
+            {
+                var res = new Resolution();
+                res.width = this.width;
+                res.height = this.height;
+                res.refreshRate = this.refreshRate;
+                return res;
+            }
+        }
+    }
+}

+ 11 - 0
Runtime/ConfigOptions/Templates/ScreenResolutionConfigOption.cs.meta

@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: 5f1b92c2a9f7fbc4d8cae56a5eff4c10
+MonoImporter:
+  externalObjects: {}
+  serializedVersion: 2
+  defaultReferences: []
+  executionOrder: 0
+  icon: {instanceID: 0}
+  userData: 
+  assetBundleName: 
+  assetBundleVariant: 

+ 64 - 0
Runtime/ConfigOptions/Templates/VolumeConfigOption.cs

@@ -0,0 +1,64 @@
+using System.Collections;
+using System.Collections.Generic;
+using UnityEngine;
+using Sirenix.OdinInspector;
+using UnityEngine.Audio;
+
+namespace KairoEngine.Core.ConfigOptions
+{
+    [CreateAssetMenu(fileName = "VolumeConfigOption", menuName = "KairoEngine/ConfigOptions/Volume", order = 1), HideMonoScript]
+    public class VolumeConfigOption : ConfigOptionBase
+    {
+        [PropertyOrder(4)] public AudioMixerGroup audioMixerChannel;
+        [PropertyOrder(4)] public AudioMixer masterMixer;
+        [PropertyOrder(5), Range(0.0001f, 1f)] public float defaultVolume;
+        [PropertyOrder(6), TextArea(), HideLabel, PropertySpace(4,0)] public string description;
+        private float currentVolume = 0;
+        
+
+        public override ConfigOptionUiData GetUiData()
+        {
+            Debug.Log($"Current {title} is {currentVolume}");
+            var sliderData = new ConfigOptionUiData.SliderData(0.0001f, 1f, currentVolume);
+            return new ConfigOptionUiData(title, description, sliderData);
+        }
+
+        public override void LoadValue(bool debug)
+        {
+            currentVolume  = PlayerPrefs.GetFloat(id, defaultVolume);
+            masterMixer.GetFloat(id, out float oldVolume);
+            ApplyConfig();
+            masterMixer.GetFloat(id, out float newVolume);
+            if(debug) Debug.Log($"{title} changed from {Mathf.Pow(10, oldVolume/20).ToString("F2")} to {Mathf.Pow(10, newVolume/20).ToString("F2")}");
+        }
+
+        public override void SetDefaultValue()
+        {
+            currentVolume = defaultVolume;
+            PlayerPrefs.SetFloat(id, defaultVolume);
+            ApplyConfig();
+        }
+
+        public override void SetValue(ConfigOptionData data, bool save = false)
+        {
+            PlayerPrefs.SetFloat(id, data.floatValue);
+            currentVolume = data.floatValue;
+            ApplyConfig();
+            if(save) PlayerPrefs.SetFloat(id, currentVolume);
+        }
+
+        private void ApplyConfig() 
+        {
+            var value = Mathf.Log10(currentVolume) * 20f;   
+            bool worked = masterMixer.SetFloat(id, value);
+            if(worked == false) Debug.LogError($"Error setting volume for {title}");
+        }
+
+        [Button("Apply Default"), PropertyOrder(100), PropertySpace(4,4)]
+        private void ApplyDefaultConfig()
+        {
+            currentVolume = defaultVolume;
+            ApplyConfig();
+        }
+    }
+}

+ 11 - 0
Runtime/ConfigOptions/Templates/VolumeConfigOption.cs.meta

@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: 72cb82d20694d9d438842ea93b5b7771
+MonoImporter:
+  externalObjects: {}
+  serializedVersion: 2
+  defaultReferences: []
+  executionOrder: 0
+  icon: {instanceID: 0}
+  userData: 
+  assetBundleName: 
+  assetBundleVariant: 

+ 8 - 0
Runtime/EventManager.meta

@@ -0,0 +1,8 @@
+fileFormatVersion: 2
+guid: 54fb5abc77b643444849761344b6699e
+folderAsset: yes
+DefaultImporter:
+  externalObjects: {}
+  userData: 
+  assetBundleName: 
+  assetBundleVariant: 

+ 64 - 0
Runtime/EventManager/ActivityMessageEvents.cs

@@ -0,0 +1,64 @@
+using System.Collections;
+using System.Collections.Generic;
+using UnityEngine;
+
+namespace KairoEngine.Core
+{
+    public class ActivityMessageEvents
+    {
+        #region SimpleMessage
+        public static event System.Action<string> OnActivityMessage;
+        public static void Send(string text)
+        {
+            if(OnActivityMessage != null)
+            {
+                OnActivityMessage(text);
+            }
+        }
+        #endregion
+
+        #region TimedMessage
+        public static event System.Action<string, float> OnTimedActivityMessage;
+        public static void Send(string text, float time)
+        {
+            if(OnTimedActivityMessage != null)
+            {
+                OnTimedActivityMessage(text, time);
+            }
+        }
+        #endregion
+
+        #region StickyMessage
+        public static event System.Action<string, bool> OnStickyActivityMessage;
+        public static void Send(string text, bool sticky)
+        {
+            if(OnStickyActivityMessage != null)
+            {
+                OnStickyActivityMessage(text, sticky);
+            }
+        }
+        #endregion
+
+        #region UpdateMessage
+        public static event System.Action<string, string, float, bool> OnUpdateActivityMessage;
+        public static void Update(string oldText, string newText, float time, bool sticky)
+        {
+            if(OnUpdateActivityMessage != null)
+            {
+                OnUpdateActivityMessage(oldText, newText, time, sticky);
+            }
+        }
+        #endregion
+
+        #region RemoveMessage
+        public static event System.Action<string> OnRemoveActivityMessage;
+        public static void Remove(string text)
+        {
+            if(OnRemoveActivityMessage != null)
+            {
+                OnRemoveActivityMessage(text);
+            }
+        }
+        #endregion
+    }
+}

+ 11 - 0
Runtime/EventManager/ActivityMessageEvents.cs.meta

@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: a902fb1515a04a1469aefa281ca9e3a1
+MonoImporter:
+  externalObjects: {}
+  serializedVersion: 2
+  defaultReferences: []
+  executionOrder: 0
+  icon: {instanceID: 0}
+  userData: 
+  assetBundleName: 
+  assetBundleVariant: 

+ 12 - 0
Runtime/EventManager/EventManager.cs

@@ -0,0 +1,12 @@
+using System.Collections;
+using System.Collections.Generic;
+using UnityEngine;
+
+namespace KairoEngine.Core
+{
+    public static class EventManager
+    {
+        public static RequestEvents request = new RequestEvents();
+        public static GenericEvents broadcast = new GenericEvents();
+    }
+}

+ 11 - 0
Runtime/EventManager/EventManager.cs.meta

@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: b06aaa45853ebd5418b5d89e46582531
+MonoImporter:
+  externalObjects: {}
+  serializedVersion: 2
+  defaultReferences: []
+  executionOrder: 0
+  icon: {instanceID: 0}
+  userData: 
+  assetBundleName: 
+  assetBundleVariant: 

+ 20 - 0
Runtime/EventManager/EventResponse.cs

@@ -0,0 +1,20 @@
+using System.Collections;
+using System.Collections.Generic;
+using UnityEngine;
+
+namespace KairoEngine.Core
+{
+    public enum EventResponseStatus
+    {
+        OK,
+        NotFound,
+        EmptyResponse
+    }
+
+    public class EventResponse<T>
+    {
+        public EventResponseStatus status;
+        public T value;
+    }
+}
+

+ 11 - 0
Runtime/EventManager/EventResponse.cs.meta

@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: da729dd3d4c5abf4094111a78697e862
+MonoImporter:
+  externalObjects: {}
+  serializedVersion: 2
+  defaultReferences: []
+  executionOrder: 0
+  icon: {instanceID: 0}
+  userData: 
+  assetBundleName: 
+  assetBundleVariant: 

+ 19 - 0
Runtime/EventManager/FloatingMessageEvents.cs

@@ -0,0 +1,19 @@
+using System.Collections;
+using System.Collections.Generic;
+using UnityEngine;
+
+namespace KairoEngine.Core
+{
+    public class FloatingMessageEvents
+    {
+        public static event System.Action<string, Vector3, float, float, float> OnMessage;
+
+        public static void Send(string text, Vector3 pos, float offset, float time, float fontSize)
+        {
+            if(OnMessage != null)
+            {
+                OnMessage(text, pos, offset, time, fontSize);
+            }
+        }
+    }
+}

+ 11 - 0
Runtime/EventManager/FloatingMessageEvents.cs.meta

@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: c28c40b3eca6d8c4cbce494e9392bc30
+MonoImporter:
+  externalObjects: {}
+  serializedVersion: 2
+  defaultReferences: []
+  executionOrder: 0
+  icon: {instanceID: 0}
+  userData: 
+  assetBundleName: 
+  assetBundleVariant: 

+ 56 - 0
Runtime/EventManager/GamePlayEvents.cs

@@ -0,0 +1,56 @@
+using System.Collections;
+using System.Collections.Generic;
+using UnityEngine;
+
+namespace KairoEngine.Core
+{
+    public enum GameOverCause
+    {
+        Death,
+        Abandon,
+        Victory
+    }
+
+    public class GamePlayEvents
+    {
+        public static event System.Action OnGameStart;
+        public static event System.Action<GameOverCause> OnGameOver;
+
+        public static event System.Action OnGamePaused;
+
+        public static event System.Action OnGameUnpaused;
+
+        public static void GameStart()
+        {
+            if(OnGameStart != null)
+            {
+                OnGameStart();
+            }
+        }
+
+        public static void GameOver(GameOverCause cause)
+        {
+            if(OnGameOver != null)
+            {
+                OnGameOver(cause);
+            }
+        }
+
+        public static void GamePaused()
+        {
+            if(OnGamePaused != null)
+            {
+                OnGamePaused();
+            }
+        }
+
+        public static void GameUnpaused()
+        {
+            if(OnGameUnpaused != null)
+            {
+                OnGameUnpaused();
+            }
+        }
+
+    }
+}

+ 11 - 0
Runtime/EventManager/GamePlayEvents.cs.meta

@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: b57db46d61790754e8a14b47587c1a8c
+MonoImporter:
+  externalObjects: {}
+  serializedVersion: 2
+  defaultReferences: []
+  executionOrder: 0
+  icon: {instanceID: 0}
+  userData: 
+  assetBundleName: 
+  assetBundleVariant: 

+ 322 - 0
Runtime/EventManager/GenericEvents.cs

@@ -0,0 +1,322 @@
+using System.Collections;
+using System.Collections.Generic;
+using UnityEngine;
+
+namespace KairoEngine.Core
+{
+    public class GenericEvents
+    {
+        #region Empty_Event
+        
+        public static Dictionary<string, System.Action> list = new Dictionary<string, System.Action>();
+        
+        public static void StartListening(string title, System.Action listener)
+        {
+            System.Action action = null;
+            if (list.TryGetValue(title, out action))
+            {
+                action += listener;
+                list[title] = action;
+            }
+            else
+            {
+                action += listener;
+                list.Add(title, action);
+            }
+        }
+
+        public static void StopListening(string title, System.Action listener)
+        {
+            System.Action action = null;
+            if (list.TryGetValue(title, out action))
+            {
+                action -= listener;
+                list[title] = action;
+            }
+        }
+
+        public static void Trigger(string title)
+        {
+            System.Action action = null;
+            if (list.TryGetValue(title, out action))
+            {
+                if(action != null) action();
+            }
+        }
+        #endregion
+
+        #region String_Event
+        
+        public static Dictionary<string, System.Action<string>> listString = new Dictionary<string, System.Action<string>>();
+        
+        public static void StartListening(string title, System.Action<string> listener)
+        {
+            System.Action<string> action = null;
+            if (listString.TryGetValue(title, out action))
+            {
+                action += listener;
+                listString[title] = action;
+            }
+            else
+            {
+                action += listener;
+                listString.Add(title, action);
+            }
+        }
+
+        public static void StopListening(string title, System.Action<string> listener)
+        {
+            System.Action<string> action = null;
+            if (listString.TryGetValue(title, out action))
+            {
+                action -= listener;
+                listString[title] = action;
+            }
+        }
+
+        public static void Trigger(string title, string text)
+        {
+            System.Action<string> action = null;
+            if (listString.TryGetValue(title, out action))
+            {
+                if(action != null) action(text);
+            }
+        }
+
+        #endregion
+
+        #region Float_Event
+        
+        public static Dictionary<string, System.Action<float>> list2 = new Dictionary<string, System.Action<float>>();
+        
+        public static void StartListening(string title, System.Action<float> listener)
+        {
+            System.Action<float> action = null;
+            if (list2.TryGetValue(title, out action))
+            {
+                action += listener;
+                list2[title] = action;
+            }
+            else
+            {
+                action += listener;
+                list2.Add(title, action);
+            }
+        }
+
+        public static void StopListening(string title, System.Action<float> listener)
+        {
+            System.Action<float> action = null;
+            if (list2.TryGetValue(title, out action))
+            {
+                action -= listener;
+                list2[title] = action;
+            }
+        }
+
+        public static void Trigger(string title, float value)
+        {
+            System.Action<float> action = null;
+            if (list2.TryGetValue(title, out action))
+            {
+                if(action != null) action(value);
+            }
+        }
+        #endregion
+
+        #region Float_Float_Event
+        
+        public static Dictionary<string, System.Action<float, float>> list3 = new Dictionary<string, System.Action<float, float>>();
+        
+        public static void StartListening(string title, System.Action<float, float> listener)
+        {
+            System.Action<float, float> action = null;
+            if (list3.TryGetValue(title, out action))
+            {
+                action += listener;
+                list3[title] = action;
+            }
+            else
+            {
+                action += listener;
+                list3.Add(title, action);
+            }
+        }
+
+        public static void StopListening(string title, System.Action<float, float> listener)
+        {
+            System.Action<float, float> action = null;
+            if (list3.TryGetValue(title, out action))
+            {
+                action -= listener;
+                list3[title] = action;
+            }
+        }
+
+        public static void Trigger(string title, float value1, float value2)
+        {
+            System.Action<float, float> action = null;
+            if (list3.TryGetValue(title, out action))
+            {
+                if(action != null) action(value1, value2);
+            }
+        }
+        #endregion
+
+        #region Int_Event
+        
+        public static Dictionary<string, System.Action<int>> list4 = new Dictionary<string, System.Action<int>>();
+        
+        public static void StartListening(string title, System.Action<int> listener)
+        {
+            System.Action<int> action = null;
+            if (list4.TryGetValue(title, out action))
+            {
+                action += listener;
+                list4[title] = action;
+            }
+            else
+            {
+                action += listener;
+                list4.Add(title, action);
+            }
+        }
+
+        public static void StopListening(string title, System.Action<int> listener)
+        {
+            System.Action<int> action = null;
+            if (list4.TryGetValue(title, out action))
+            {
+                action -= listener;
+                list4[title] = action;
+            }
+        }
+
+        public static void Trigger(string title, int value)
+        {
+            System.Action<int> action = null;
+            if (list4.TryGetValue(title, out action))
+            {
+                if(action != null) action(value);
+            }
+        }
+        #endregion
+    
+        #region String_Int_Event
+        
+        public static Dictionary<string, System.Action<string, int>> list5 = new Dictionary<string, System.Action<string, int>>();
+        
+        public static void StartListening(string title, System.Action<string, int> listener)
+        {
+            System.Action<string, int> action = null;
+            if (list5.TryGetValue(title, out action))
+            {
+                action += listener;
+                list5[title] = action;
+            }
+            else
+            {
+                action += listener;
+                list5.Add(title, action);
+            }
+        }
+
+        public static void StopListening(string title, System.Action<string, int> listener)
+        {
+            System.Action<string, int> action = null;
+            if (list5.TryGetValue(title, out action))
+            {
+                action -= listener;
+                list5[title] = action;
+            }
+        }
+
+        public static void Trigger(string title, string text, int value)
+        {
+            System.Action<string, int> action = null;
+            if (list5.TryGetValue(title, out action))
+            {
+                if(action != null) action(text, value);
+            }
+        }
+        #endregion
+
+        #region ScriptableObject_Event
+        
+        public static Dictionary<string, System.Action<ScriptableObject>> list6 = new Dictionary<string, System.Action<ScriptableObject>>();
+        
+        public static void StartListening(string title, System.Action<ScriptableObject> listener)
+        {
+            System.Action<ScriptableObject> action = null;
+            if (list6.TryGetValue(title, out action))
+            {
+                action += listener;
+                list6[title] = action;
+            }
+            else
+            {
+                action += listener;
+                list6.Add(title, action);
+            }
+        }
+
+        public static void StopListening(string title, System.Action<ScriptableObject> listener)
+        {
+            System.Action<ScriptableObject> action = null;
+            if (list6.TryGetValue(title, out action))
+            {
+                action -= listener;
+                list6[title] = action;
+            }
+        }
+
+        public static void Trigger(string title, ScriptableObject scriptableObject)
+        {
+            System.Action<ScriptableObject> action = null;
+            if (list6.TryGetValue(title, out action))
+            {
+                if(action != null) action(scriptableObject);
+            }
+        }
+        #endregion
+
+        #region String_Vector3_Event
+        
+        public static Dictionary<string, System.Action<string, Vector3>> listStringVector3 = new Dictionary<string, System.Action<string, Vector3>>();
+        
+        public static void StartListening(string title, System.Action<string, Vector3> listener)
+        {
+            System.Action<string, Vector3> action = null;
+            if (listStringVector3.TryGetValue(title, out action))
+            {
+                action += listener;
+                listStringVector3[title] = action;
+            }
+            else
+            {
+                action += listener;
+                listStringVector3.Add(title, action);
+            }
+        }
+
+        public static void StopListening(string title, System.Action<string, Vector3> listener)
+        {
+            System.Action<string, Vector3> action = null;
+            if (listStringVector3.TryGetValue(title, out action))
+            {
+                action -= listener;
+                listStringVector3[title] = action;
+            }
+        }
+
+        public static void Trigger(string title, string text, Vector3 value)
+        {
+            System.Action<string, Vector3> action = null;
+            if (listStringVector3.TryGetValue(title, out action))
+            {
+                if(action != null) action(text, value);
+            }
+        }
+        #endregion
+    }
+}

+ 11 - 0
Runtime/EventManager/GenericEvents.cs.meta

@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: c05b376ede4c8c244a7a532a5aa4b9d5
+MonoImporter:
+  externalObjects: {}
+  serializedVersion: 2
+  defaultReferences: []
+  executionOrder: 0
+  icon: {instanceID: 0}
+  userData: 
+  assetBundleName: 
+  assetBundleVariant: 

+ 56 - 0
Runtime/EventManager/InteractionEvents.cs

@@ -0,0 +1,56 @@
+using System.Collections;
+using System.Collections.Generic;
+using UnityEngine;
+
+namespace KairoEngine
+{
+
+    public class EventData
+    {
+        public GameObject obj;
+
+        public EventData(GameObject obj = null)
+        {
+            this.obj = obj;
+        }
+    }
+
+    public class InteractionEvents
+    {
+        public static Dictionary<string, System.Action<EventData>> list = new Dictionary<string, System.Action<EventData>>();
+
+        public static void StartListening(string title, System.Action<EventData> listener)
+        {
+            System.Action<EventData> action = null;
+            if (list.TryGetValue(title, out action))
+            {
+                action += listener;
+                list[title] = action;
+            }
+            else
+            {
+                action += listener;
+                list.Add(title, action);
+            }
+        }
+
+        public static void StopListening(string title, System.Action<EventData> listener)
+        {
+            System.Action<EventData> action = null;
+            if (list.TryGetValue(title, out action))
+            {
+                action -= listener;
+                list[title] = action;
+            }
+        }
+
+        public static void Trigger(string title, EventData eventData)
+        {
+            System.Action<EventData> action = null;
+            if (list.TryGetValue(title, out action))
+            {
+                if(action != null) action(eventData);
+            }
+        }
+    }
+}

+ 11 - 0
Runtime/EventManager/InteractionEvents.cs.meta

@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: 12b5ae86cba607d46b5f30e03d688d4e
+MonoImporter:
+  externalObjects: {}
+  serializedVersion: 2
+  defaultReferences: []
+  executionOrder: 0
+  icon: {instanceID: 0}
+  userData: 
+  assetBundleName: 
+  assetBundleVariant: 

+ 39 - 0
Runtime/EventManager/MenuEvents.cs

@@ -0,0 +1,39 @@
+using System.Collections;
+using System.Collections.Generic;
+using UnityEngine;
+
+namespace KairoEngine
+{
+    public class MenuEvents
+    {
+        public static event System.Action<string, bool> OnOpenPanel;
+        public static event System.Action<string> OnClosePanel;
+
+        public static event System.Action<string, string> OnExecuteMenuItem;
+
+        public static void OpenPanel(string panelName, bool closePrevious)
+        {
+            if(OnOpenPanel != null)
+            {
+                OnOpenPanel(panelName, closePrevious);
+            }
+        }
+
+        public static void ClosePanel(string panelName)
+        {
+            if(OnClosePanel != null)
+            {
+                OnClosePanel(panelName);
+            }
+        }
+
+        public static void ExecuteMenuItem(string panelName, string menuItemName)
+        {
+            if(OnExecuteMenuItem != null)
+            {
+                OnExecuteMenuItem(panelName, menuItemName);
+            }
+        }
+    }
+}
+

+ 11 - 0
Runtime/EventManager/MenuEvents.cs.meta

@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: 735b88cc0d7b5354d9eb2ac87652462d
+MonoImporter:
+  externalObjects: {}
+  serializedVersion: 2
+  defaultReferences: []
+  executionOrder: 0
+  icon: {instanceID: 0}
+  userData: 
+  assetBundleName: 
+  assetBundleVariant: 

+ 42 - 0
Runtime/EventManager/PlayerEvents.cs

@@ -0,0 +1,42 @@
+using System.Collections;
+using System.Collections.Generic;
+using UnityEngine;
+
+namespace KairoEngine
+{
+    public class PlayerEvents
+    {
+        public static event System.Action<Vector3> OnPositionChange;
+
+        public static event System.Action<GameObject> OnHoverTarget;
+
+        public static event System.Action<Vector3, Quaternion> OnSetPlayerPosition;
+
+        public static void PositionChange(Vector3 position)
+        {
+            if(OnPositionChange != null)
+            {
+                //Debug.Log("ItemContainerEvents.OnOpen has been triggered");
+                OnPositionChange(position);
+            }
+        }
+
+        public static void HoverTarget(GameObject target)
+        {
+            if(OnHoverTarget != null)
+            {
+                //Debug.Log("ItemContainerEvents.OnOpen has been triggered");
+                OnHoverTarget(target);
+            }
+        }
+
+        public static void SetPlayerPosition(Vector3 targetPosition, Quaternion targetRotation)
+        {
+            if(OnSetPlayerPosition != null)
+            {
+                //Debug.Log("ItemContainerEvents.OnOpen has been triggered");
+                OnSetPlayerPosition(targetPosition, targetRotation);
+            }
+        }
+    }
+}

+ 11 - 0
Runtime/EventManager/PlayerEvents.cs.meta

@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: b00dcda34ca3d514eae8125e68d3af2d
+MonoImporter:
+  externalObjects: {}
+  serializedVersion: 2
+  defaultReferences: []
+  executionOrder: 0
+  icon: {instanceID: 0}
+  userData: 
+  assetBundleName: 
+  assetBundleVariant: 

+ 107 - 0
Runtime/EventManager/RequestEvents.cs

@@ -0,0 +1,107 @@
+using System.Collections;
+using System.Collections.Generic;
+using UnityEngine;
+
+namespace KairoEngine.Core
+{
+    public class RequestEvents
+    {
+        #region Request_bool_with_no_args
+
+        public Dictionary<string, System.Func<bool>> list = new Dictionary<string, System.Func<bool>>();
+        
+        public void Bind(string title, System.Func<bool> listener)
+        {
+            System.Func<bool> action = null;
+            if (list.TryGetValue(title, out action) == false)
+            {
+                action += listener;
+                list.Add(title, action);
+            }
+        }
+
+        public void Unbind(string title, System.Func<bool> listener)
+        {
+            System.Func<bool> action = null;
+            if (list.TryGetValue(title, out action))
+            {
+                action -= listener;
+                list.Remove(title);
+            }
+        }
+
+        // public bool Get(string title)
+        // {
+        //     System.Func<bool> action = null;
+        //     if (list.TryGetValue(title, out action))
+        //     {
+        //         if(action != null) return action();
+        //     }
+        //     return false;
+        // }
+
+        public EventResponse<bool> GetBool(string title)
+        {
+            System.Func<bool> action = null;
+            EventResponse<bool> response = new EventResponse<bool>();
+            if (list.TryGetValue(title, out action))
+            {
+                if(action != null) 
+                {
+                    bool result = action();
+                    response.value = result;
+                    response.status = EventResponseStatus.OK;
+                }
+            }
+            else response.status = EventResponseStatus.NotFound;
+            return response;
+        }
+
+        #endregion
+
+        #region Request_GameObject_with_no_args
+
+        public Dictionary<string, System.Func<GameObject>> list2 = new Dictionary<string, System.Func<GameObject>>();
+        
+        public void Bind(string title, System.Func<GameObject> listener)
+        {
+            System.Func<GameObject> action = null;
+            if (list2.TryGetValue(title, out action) == false)
+            {
+                action += listener;
+                list2.Add(title, action);
+            }
+        }
+
+        public void Unbind(string title, System.Func<GameObject> listener)
+        {
+            System.Func<GameObject> action = null;
+            if (list2.TryGetValue(title, out action))
+            {
+                action -= listener;
+                list2.Remove(title);
+            }
+        }
+
+        public EventResponse<GameObject> GetGameObject(string title)
+        {
+            System.Func<GameObject> action = null;
+            EventResponse<GameObject> response = new EventResponse<GameObject>();
+            if (list2.TryGetValue(title, out action))
+            {
+                if(action != null) 
+                {
+                    GameObject result = action();
+                    response.value = result;
+                    if(response.value == null) response.status = EventResponseStatus.EmptyResponse;
+                    else response.status = EventResponseStatus.OK;
+                }
+            }
+            else response.status = EventResponseStatus.NotFound;
+            return response;
+        }
+        #endregion
+
+    }
+}
+

+ 11 - 0
Runtime/EventManager/RequestEvents.cs.meta

@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: 81f9d090962891347924650f64e2fdd5
+MonoImporter:
+  externalObjects: {}
+  serializedVersion: 2
+  defaultReferences: []
+  executionOrder: 0
+  icon: {instanceID: 0}
+  userData: 
+  assetBundleName: 
+  assetBundleVariant: 

+ 20 - 0
Runtime/EventManager/SerializationEvents.cs

@@ -0,0 +1,20 @@
+using System.Collections;
+using System.Collections.Generic;
+using UnityEngine;
+
+namespace KairoEngine.Core
+{
+    public class SerializationEvents
+    {
+        public static event System.Action OnSerializeData;
+
+        public static void SerializeData()
+        {
+            if(OnSerializeData != null)
+            {
+                OnSerializeData();
+            }
+        }
+    }
+}
+

+ 11 - 0
Runtime/EventManager/SerializationEvents.cs.meta

@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: fa1232adf7b8585459819ffdac800b76
+MonoImporter:
+  externalObjects: {}
+  serializedVersion: 2
+  defaultReferences: []
+  executionOrder: 0
+  icon: {instanceID: 0}
+  userData: 
+  assetBundleName: 
+  assetBundleVariant: 

+ 74 - 0
Runtime/EventManager/TransitionEvents.cs

@@ -0,0 +1,74 @@
+using System.Collections;
+using System.Collections.Generic;
+using UnityEngine;
+
+namespace KairoEngine.Core
+{
+    public class TransitionEvents
+    {
+        public static event System.Action<float> OnFadeIn;
+        public static event System.Action<float> OnFadeOut;
+        public static event System.Action<SceneChangeData, float> OnChangeScene;
+        public static event System.Action OnTransitionFinish;
+        public static event System.Action<string> OnSceneStart;
+
+        public static event System.Action OnGetLocationName;
+        public static event System.Action<string> OnLocationName;
+
+        public static void FadeIn(float time)
+        {
+            if(OnFadeIn != null)
+            {
+                OnFadeIn(time);
+            }
+        }
+
+        public static void FadeOut(float time)
+        {
+            if(OnFadeOut != null)
+            {
+                OnFadeOut(time);
+            }
+        }
+    
+        public static void ChangeScene(SceneChangeData sceneChangeData, float time)
+        {
+            if(OnChangeScene != null)
+            {
+                OnChangeScene(sceneChangeData, time);
+            }
+        }
+
+        public static void TransitionFinish()
+        {
+            if(OnTransitionFinish != null)
+            {
+                OnTransitionFinish();
+            }
+        }
+
+        public static void SceneStart(string link)
+        {
+            if(OnSceneStart != null)
+            {
+                OnSceneStart(link);
+            }
+        }
+
+        public static void GetLocationName()
+        {
+            if(OnGetLocationName != null)
+            {
+                OnGetLocationName();
+            }
+        }
+
+        public static void SendLocationName(string locationName)
+        {
+            if(OnLocationName != null)
+            {
+                OnLocationName(locationName);
+            }
+        }
+    }
+}

+ 11 - 0
Runtime/EventManager/TransitionEvents.cs.meta

@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: 37a1961b773dad1439995d3e81084177
+MonoImporter:
+  externalObjects: {}
+  serializedVersion: 2
+  defaultReferences: []
+  executionOrder: 0
+  icon: {instanceID: 0}
+  userData: 
+  assetBundleName: 
+  assetBundleVariant: 

+ 36 - 0
Runtime/FxController.cs

@@ -0,0 +1,36 @@
+using System.Collections;
+using System.Collections.Generic;
+using UnityEngine;
+using QFSW.MOP2;
+
+namespace KairoEngine.Core
+{
+    public class FxController : MonoBehaviour
+    {
+        public bool autoRemoveFx = true;
+        public string fxName = "";
+        public float removeTime = 3f;
+        void Awake()
+        {
+            // Get all particle systems
+            List<ParticleSystem> particleSystems = new List<ParticleSystem>();
+            gameObject.GetComponentsInChildren<ParticleSystem>(particleSystems);
+            var s = gameObject.GetComponent<ParticleSystem>();
+            if(s != null) particleSystems.Add(s);
+            // Reset Parcile Systems
+            foreach (var particleSystem in particleSystems)
+            {
+                particleSystem.Clear();
+                particleSystem.Play();
+            }
+            if(autoRemoveFx)
+            {
+                StartCoroutine(Timer.Start(removeTime, false, () =>
+                {
+                    MasterObjectPooler.Instance.GetPool(fxName).Release(this.gameObject);
+                }));
+            }
+            
+        }
+    }
+}

+ 11 - 0
Runtime/FxController.cs.meta

@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: a04bc60a466ea1b4193ae3d0f09b2b37
+MonoImporter:
+  externalObjects: {}
+  serializedVersion: 2
+  defaultReferences: []
+  executionOrder: 0
+  icon: {instanceID: 0}
+  userData: 
+  assetBundleName: 
+  assetBundleVariant: 

+ 8 - 0
Runtime/GameActions.meta

@@ -0,0 +1,8 @@
+fileFormatVersion: 2
+guid: f7f66bfc9a1d5b24793bcdd8bc62e3ff
+folderAsset: yes
+DefaultImporter:
+  externalObjects: {}
+  userData: 
+  assetBundleName: 
+  assetBundleVariant: 

+ 8 - 0
Runtime/GameActions/Actions.meta

@@ -0,0 +1,8 @@
+fileFormatVersion: 2
+guid: 69bb4155648843148a84b24636dec0f5
+folderAsset: yes
+DefaultImporter:
+  externalObjects: {}
+  userData: 
+  assetBundleName: 
+  assetBundleVariant: 

+ 231 - 0
Runtime/GameActions/Actions/ConditionalGameAction.cs

@@ -0,0 +1,231 @@
+using System;
+using System.Collections;
+using System.Linq;
+using System.Collections.Generic;
+using UnityEngine;
+using Sirenix.OdinInspector;
+using KairoEngine.Core;
+
+namespace KairoEngine.Core.GameActions
+{
+
+    [System.Serializable, HideReferenceObjectPicker]
+    public class ConditionalGameAction : GameActionBase
+    {
+        public override string name 
+        { 
+            get
+            {
+                return "Conditional";
+            }
+        }
+
+        public override GameActionsController controller { 
+            get => _controller; 
+            set 
+            {
+                _controller = value;
+                typeName = "ConditionalGameAction";
+            }
+        }
+        public override string GetTypeName() => "ConditionalGameAction";
+        public override string GetActionName() => "Core/Conditional Logic";
+
+        [IconFoldoutGroup("Contidional", "Assets/Plugins/KairoEngine/Core/Editor/Icons/ConditionalGameAcionIcon.png")] 
+        [ListDrawerSettings(HideAddButton = true, HideRemoveButton = false, DraggableItems = true, Expanded = false, ShowPaging = false, ShowItemCount = true)]
+        [BoxGroup("Contidional/If")]
+        [PropertySpace(4,0)]
+        [NonSerialized, ShowInInspector]
+        public List<GameActionCondition> conditions = new List<GameActionCondition>();
+
+        #region NewCondition
+
+        [OnInspectorInit("GetCompatibleVariablenames"), OnValueChanged("AddNewCondition")]
+        [ValueDropdown("possibleConditions", IsUniqueList = false)]
+        [LabelText("Add New Condition")]
+        [BoxGroup("Contidional/If")]
+        [NonSerialized]
+        public GameActionCondition newCondition;
+
+        private IEnumerable possibleConditions = new ValueDropdownList<GameActionCondition>();
+
+        private void GetCompatibleVariablenames()
+        {
+            possibleConditions = ReflectiveEnumerator.GetEnumerableOfType<GameActionCondition>()
+                .Where(x => x.GetTypeName() != "GameActionConditionBase")
+                .Where(x => x.GetTypeName() != "GameActionCondition")
+                .Select(x => new ValueDropdownItem(x.GetActionName(), x));
+        }
+
+        private void AddNewCondition()
+        {
+            if(newCondition != null)
+            {
+                newCondition.controller = this.controller;
+                newCondition.className = newCondition.GetType().AssemblyQualifiedName;
+                conditions.Add(newCondition);
+                newCondition = null;
+            }
+        }
+
+        #endregion
+
+        [IconFoldoutGroup("Contidional")] 
+        [HideLabel, InlineProperty, HideReferenceObjectPicker]
+        [BoxGroup("Contidional/If")]
+        [OnInspectorInit("InitializeGameActionControllers")]
+        [NonSerialized, ShowInInspector]
+        public GameActionsController ifController;
+
+        [IconFoldoutGroup("Contidional")] 
+        [HideLabel, InlineProperty, HideReferenceObjectPicker]
+        [BoxGroup("Contidional/Else")]
+        [NonSerialized, ShowInInspector]
+        public GameActionsController elseController;
+
+        private bool isTrue = true;
+
+        public ConditionalGameAction(GameActionsController controller = null) : base(controller)
+        {
+            this.controller = controller;
+            className =  this.GetType().AssemblyQualifiedName;
+            if(this.controller != null) InitializeGameActionControllers();
+        }
+
+        public override void Start()
+        {
+             _started = true;
+            isTrue = true;
+            for (int i = 0; i < conditions.Count; i++)
+            {
+                if(conditions[i].Evaluate() == false) isTrue = false;
+            }
+            if(isTrue)
+            {
+                ifController.Start();
+                if(ifController.isDone) _done = true;
+            }
+            else
+            {
+                elseController.Start();
+                if(elseController.isDone) _done = true;
+            }
+           
+        }
+
+        public override void Update() 
+        { 
+            if(isTrue && ifController.isDone) _done = true;
+            if(!isTrue && elseController.isDone) _done = true;
+        }
+
+        public override void Restart()
+        {
+            _done = false;
+            _started = false;
+            isTrue = true;
+        }
+
+        public static ConditionalGameAction JSONToConditionalGameAction(string data)
+        {
+            return JsonUtility.FromJson<ConditionalGameAction>(data);
+        }
+
+        private ConditionalGameAction Duplicate(GameActionsController controller = null)
+        {
+            ConditionalGameAction action = new ConditionalGameAction(controller == null ? this.controller : controller);
+            action.controller = controller;
+            return action;
+        }
+
+        private void InitializeGameActionControllers()
+        {
+            if(ifController == null)
+            {
+                ifController = new GameActionsController();
+                ifController.actions = new List<GameAction>();
+                ifController.depth = controller.depth + 1;
+            }
+            ifController.context = controller.context;
+            for (int i = 0; i < ifController.actions.Count; i++) ifController.actions[i].controller = ifController;
+            if(elseController == null)
+            {
+                elseController = new GameActionsController();
+                elseController.actions = new List<GameAction>();
+                elseController.depth = controller.depth + 1;
+            }
+            elseController.context = controller.context;
+            for (int i = 0; i < elseController.actions.Count; i++) elseController.actions[i].controller = elseController;
+            if(conditions == null) conditions = new List<GameActionCondition>();
+        }
+
+        [SerializeField, HideInInspector] private List<string> serializedConditions = new List<string>();
+
+        [SerializeField, HideInInspector] private string serializedIfController = "";
+        [SerializeField, HideInInspector] private string serializedElseController = "";
+
+        [SerializeField, HideInInspector] public GameActionObjectSerializer objectSerializer = new GameActionObjectSerializer();
+
+        public override void OnBeforeSerialize(GameActionObjectSerializer serializer, int n, int depth) 
+        { 
+            // Serialize Conditions
+            if(conditions == null) return;
+            serializedConditions = new List<string>();
+            objectSerializer.ClearGameObjects();
+            objectSerializer.ClearScriptableObjects();
+            for (int i = 0; i < conditions.Count; i++)
+            {
+                conditions[i].OnBeforeSerialize(objectSerializer, i, depth);
+                string data = JsonUtility.ToJson(conditions[i]);
+                serializedConditions.Add(data);
+            }
+            // Serialize Game Action Controllers
+            if(ifController != null)
+            {
+                ifController.objectSerializer = serializer;
+                ifController.OnBeforeSerialize();
+                ifController.context = null;
+                serializedIfController = JsonUtility.ToJson(ifController);
+                //ifController = null;
+            }
+            if(elseController != null)
+            {
+                elseController.objectSerializer = serializer;
+                elseController.OnBeforeSerialize();
+                elseController.context = null;
+                serializedElseController = JsonUtility.ToJson(elseController);
+                //elseController = null;  
+            }
+        }
+        public override void OnBeforeDeserialize(GameActionObjectSerializer serializer, int n, int depth) 
+        { 
+            // Deserialize conditions
+            if(serializedConditions == null) return;
+            if(conditions == null) conditions = new List<GameActionCondition>();
+            for (int i = 0; i < serializedConditions.Count; i++)
+            {
+                GameActionCondition condition = JsonUtility.FromJson<GameActionConditionBase>(serializedConditions[i]);
+                condition.controller = null;
+                condition = GameActionCondition.InvokeStringMethod(condition.className, condition.typeName, serializedConditions[i]);
+                condition.controller = this.controller;
+                condition.OnBeforeDeserialize(objectSerializer, i, depth);
+                conditions.Add(condition);
+            }
+            objectSerializer.ClearGameObjects();
+            objectSerializer.ClearScriptableObjects();
+            // Deserialize Game Action Controllers
+            ifController = new GameActionsController();
+            ifController = JsonUtility.FromJson<GameActionsController>(serializedIfController);
+            ifController.objectSerializer = serializer;
+            //ifController.OnAfterDeserialize();
+            ifController.context = controller.context;
+            elseController = new GameActionsController();
+            elseController = JsonUtility.FromJson<GameActionsController>(serializedElseController);
+            elseController.objectSerializer = serializer;
+            //elseController.OnAfterDeserialize();
+            elseController.context = controller.context;
+            InitializeGameActionControllers();
+        }
+    }
+}
+

+ 11 - 0
Runtime/GameActions/Actions/ConditionalGameAction.cs.meta

@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: 86d45c4ce93f78d42bf5740ef69a3651
+MonoImporter:
+  externalObjects: {}
+  serializedVersion: 2
+  defaultReferences: []
+  executionOrder: 0
+  icon: {instanceID: 0}
+  userData: 
+  assetBundleName: 
+  assetBundleVariant: 

+ 146 - 0
Runtime/GameActions/Actions/DebugLogGameAction.cs

@@ -0,0 +1,146 @@
+using System.Collections;
+using System.Linq;
+using System.Collections.Generic;
+using UnityEngine;
+using Sirenix.OdinInspector;
+using KairoEngine.Core;
+
+namespace KairoEngine.Core.GameActions
+{
+    public enum DebugLogGameActionType
+    {
+        String,
+        Variable
+    }
+
+    public enum DebugLogGameActionlogType
+    {
+        Log,
+        Warning,
+        Error
+    }
+
+    [System.Serializable, HideReferenceObjectPicker]
+    public class DebugLogGameAction : GameActionBase
+    {
+        public override string name 
+        { 
+            get
+            {
+                if(actionType == DebugLogGameActionType.Variable) return $"Debug {logType.ToString()} \'{GetVariable(variable)}\' ({variable})"; 
+                else return $"Debug {logType.ToString()} \'{message}\'"; 
+            }
+        }
+
+        public override GameActionsController controller { 
+            get => _controller; 
+            set 
+            {
+                _controller = value;
+                typeName = "DebugLogGameAction";
+                className =  this.GetType().AssemblyQualifiedName;
+                GetCompatibleVariablenames();
+            }
+        }
+        public override string GetTypeName() => "DebugLogGameAction";
+        public override string GetActionName() => "Core/Debug Log";
+
+        [IconFoldoutGroup("@name", "Assets/Plugins/KairoEngine/Core/Editor/Icons/DebugLogGameActionIcon.png")] 
+        public DebugLogGameActionType actionType = DebugLogGameActionType.String;
+        
+        [IconFoldoutGroup("@name"), ShowIf("@actionType == DebugLogGameActionType.String")]
+        public string message = "Debug Log Message";
+
+        [IconFoldoutGroup("@name"), ShowIf("@actionType == DebugLogGameActionType.Variable")]
+        [ValueDropdown("possibleVariables", IsUniqueList = false)]
+        public string variable;
+        [IconFoldoutGroup("@name")] public DebugLogGameActionlogType logType = DebugLogGameActionlogType.Log;
+
+        private IEnumerable possibleVariables = new ValueDropdownList<string>();
+
+        public DebugLogGameAction(GameActionsController controller) : base(controller)
+        {
+            this.controller = controller;
+            className =  this.GetType().AssemblyQualifiedName;
+        }
+
+        public override void Start()
+        {
+            if(actionType == DebugLogGameActionType.String) LogMessage(message, logType);
+            else if(actionType == DebugLogGameActionType.Variable)
+            {
+                string value = GetVariable(variable);
+                if(value != "") LogMessage(value, logType);
+            }
+            _done = true;
+            _started = true;
+        }
+
+        public override void Update() { }
+
+        public override void Restart()
+        {
+            _done = false;
+            _started = false;
+        }
+
+        private void GetCompatibleVariablenames()
+        {
+            if(_controller == null) return;
+            if(_controller.context == null) return;
+            possibleVariables = _controller.context.variables
+                //.Where(x => x.data is GameActionContextString)
+                .Select(x => new ValueDropdownItem(x.name, x.name)); 
+        }
+
+        public static DebugLogGameAction JSONToDebugLogGameAction(string data)
+        {
+            return JsonUtility.FromJson<DebugLogGameAction>(data);
+        }
+
+        private DebugLogGameAction Duplicate(GameActionsController controller = null)
+        {
+            DebugLogGameAction action = new DebugLogGameAction(controller == null ? this.controller : controller);
+            action.controller = controller;
+            action.actionType = actionType;
+            action.message = message;
+            action.variable = variable;
+            return action;
+        }
+
+        private string GetVariable(string title)
+        {
+            if(controller == null) return "";
+            if(controller.context == null) return "";
+            for (int i = 0; i < controller.context.variables.Count; i++)
+            {
+                if(controller.context.variables[i].name == title)
+                {
+                    string value = controller.context.variables[i].GetValue<string>("");
+                    if(value != "") return value;
+                }
+            }
+            return "";
+        }
+
+        private void LogMessage(string value, DebugLogGameActionlogType logType)
+        {
+            switch (logType)
+            {
+                case DebugLogGameActionlogType.Log:
+                    Debug.Log(value);
+                    break;
+                case DebugLogGameActionlogType.Warning:
+                    Debug.LogWarning(value);
+                    break;
+                case DebugLogGameActionlogType.Error:
+                    Debug.LogError(value);
+                    break;
+                default:
+                    break;
+            }
+        }
+
+    }
+}
+

+ 11 - 0
Runtime/GameActions/Actions/DebugLogGameAction.cs.meta

@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: a04ea5575070cae47a8f03a3484213cf
+MonoImporter:
+  externalObjects: {}
+  serializedVersion: 2
+  defaultReferences: []
+  executionOrder: 0
+  icon: {instanceID: 0}
+  userData: 
+  assetBundleName: 
+  assetBundleVariant: 

+ 98 - 0
Runtime/GameActions/Actions/ExitApplicationGameAction.cs

@@ -0,0 +1,98 @@
+using System.Collections;
+using System.Linq;
+using System.Collections.Generic;
+using UnityEngine;
+using Sirenix.OdinInspector;
+using KairoEngine.Core;
+
+namespace KairoEngine.Core.GameActions
+{
+
+    [System.Serializable, HideReferenceObjectPicker]
+    public class ExitApplicationGameAction : GameActionBase
+    {
+        #region DefaultVariables
+        public override string name { get => $"Exit application in {time}s"; }
+
+        public override GameActionsController controller { 
+            get => _controller; 
+            set 
+            {
+                _controller = value;
+                typeName = "ExitApplicationGameAction";
+            }
+        }
+        public override string GetTypeName() => "ExitApplicationGameAction";
+        public override string GetActionName() => "Core/Exit Application";
+
+        #endregion
+
+        #region ActionVariables
+
+        [FoldoutGroup("@name")]  public float time = 1f;
+        private float elapsedTime = 0f;
+
+        #endregion
+
+        public ExitApplicationGameAction(GameActionsController controller) : base(controller)
+        {
+            this.controller = controller;
+            className =  this.GetType().AssemblyQualifiedName;
+        }
+
+        #region Flow
+
+        public override void Start()
+        {
+            elapsedTime = 0f;
+            _done = false;
+            _started = true;
+        }
+
+        public override void Update() 
+        { 
+            elapsedTime += Time.deltaTime;
+            if(elapsedTime > time) 
+            {
+                _done = true;
+                #if UNITY_EDITOR
+                UnityEditor.EditorApplication.isPlaying = false;
+                #else
+                Application.Quit();
+                #endif
+            }
+        }
+
+        public override void Restart()
+        {
+            _done = false;
+            _started = false;
+            elapsedTime = 0;
+        }
+
+        #endregion
+
+        #region Utilities
+
+        private ExitApplicationGameAction Duplicate(GameActionsController controller = null)
+        {
+            ExitApplicationGameAction action = new ExitApplicationGameAction(controller == null ? this.controller : controller);
+            action.controller = controller;
+            action.time = time;
+            return action;
+        }
+
+        #endregion
+
+        #region Serialization
+
+        public static ExitApplicationGameAction JSONToExitApplicationGameAction(string data)
+        {
+            return JsonUtility.FromJson<ExitApplicationGameAction>(data);
+        }
+
+        #endregion
+
+    }
+}
+

+ 11 - 0
Runtime/GameActions/Actions/ExitApplicationGameAction.cs.meta

@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: b45671613b22a79479a97f011137841f
+MonoImporter:
+  externalObjects: {}
+  serializedVersion: 2
+  defaultReferences: []
+  executionOrder: 0
+  icon: {instanceID: 0}
+  userData: 
+  assetBundleName: 
+  assetBundleVariant: 

+ 152 - 0
Runtime/GameActions/Actions/GameObjectControllerGameAction.cs

@@ -0,0 +1,152 @@
+using System;
+using System.Collections;
+using System.Linq;
+using System.Collections.Generic;
+using UnityEngine;
+using Sirenix.OdinInspector;
+using KairoEngine.Core;
+
+namespace KairoEngine.Core.GameActions
+{
+
+    [System.Serializable, HideReferenceObjectPicker]
+    public class GameObjectControllerGameAction : GameActionBase
+    {
+        public enum ControllerAction
+        {
+            Enable,
+            Disable,
+            Destroy
+        }
+
+        public enum TargeVariableType
+        {
+            Direct,
+            Variable
+        }
+
+        public override string name 
+        { 
+            get
+            {
+                return $"{action.ToString()} {GetObjName(target)}"; 
+            }
+        }
+
+        public override GameActionsController controller { 
+            get => _controller; 
+            set 
+            {
+                _controller = value;
+                typeName = "GameObjectControllerGameAction";
+                className =  this.GetType().AssemblyQualifiedName;
+                GetCompatibleVariablenames();
+            }
+        }
+        public override string GetTypeName() => "GameObjectControllerGameAction";
+        public override string GetActionName() => "Core/GameObject Controller";
+
+        [IconFoldoutGroup("@name", "Assets/Plugins/KairoEngine/Core/Editor/Icons/InstantiateGameActionIcon.png")]
+        public ControllerAction action = ControllerAction.Enable;
+
+        [IconFoldoutGroup("@name")] 
+        public TargeVariableType targetType;
+
+        [IconFoldoutGroup("@name"), ShowIf("@targetType == TargeVariableType.Direct"), NonSerialized, ShowInInspector] 
+        public GameObject target;
+
+        [IconFoldoutGroup("@name"), ShowIf("@targetType == TargeVariableType.Variable"),ValueDropdown("possibleVariables", IsUniqueList = false)]
+        public string targetVariable;
+
+        private IEnumerable possibleVariables = new ValueDropdownList<string>();
+
+        public GameObjectControllerGameAction(GameActionsController controller) : base(controller)
+        {
+            this.controller = controller;
+            className =  this.GetType().AssemblyQualifiedName;
+        }
+
+        private string GetObjName(GameObject obj)
+        {
+            if(obj == null) return "NULL";
+            else return $"\'{obj.name}\'";
+        }
+
+        public override void Start()
+        {
+            GameObject obj;
+            if(targetType == TargeVariableType.Direct) obj = target;
+            else obj = GetVariable<GameObject>(targetVariable, null);
+            if(obj != null)
+            {
+                switch (action)
+                {
+                    case ControllerAction.Enable:
+                        obj.SetActive(true);
+                        break;
+                    case ControllerAction.Disable:
+                        obj.SetActive(false);
+                        break;
+                    case ControllerAction.Destroy:
+                        GameObject.Destroy(obj);
+                        break;
+                    default:
+                        break;
+                }
+            }
+            _done = true;
+            _started = true;
+        }
+
+        public override void Update() { }
+
+        public override void Restart()
+        {
+            _done = false;
+            _started = false;
+        }
+
+        private void GetCompatibleVariablenames()
+        {
+            if(_controller == null) return;
+            if(_controller.context == null) return;
+            possibleVariables = _controller.context.variables
+                .Where(x => x.GetTypeName() is "GameActionContextGameObject")
+                .Select(x => new ValueDropdownItem(x.name, x.name)); 
+        }
+
+        public static GameObjectControllerGameAction JSONToGameObjectControllerGameAction(string data)
+        {
+            return JsonUtility.FromJson<GameObjectControllerGameAction>(data);
+        }
+
+        private GameObjectControllerGameAction Duplicate(GameActionsController controller)
+        {
+            GameObjectControllerGameAction action = new GameObjectControllerGameAction(controller == null ? this.controller : controller);
+            action.controller = controller;
+            return action;
+        }
+
+        private T GetVariable<T>(string title, T defaultValue)
+        {
+            for (int i = 0; i < controller.context.variables.Count; i++)
+            {
+                if(controller.context.variables[i].name == title)
+                {
+                    return controller.context.variables[i].GetValue<T>(defaultValue);
+                }
+            }
+            return defaultValue;
+        }
+
+        public override void OnBeforeSerialize(GameActionObjectSerializer serializer, int n, int depth) 
+        { 
+            serializer.SerializeGameObject($"{depth}-{n}-Prefab", target);
+        }
+        public override void OnBeforeDeserialize(GameActionObjectSerializer serializer, int n, int depth) 
+        { 
+            target = serializer.DeserializeGameObject($"{depth}-{n}-Prefab");
+        }
+    }
+}
+

+ 11 - 0
Runtime/GameActions/Actions/GameObjectControllerGameAction.cs.meta

@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: 49eff6efa9f5ab94788dec1b763ecfca
+MonoImporter:
+  externalObjects: {}
+  serializedVersion: 2
+  defaultReferences: []
+  executionOrder: 0
+  icon: {instanceID: 0}
+  userData: 
+  assetBundleName: 
+  assetBundleVariant: 

+ 98 - 0
Runtime/GameActions/Actions/InstantiateGameAction.cs

@@ -0,0 +1,98 @@
+using System;
+using System.Collections;
+using System.Linq;
+using System.Collections.Generic;
+using UnityEngine;
+using Sirenix.OdinInspector;
+using KairoEngine.Core;
+
+namespace KairoEngine.Core.GameActions
+{
+
+    [System.Serializable, HideReferenceObjectPicker]
+    public class InstantiateGameAction : GameActionBase
+    {
+        public override string name 
+        { 
+            get
+            {
+                return $"Instantiate {GetObjName(prefab)}"; 
+            }
+        }
+
+        public override GameActionsController controller { 
+            get => _controller; 
+            set 
+            {
+                _controller = value;
+                typeName = "InstantiateGameAction";
+            }
+        }
+        public override string GetTypeName() => "InstantiateGameAction";
+        public override string GetActionName() => "Core/Instantiate GameObject";
+
+        [IconFoldoutGroup("@name", "Assets/Plugins/KairoEngine/Core/Editor/Icons/InstantiateGameActionIcon.png")]
+        [NonSerialized, ShowInInspector, AssetsOnly, LabelText("Prefab")] public GameObject prefab;
+
+        public InstantiateGameAction(GameActionsController controller) : base(controller)
+        {
+            this.controller = controller;
+            className =  this.GetType().AssemblyQualifiedName;
+        }
+
+        private string GetObjName(GameObject obj)
+        {
+            if(obj == null) return "NULL";
+            else return $"\'{obj.name}\'";
+        }
+
+        public override void Start()
+        {
+            GameObject.Instantiate(prefab);
+            _done = true;
+            _started = true;
+        }
+
+        public override void Update() { }
+
+        public override void Restart()
+        {
+            _done = false;
+            _started = false;
+        }
+
+        public static InstantiateGameAction JSONToInstantiateGameAction(string data)
+        {
+            return JsonUtility.FromJson<InstantiateGameAction>(data);
+        }
+
+        private InstantiateGameAction Duplicate(GameActionsController controller)
+        {
+            InstantiateGameAction action = new InstantiateGameAction(controller == null ? this.controller : controller);
+            action.controller = controller;
+            return action;
+        }
+
+        private T GetVariable<T>(string title, T defaultValue)
+        {
+            for (int i = 0; i < controller.context.variables.Count; i++)
+            {
+                if(controller.context.variables[i].name == title)
+                {
+                    return controller.context.variables[i].GetValue<T>(defaultValue);
+                }
+            }
+            return defaultValue;
+        }
+
+        public override void OnBeforeSerialize(GameActionObjectSerializer serializer, int n, int depth) 
+        { 
+            serializer.SerializeGameObject($"{depth}-{n}-Prefab", prefab);
+        }
+        public override void OnBeforeDeserialize(GameActionObjectSerializer serializer, int n, int depth) 
+        { 
+            prefab = serializer.DeserializeGameObject($"{depth}-{n}-Prefab");
+        }
+    }
+}
+

+ 11 - 0
Runtime/GameActions/Actions/InstantiateGameAction.cs.meta

@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: ec28f977ed7cd1e419754e89b1e5bc10
+MonoImporter:
+  externalObjects: {}
+  serializedVersion: 2
+  defaultReferences: []
+  executionOrder: 0
+  icon: {instanceID: 0}
+  userData: 
+  assetBundleName: 
+  assetBundleVariant: 

+ 177 - 0
Runtime/GameActions/Actions/StringManipulationGameAction.cs

@@ -0,0 +1,177 @@
+using System.Collections;
+using System.Linq;
+using System.Collections.Generic;
+using UnityEngine;
+using Sirenix.OdinInspector;
+using KairoEngine.Core;
+
+namespace KairoEngine.Core.GameActions
+{
+    [System.Serializable, HideReferenceObjectPicker]
+    public class StringManipulationGameAction : GameActionBase
+    {
+        public enum VariableType
+        {
+            String,
+            Variable
+        }
+
+        public enum StringManipulation
+        {
+            AddToString,
+            SubtractFromString,
+        }
+
+        public override string name 
+        { 
+            get
+            {
+                return $"Manipulate string";
+            }
+        }
+
+        public override GameActionsController controller { 
+            get => _controller; 
+            set 
+            {
+                _controller = value;
+                typeName = "StringManipulationGameAction";
+                className =  this.GetType().AssemblyQualifiedName;
+                GetCompatibleVariablenames();
+            }
+        }
+        public override string GetTypeName() => "StringManipulationGameAction";
+        public override string GetActionName() => "Core/String Manipulation";
+
+        [IconFoldoutGroup("@name", "Assets/Plugins/KairoEngine/Core/Editor/Icons/DebugLogGameActionIcon.png")] 
+        public VariableType variableType1 = VariableType.String;
+        
+        [IconFoldoutGroup("@name"), ShowIf("@variableType1 == VariableType.String")]
+        public string value1 = "custom string";
+
+        [IconFoldoutGroup("@name"), ShowIf("@variableType1 == VariableType.Variable")]
+        [ValueDropdown("possibleVariables", IsUniqueList = false)]
+        public string variable1;
+
+        [IconFoldoutGroup("@name")] 
+        public VariableType variableType2 = VariableType.String;
+
+        [IconFoldoutGroup("@name"), ShowIf("@variableType2 == VariableType.String")]
+        public string value2 = "custom string";
+
+        [IconFoldoutGroup("@name"), ShowIf("@variableType2 == VariableType.Variable")]
+        [ValueDropdown("possibleVariables", IsUniqueList = false)]
+        public string variable2;
+
+        [IconFoldoutGroup("@name")]
+        public StringManipulation operation = StringManipulation.SubtractFromString;
+
+        [IconFoldoutGroup("@name"), ShowIf("@operation == StringManipulation.AddToString")]
+        public string separator = "";
+
+        [IconFoldoutGroup("@name")]
+        [ValueDropdown("possibleVariables", IsUniqueList = false)]
+        public string saveToVariable;
+
+        private string result = "";
+        
+
+        private IEnumerable possibleVariables = new ValueDropdownList<string>();
+
+        public StringManipulationGameAction(GameActionsController controller) : base(controller)
+        {
+            this.controller = controller;
+            className =  this.GetType().AssemblyQualifiedName;
+        }
+
+        public override void Start()
+        {
+            result = "";
+            if(variableType1 == VariableType.Variable) value1 = GetVariable(variable1);
+            if(variableType2 == VariableType.Variable) value2 = GetVariable(variable2);
+            switch (operation)
+            {
+                case StringManipulation.AddToString:
+                    result = value1 + separator + value2;
+                    break;
+                case StringManipulation.SubtractFromString:
+                    result = value1.Replace(value2, "");
+                    break;
+                default:
+                    break;
+            }
+            SaveToVariable(saveToVariable, result);
+            _done = true;
+            _started = true;
+        }
+
+        public override void Update() { }
+
+        public override void Restart()
+        {
+            _done = false;
+            _started = false;
+        }
+
+        private void GetCompatibleVariablenames()
+        {
+            if(_controller == null) return;
+            if(_controller.context == null) return;
+            possibleVariables = _controller.context.variables
+                //.Where(x => x.data is GameActionContextString)
+                .Select(x => new ValueDropdownItem(x.name, x.name)); 
+        }
+
+        public static StringManipulationGameAction JSONToStringManipulationGameAction(string data)
+        {
+            return JsonUtility.FromJson<StringManipulationGameAction>(data);
+        }
+
+        private StringManipulationGameAction Duplicate(GameActionsController controller = null)
+        {
+            StringManipulationGameAction action = new StringManipulationGameAction(controller == null ? this.controller : controller);
+            action.controller = controller;
+            action.variableType1 = variableType1;
+            action.value1 = value1;
+            action.variable1 = variable1;
+            action.variableType2 = variableType2;
+            action.value2 = value2;
+            action.variable2 = variable2;
+            action.operation = operation;
+            action.separator = separator;
+            action.saveToVariable = saveToVariable;
+            return action;
+        }
+
+        private string GetVariable(string title)
+        {
+            if(controller == null) return "";
+            if(controller.context == null) return "";
+            for (int i = 0; i < controller.context.variables.Count; i++)
+            {
+                if(controller.context.variables[i].name == title)
+                {
+                    string value = controller.context.variables[i].GetValue<string>("");
+                    if(value != "") return value;
+                }
+            }
+            return "";
+        }
+
+        private void SaveToVariable(string title, string data)
+        {
+            if(controller == null) return;
+            if(controller.context == null) return;
+            for (int i = 0; i < controller.context.variables.Count; i++)
+            {
+                if(controller.context.variables[i].name == title)
+                {
+                    controller.context.variables[i].SetValue<string>(data);
+                    break;
+                }
+            }
+        }
+
+    }
+}
+

Niektoré súbory nie sú zobrazené, pretože je v týchto rozdielových dátach zmenené mnoho súborov