├── Assets ├── Libraries.meta ├── Libraries │ ├── Entitas.meta │ └── Entitas │ │ ├── Compile.cs │ │ ├── Compile.cs.meta │ │ ├── DesperateDevs.Logging.dll │ │ ├── DesperateDevs.Logging.dll.meta │ │ ├── DesperateDevs.Utils.dll │ │ ├── DesperateDevs.Utils.dll.meta │ │ ├── Editor.meta │ │ ├── Editor │ │ ├── DesperateDevs.Analytics.dll │ │ ├── DesperateDevs.Analytics.dll.meta │ │ ├── DesperateDevs.CodeGeneration.CodeGenerator.Unity.Editor.dll │ │ ├── DesperateDevs.CodeGeneration.CodeGenerator.Unity.Editor.dll.meta │ │ ├── DesperateDevs.CodeGeneration.CodeGenerator.dll │ │ ├── DesperateDevs.CodeGeneration.CodeGenerator.dll.meta │ │ ├── DesperateDevs.CodeGeneration.dll │ │ ├── DesperateDevs.CodeGeneration.dll.meta │ │ ├── DesperateDevs.Networking.dll │ │ ├── DesperateDevs.Networking.dll.meta │ │ ├── DesperateDevs.Serialization.dll │ │ ├── DesperateDevs.Serialization.dll.meta │ │ ├── DesperateDevs.Unity.Editor.dll │ │ ├── DesperateDevs.Unity.Editor.dll.meta │ │ ├── Entitas.Migration.Unity.Editor.dll │ │ ├── Entitas.Migration.Unity.Editor.dll.meta │ │ ├── Entitas.Migration.dll │ │ ├── Entitas.Migration.dll.meta │ │ ├── Entitas.Unity.Editor.dll │ │ ├── Entitas.Unity.Editor.dll.meta │ │ ├── Entitas.VisualDebugging.Unity.Editor.dll │ │ ├── Entitas.VisualDebugging.Unity.Editor.dll.meta │ │ ├── Images.meta │ │ ├── Images │ │ │ ├── EntitasContextErrorHierarchyIcon.png │ │ │ ├── EntitasContextErrorHierarchyIcon.png.meta │ │ │ ├── EntitasContextHierarchyIcon.png │ │ │ ├── EntitasContextHierarchyIcon.png.meta │ │ │ ├── EntitasEntityErrorHierarchyIcon.png │ │ │ ├── EntitasEntityErrorHierarchyIcon.png.meta │ │ │ ├── EntitasEntityHierarchyIcon.png │ │ │ ├── EntitasEntityHierarchyIcon.png.meta │ │ │ ├── EntitasHeader.png │ │ │ ├── EntitasHeader.png.meta │ │ │ ├── EntitasSystemsErrorHierarchyIcon.png │ │ │ ├── EntitasSystemsErrorHierarchyIcon.png.meta │ │ │ ├── EntitasSystemsHierarchyIcon.png │ │ │ └── EntitasSystemsHierarchyIcon.png.meta │ │ ├── Plugins.meta │ │ └── Plugins │ │ │ ├── DesperateDevs.meta │ │ │ ├── DesperateDevs │ │ │ ├── DesperateDevs.CodeGeneration.Plugins.dll │ │ │ ├── DesperateDevs.CodeGeneration.Plugins.dll.meta │ │ │ ├── DesperateDevs.CodeGeneration.Unity.Plugins.dll │ │ │ └── DesperateDevs.CodeGeneration.Unity.Plugins.dll.meta │ │ │ ├── Entitas.meta │ │ │ └── Entitas │ │ │ ├── Entitas.CodeGeneration.Plugins.dll │ │ │ ├── Entitas.CodeGeneration.Plugins.dll.meta │ │ │ ├── Entitas.VisualDebugging.CodeGeneration.Plugins.dll │ │ │ └── Entitas.VisualDebugging.CodeGeneration.Plugins.dll.meta │ │ ├── Entitas.CodeGeneration.Attributes.dll │ │ ├── Entitas.CodeGeneration.Attributes.dll.meta │ │ ├── Entitas.Unity.dll │ │ ├── Entitas.Unity.dll.meta │ │ ├── Entitas.VisualDebugging.Unity.dll │ │ ├── Entitas.VisualDebugging.Unity.dll.meta │ │ ├── Entitas.dll │ │ ├── Entitas.dll.meta │ │ ├── EntitasUpgradeGuide.md │ │ ├── EntitasUpgradeGuide.md.meta │ │ ├── LICENSE.txt │ │ ├── LICENSE.txt.meta │ │ ├── README.md │ │ ├── README.md.meta │ │ ├── RELEASE_NOTES.md │ │ └── RELEASE_NOTES.md.meta ├── Scenes.meta ├── Scenes │ ├── GameFSM.unity │ └── GameFSM.unity.meta ├── Sources.meta └── Sources │ ├── GameFSMPackage.meta │ ├── GameFSMPackage │ ├── Components.meta │ ├── Components │ │ ├── FSMComponents.cs │ │ └── FSMComponents.cs.meta │ ├── Prefabs.meta │ ├── Prefabs │ │ ├── TestCube.prefab │ │ └── TestCube.prefab.meta │ ├── README │ ├── README.meta │ ├── Scripts.meta │ ├── Scripts │ │ ├── FSMDelayEventAdapter.cs │ │ ├── FSMDelayEventAdapter.cs.meta │ │ ├── FSMEventAdapter.cs │ │ ├── FSMEventAdapter.cs.meta │ │ ├── FSMGameController.cs │ │ └── FSMGameController.cs.meta │ ├── Services.meta │ ├── Services │ │ ├── FSMAdatpterService.cs │ │ ├── FSMAdatpterService.cs.meta │ │ ├── FSMDebugService.cs │ │ ├── FSMDebugService.cs.meta │ │ ├── FSMServices.cs │ │ ├── FSMServices.cs.meta │ │ ├── FSMSwitchService.cs │ │ └── FSMSwitchService.cs.meta │ ├── Systems.meta │ └── Systems │ │ ├── FSMAdapterSystem.cs │ │ ├── FSMAdapterSystem.cs.meta │ │ ├── FSMHoldSystem.cs │ │ ├── FSMHoldSystem.cs.meta │ │ ├── FSMProcessingSystem.cs │ │ ├── FSMProcessingSystem.cs.meta │ │ ├── FSMResetSystem.cs │ │ ├── FSMResetSystem.cs.meta │ │ ├── FSMReturnSystem.cs │ │ ├── FSMReturnSystem.cs.meta │ │ ├── FSMSwitchSystem.cs │ │ ├── FSMSwitchSystem.cs.meta │ │ ├── FSMSystems.cs │ │ ├── FSMSystems.cs.meta │ │ ├── UniTest.meta │ │ └── UniTest │ │ ├── FSMUniTestSystem.cs │ │ └── FSMUniTestSystem.cs.meta │ ├── Generated.meta │ └── Generated │ ├── Contexts.cs │ ├── Contexts.cs.meta │ ├── Events.meta │ ├── Events │ ├── Components.meta │ ├── Components │ │ ├── FSMProcessingListenerComponent.cs │ │ └── FSMProcessingListenerComponent.cs.meta │ ├── EventSystems.cs │ ├── EventSystems.cs.meta │ ├── Interfaces.meta │ ├── Interfaces │ │ ├── IFSMProcessingListener.cs │ │ └── IFSMProcessingListener.cs.meta │ ├── Systems.meta │ └── Systems │ │ ├── FSMProcessingEventSystem.cs │ │ └── FSMProcessingEventSystem.cs.meta │ ├── Feature.cs │ ├── Feature.cs.meta │ ├── Game.meta │ └── Game │ ├── Components.meta │ ├── Components │ ├── GameFSMAdapterComponent.cs │ ├── GameFSMAdapterComponent.cs.meta │ ├── GameFSMContinueComponent.cs │ ├── GameFSMContinueComponent.cs.meta │ ├── GameFSMHoldComponent.cs │ ├── GameFSMHoldComponent.cs.meta │ ├── GameFSMProcessingCntComponent.cs │ ├── GameFSMProcessingCntComponent.cs.meta │ ├── GameFSMProcessingComponent.cs │ ├── GameFSMProcessingComponent.cs.meta │ ├── GameFSMProcessingListenerComponent.cs │ ├── GameFSMProcessingListenerComponent.cs.meta │ ├── GameFSMResetComponent.cs │ ├── GameFSMResetComponent.cs.meta │ ├── GameFSMReturnComponent.cs │ ├── GameFSMReturnComponent.cs.meta │ ├── GameFSMStackComponent.cs │ ├── GameFSMStackComponent.cs.meta │ ├── GameFSMStateComponent.cs │ ├── GameFSMStateComponent.cs.meta │ ├── GameFSMSwitchComponent.cs │ └── GameFSMSwitchComponent.cs.meta │ ├── GameAttribute.cs │ ├── GameAttribute.cs.meta │ ├── GameComponentsLookup.cs │ ├── GameComponentsLookup.cs.meta │ ├── GameContext.cs │ ├── GameContext.cs.meta │ ├── GameEntity.cs │ ├── GameEntity.cs.meta │ ├── GameMatcher.cs │ └── GameMatcher.cs.meta ├── FSMSystems.png └── README.md /Assets/Libraries.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 87b09731bd3904949a18b4b374bdc7a2 3 | folderAsset: yes 4 | timeCreated: 1533459893 5 | licenseType: Free 6 | DefaultImporter: 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /Assets/Libraries/Entitas.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 0b10801c45dbc4a19a53289033b8f8e6 3 | folderAsset: yes 4 | timeCreated: 1521858289 5 | licenseType: Free 6 | DefaultImporter: 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /Assets/Libraries/Entitas/Compile.cs: -------------------------------------------------------------------------------- 1 | namespace DesperateDevs.CodeGeneration.CodeGenerator.Unity.Editor { 2 | 3 | class Compile { 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /Assets/Libraries/Entitas/Compile.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 9eab34a24c570499184bb6d23f3a446e 3 | timeCreated: 1521858301 4 | licenseType: Free 5 | MonoImporter: 6 | serializedVersion: 2 7 | defaultReferences: [] 8 | executionOrder: 0 9 | icon: {instanceID: 0} 10 | userData: 11 | assetBundleName: 12 | assetBundleVariant: 13 | -------------------------------------------------------------------------------- /Assets/Libraries/Entitas/DesperateDevs.Logging.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AlexCCLin/Entitas-GameFSM/bac2c1a51820df70a2c4948e990a8cca47686c30/Assets/Libraries/Entitas/DesperateDevs.Logging.dll -------------------------------------------------------------------------------- /Assets/Libraries/Entitas/DesperateDevs.Logging.dll.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: a00e0b6c43f2c43aca22373e6b5144b8 3 | timeCreated: 1521858295 4 | licenseType: Free 5 | PluginImporter: 6 | serializedVersion: 1 7 | iconMap: {} 8 | executionOrder: {} 9 | isPreloaded: 0 10 | platformData: 11 | Any: 12 | enabled: 1 13 | settings: {} 14 | Editor: 15 | enabled: 0 16 | settings: 17 | DefaultValueInitialized: true 18 | WindowsStoreApps: 19 | enabled: 0 20 | settings: 21 | CPU: AnyCPU 22 | userData: 23 | assetBundleName: 24 | assetBundleVariant: 25 | -------------------------------------------------------------------------------- /Assets/Libraries/Entitas/DesperateDevs.Utils.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AlexCCLin/Entitas-GameFSM/bac2c1a51820df70a2c4948e990a8cca47686c30/Assets/Libraries/Entitas/DesperateDevs.Utils.dll -------------------------------------------------------------------------------- /Assets/Libraries/Entitas/DesperateDevs.Utils.dll.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: cace518b968504ee58b23122a5786b63 3 | timeCreated: 1521858298 4 | licenseType: Free 5 | PluginImporter: 6 | serializedVersion: 1 7 | iconMap: {} 8 | executionOrder: {} 9 | isPreloaded: 0 10 | platformData: 11 | Any: 12 | enabled: 1 13 | settings: {} 14 | Editor: 15 | enabled: 0 16 | settings: 17 | DefaultValueInitialized: true 18 | WindowsStoreApps: 19 | enabled: 0 20 | settings: 21 | CPU: AnyCPU 22 | userData: 23 | assetBundleName: 24 | assetBundleVariant: 25 | -------------------------------------------------------------------------------- /Assets/Libraries/Entitas/Editor.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 43ec08ae6fd4345c9a1175fffc5224d7 3 | folderAsset: yes 4 | timeCreated: 1521858289 5 | licenseType: Free 6 | DefaultImporter: 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /Assets/Libraries/Entitas/Editor/DesperateDevs.Analytics.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AlexCCLin/Entitas-GameFSM/bac2c1a51820df70a2c4948e990a8cca47686c30/Assets/Libraries/Entitas/Editor/DesperateDevs.Analytics.dll -------------------------------------------------------------------------------- /Assets/Libraries/Entitas/Editor/DesperateDevs.Analytics.dll.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: ce50ea4daf23145a4855ede273cc1bd1 3 | timeCreated: 1521858298 4 | licenseType: Free 5 | PluginImporter: 6 | serializedVersion: 1 7 | iconMap: {} 8 | executionOrder: {} 9 | isPreloaded: 0 10 | platformData: 11 | Any: 12 | enabled: 0 13 | settings: {} 14 | Editor: 15 | enabled: 1 16 | settings: 17 | DefaultValueInitialized: true 18 | WindowsStoreApps: 19 | enabled: 0 20 | settings: 21 | CPU: AnyCPU 22 | userData: 23 | assetBundleName: 24 | assetBundleVariant: 25 | -------------------------------------------------------------------------------- /Assets/Libraries/Entitas/Editor/DesperateDevs.CodeGeneration.CodeGenerator.Unity.Editor.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AlexCCLin/Entitas-GameFSM/bac2c1a51820df70a2c4948e990a8cca47686c30/Assets/Libraries/Entitas/Editor/DesperateDevs.CodeGeneration.CodeGenerator.Unity.Editor.dll -------------------------------------------------------------------------------- /Assets/Libraries/Entitas/Editor/DesperateDevs.CodeGeneration.CodeGenerator.Unity.Editor.dll.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: ffa07eedc3538429c933818dc252aeea 3 | timeCreated: 1521858301 4 | licenseType: Free 5 | PluginImporter: 6 | serializedVersion: 1 7 | iconMap: {} 8 | executionOrder: {} 9 | isPreloaded: 0 10 | platformData: 11 | Any: 12 | enabled: 0 13 | settings: {} 14 | Editor: 15 | enabled: 1 16 | settings: 17 | DefaultValueInitialized: true 18 | WindowsStoreApps: 19 | enabled: 0 20 | settings: 21 | CPU: AnyCPU 22 | userData: 23 | assetBundleName: 24 | assetBundleVariant: 25 | -------------------------------------------------------------------------------- /Assets/Libraries/Entitas/Editor/DesperateDevs.CodeGeneration.CodeGenerator.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AlexCCLin/Entitas-GameFSM/bac2c1a51820df70a2c4948e990a8cca47686c30/Assets/Libraries/Entitas/Editor/DesperateDevs.CodeGeneration.CodeGenerator.dll -------------------------------------------------------------------------------- /Assets/Libraries/Entitas/Editor/DesperateDevs.CodeGeneration.CodeGenerator.dll.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: e4a11fc993b4347c7af9409aeb62e313 3 | timeCreated: 1521858299 4 | licenseType: Free 5 | PluginImporter: 6 | serializedVersion: 1 7 | iconMap: {} 8 | executionOrder: {} 9 | isPreloaded: 0 10 | platformData: 11 | Any: 12 | enabled: 0 13 | settings: {} 14 | Editor: 15 | enabled: 1 16 | settings: 17 | DefaultValueInitialized: true 18 | WindowsStoreApps: 19 | enabled: 0 20 | settings: 21 | CPU: AnyCPU 22 | userData: 23 | assetBundleName: 24 | assetBundleVariant: 25 | -------------------------------------------------------------------------------- /Assets/Libraries/Entitas/Editor/DesperateDevs.CodeGeneration.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AlexCCLin/Entitas-GameFSM/bac2c1a51820df70a2c4948e990a8cca47686c30/Assets/Libraries/Entitas/Editor/DesperateDevs.CodeGeneration.dll -------------------------------------------------------------------------------- /Assets/Libraries/Entitas/Editor/DesperateDevs.CodeGeneration.dll.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 73031d8fc74c949d79a6c5f4c75f320e 3 | timeCreated: 1521858293 4 | licenseType: Free 5 | PluginImporter: 6 | serializedVersion: 1 7 | iconMap: {} 8 | executionOrder: {} 9 | isPreloaded: 0 10 | platformData: 11 | Any: 12 | enabled: 0 13 | settings: {} 14 | Editor: 15 | enabled: 1 16 | settings: 17 | DefaultValueInitialized: true 18 | WindowsStoreApps: 19 | enabled: 0 20 | settings: 21 | CPU: AnyCPU 22 | userData: 23 | assetBundleName: 24 | assetBundleVariant: 25 | -------------------------------------------------------------------------------- /Assets/Libraries/Entitas/Editor/DesperateDevs.Networking.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AlexCCLin/Entitas-GameFSM/bac2c1a51820df70a2c4948e990a8cca47686c30/Assets/Libraries/Entitas/Editor/DesperateDevs.Networking.dll -------------------------------------------------------------------------------- /Assets/Libraries/Entitas/Editor/DesperateDevs.Networking.dll.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: aef87e8782d0a4180aa3dfc91a47805d 3 | timeCreated: 1521858297 4 | licenseType: Free 5 | PluginImporter: 6 | serializedVersion: 1 7 | iconMap: {} 8 | executionOrder: {} 9 | isPreloaded: 0 10 | platformData: 11 | Any: 12 | enabled: 0 13 | settings: {} 14 | Editor: 15 | enabled: 1 16 | settings: 17 | DefaultValueInitialized: true 18 | WindowsStoreApps: 19 | enabled: 0 20 | settings: 21 | CPU: AnyCPU 22 | userData: 23 | assetBundleName: 24 | assetBundleVariant: 25 | -------------------------------------------------------------------------------- /Assets/Libraries/Entitas/Editor/DesperateDevs.Serialization.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AlexCCLin/Entitas-GameFSM/bac2c1a51820df70a2c4948e990a8cca47686c30/Assets/Libraries/Entitas/Editor/DesperateDevs.Serialization.dll -------------------------------------------------------------------------------- /Assets/Libraries/Entitas/Editor/DesperateDevs.Serialization.dll.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: a8e1353453bc0492f9f5cf3a8aa9400e 3 | timeCreated: 1521858297 4 | licenseType: Free 5 | PluginImporter: 6 | serializedVersion: 1 7 | iconMap: {} 8 | executionOrder: {} 9 | isPreloaded: 0 10 | platformData: 11 | Any: 12 | enabled: 0 13 | settings: {} 14 | Editor: 15 | enabled: 1 16 | settings: 17 | DefaultValueInitialized: true 18 | WindowsStoreApps: 19 | enabled: 0 20 | settings: 21 | CPU: AnyCPU 22 | userData: 23 | assetBundleName: 24 | assetBundleVariant: 25 | -------------------------------------------------------------------------------- /Assets/Libraries/Entitas/Editor/DesperateDevs.Unity.Editor.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AlexCCLin/Entitas-GameFSM/bac2c1a51820df70a2c4948e990a8cca47686c30/Assets/Libraries/Entitas/Editor/DesperateDevs.Unity.Editor.dll -------------------------------------------------------------------------------- /Assets/Libraries/Entitas/Editor/DesperateDevs.Unity.Editor.dll.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 3016dc2078d58463badc7dc6d3e8b352 3 | timeCreated: 1521858292 4 | licenseType: Free 5 | PluginImporter: 6 | serializedVersion: 1 7 | iconMap: {} 8 | executionOrder: {} 9 | isPreloaded: 0 10 | platformData: 11 | Any: 12 | enabled: 0 13 | settings: {} 14 | Editor: 15 | enabled: 1 16 | settings: 17 | DefaultValueInitialized: true 18 | WindowsStoreApps: 19 | enabled: 0 20 | settings: 21 | CPU: AnyCPU 22 | userData: 23 | assetBundleName: 24 | assetBundleVariant: 25 | -------------------------------------------------------------------------------- /Assets/Libraries/Entitas/Editor/Entitas.Migration.Unity.Editor.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AlexCCLin/Entitas-GameFSM/bac2c1a51820df70a2c4948e990a8cca47686c30/Assets/Libraries/Entitas/Editor/Entitas.Migration.Unity.Editor.dll -------------------------------------------------------------------------------- /Assets/Libraries/Entitas/Editor/Entitas.Migration.Unity.Editor.dll.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 12a5b26dd95b84de6bcd44834be9eb03 3 | timeCreated: 1521858291 4 | licenseType: Free 5 | PluginImporter: 6 | serializedVersion: 1 7 | iconMap: {} 8 | executionOrder: {} 9 | isPreloaded: 0 10 | platformData: 11 | Any: 12 | enabled: 0 13 | settings: {} 14 | Editor: 15 | enabled: 1 16 | settings: 17 | DefaultValueInitialized: true 18 | WindowsStoreApps: 19 | enabled: 0 20 | settings: 21 | CPU: AnyCPU 22 | userData: 23 | assetBundleName: 24 | assetBundleVariant: 25 | -------------------------------------------------------------------------------- /Assets/Libraries/Entitas/Editor/Entitas.Migration.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AlexCCLin/Entitas-GameFSM/bac2c1a51820df70a2c4948e990a8cca47686c30/Assets/Libraries/Entitas/Editor/Entitas.Migration.dll -------------------------------------------------------------------------------- /Assets/Libraries/Entitas/Editor/Entitas.Migration.dll.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 00b1c6e0b82144d918829b8b4068b49b 3 | timeCreated: 1521858290 4 | licenseType: Free 5 | PluginImporter: 6 | serializedVersion: 1 7 | iconMap: {} 8 | executionOrder: {} 9 | isPreloaded: 0 10 | platformData: 11 | Any: 12 | enabled: 0 13 | settings: {} 14 | Editor: 15 | enabled: 1 16 | settings: 17 | DefaultValueInitialized: true 18 | WindowsStoreApps: 19 | enabled: 0 20 | settings: 21 | CPU: AnyCPU 22 | userData: 23 | assetBundleName: 24 | assetBundleVariant: 25 | -------------------------------------------------------------------------------- /Assets/Libraries/Entitas/Editor/Entitas.Unity.Editor.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AlexCCLin/Entitas-GameFSM/bac2c1a51820df70a2c4948e990a8cca47686c30/Assets/Libraries/Entitas/Editor/Entitas.Unity.Editor.dll -------------------------------------------------------------------------------- /Assets/Libraries/Entitas/Editor/Entitas.Unity.Editor.dll.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 76b531c48fddf4ebfa8a22f959e5d800 3 | timeCreated: 1521858294 4 | licenseType: Free 5 | PluginImporter: 6 | serializedVersion: 1 7 | iconMap: {} 8 | executionOrder: {} 9 | isPreloaded: 0 10 | platformData: 11 | Any: 12 | enabled: 0 13 | settings: {} 14 | Editor: 15 | enabled: 1 16 | settings: 17 | DefaultValueInitialized: true 18 | WindowsStoreApps: 19 | enabled: 0 20 | settings: 21 | CPU: AnyCPU 22 | userData: 23 | assetBundleName: 24 | assetBundleVariant: 25 | -------------------------------------------------------------------------------- /Assets/Libraries/Entitas/Editor/Entitas.VisualDebugging.Unity.Editor.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AlexCCLin/Entitas-GameFSM/bac2c1a51820df70a2c4948e990a8cca47686c30/Assets/Libraries/Entitas/Editor/Entitas.VisualDebugging.Unity.Editor.dll -------------------------------------------------------------------------------- /Assets/Libraries/Entitas/Editor/Entitas.VisualDebugging.Unity.Editor.dll.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: a3cf31ba0acef4d00adc38463444581c 3 | timeCreated: 1521858296 4 | licenseType: Free 5 | PluginImporter: 6 | serializedVersion: 1 7 | iconMap: {} 8 | executionOrder: {} 9 | isPreloaded: 0 10 | platformData: 11 | Any: 12 | enabled: 0 13 | settings: {} 14 | Editor: 15 | enabled: 1 16 | settings: 17 | DefaultValueInitialized: true 18 | WindowsStoreApps: 19 | enabled: 0 20 | settings: 21 | CPU: AnyCPU 22 | userData: 23 | assetBundleName: 24 | assetBundleVariant: 25 | -------------------------------------------------------------------------------- /Assets/Libraries/Entitas/Editor/Images.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 1ac88bfe119334ad285b2b08a76defc5 3 | folderAsset: yes 4 | timeCreated: 1521858289 5 | licenseType: Free 6 | DefaultImporter: 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /Assets/Libraries/Entitas/Editor/Images/EntitasContextErrorHierarchyIcon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AlexCCLin/Entitas-GameFSM/bac2c1a51820df70a2c4948e990a8cca47686c30/Assets/Libraries/Entitas/Editor/Images/EntitasContextErrorHierarchyIcon.png -------------------------------------------------------------------------------- /Assets/Libraries/Entitas/Editor/Images/EntitasContextErrorHierarchyIcon.png.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 35e2fad360fea426684933179da777df 3 | labels: 4 | - EntitasContextErrorHierarchyIcon 5 | timeCreated: 1458954327 6 | licenseType: Pro 7 | TextureImporter: 8 | fileIDToRecycleName: {} 9 | serializedVersion: 4 10 | mipmaps: 11 | mipMapMode: 0 12 | enableMipMap: 0 13 | sRGBTexture: 0 14 | linearTexture: 0 15 | fadeOut: 0 16 | borderMipMap: 0 17 | mipMapFadeDistanceStart: 1 18 | mipMapFadeDistanceEnd: 3 19 | bumpmap: 20 | convertToNormalMap: 0 21 | externalNormalMap: 0 22 | heightScale: 0.25 23 | normalMapFilter: 0 24 | isReadable: 0 25 | grayScaleToAlpha: 0 26 | generateCubemap: 6 27 | cubemapConvolution: 0 28 | seamlessCubemap: 0 29 | textureFormat: -3 30 | maxTextureSize: 256 31 | textureSettings: 32 | filterMode: 0 33 | aniso: -1 34 | mipBias: -1 35 | wrapMode: -1 36 | nPOTScale: 1 37 | lightmap: 0 38 | compressionQuality: 50 39 | spriteMode: 0 40 | spriteExtrude: 1 41 | spriteMeshType: 1 42 | alignment: 0 43 | spritePivot: {x: 0.5, y: 0.5} 44 | spriteBorder: {x: 0, y: 0, z: 0, w: 0} 45 | spritePixelsToUnits: 100 46 | alphaUsage: 1 47 | alphaIsTransparency: 1 48 | spriteTessellationDetail: -1 49 | textureType: 0 50 | textureShape: 1 51 | maxTextureSizeSet: 0 52 | compressionQualitySet: 0 53 | textureFormatSet: 0 54 | platformSettings: 55 | - buildTarget: DefaultTexturePlatform 56 | maxTextureSize: 256 57 | textureFormat: -1 58 | textureCompression: 0 59 | compressionQuality: 50 60 | crunchedCompression: 0 61 | allowsAlphaSplitting: 0 62 | overridden: 0 63 | - buildTarget: Standalone 64 | maxTextureSize: 256 65 | textureFormat: -1 66 | textureCompression: 0 67 | compressionQuality: 50 68 | crunchedCompression: 0 69 | allowsAlphaSplitting: 0 70 | overridden: 0 71 | - buildTarget: iPhone 72 | maxTextureSize: 256 73 | textureFormat: -1 74 | textureCompression: 0 75 | compressionQuality: 50 76 | crunchedCompression: 0 77 | allowsAlphaSplitting: 0 78 | overridden: 0 79 | - buildTarget: Android 80 | maxTextureSize: 256 81 | textureFormat: -1 82 | textureCompression: 0 83 | compressionQuality: 50 84 | crunchedCompression: 0 85 | allowsAlphaSplitting: 0 86 | overridden: 0 87 | - buildTarget: WebGL 88 | maxTextureSize: 256 89 | textureFormat: -1 90 | textureCompression: 0 91 | compressionQuality: 50 92 | crunchedCompression: 0 93 | allowsAlphaSplitting: 0 94 | overridden: 0 95 | spriteSheet: 96 | serializedVersion: 2 97 | sprites: [] 98 | outline: [] 99 | spritePackingTag: 100 | userData: 101 | assetBundleName: 102 | assetBundleVariant: 103 | -------------------------------------------------------------------------------- /Assets/Libraries/Entitas/Editor/Images/EntitasContextHierarchyIcon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AlexCCLin/Entitas-GameFSM/bac2c1a51820df70a2c4948e990a8cca47686c30/Assets/Libraries/Entitas/Editor/Images/EntitasContextHierarchyIcon.png -------------------------------------------------------------------------------- /Assets/Libraries/Entitas/Editor/Images/EntitasContextHierarchyIcon.png.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: e23ad41464ef945d784cdb90d844e6c4 3 | labels: 4 | - EntitasContextHierarchyIcon 5 | timeCreated: 1457898659 6 | licenseType: Pro 7 | TextureImporter: 8 | fileIDToRecycleName: {} 9 | serializedVersion: 4 10 | mipmaps: 11 | mipMapMode: 0 12 | enableMipMap: 0 13 | sRGBTexture: 0 14 | linearTexture: 0 15 | fadeOut: 0 16 | borderMipMap: 0 17 | mipMapFadeDistanceStart: 1 18 | mipMapFadeDistanceEnd: 3 19 | bumpmap: 20 | convertToNormalMap: 0 21 | externalNormalMap: 0 22 | heightScale: 0.25 23 | normalMapFilter: 0 24 | isReadable: 0 25 | grayScaleToAlpha: 0 26 | generateCubemap: 6 27 | cubemapConvolution: 0 28 | seamlessCubemap: 0 29 | textureFormat: -3 30 | maxTextureSize: 256 31 | textureSettings: 32 | filterMode: 0 33 | aniso: -1 34 | mipBias: -1 35 | wrapMode: -1 36 | nPOTScale: 1 37 | lightmap: 0 38 | compressionQuality: 50 39 | spriteMode: 0 40 | spriteExtrude: 1 41 | spriteMeshType: 1 42 | alignment: 0 43 | spritePivot: {x: 0.5, y: 0.5} 44 | spriteBorder: {x: 0, y: 0, z: 0, w: 0} 45 | spritePixelsToUnits: 100 46 | alphaUsage: 1 47 | alphaIsTransparency: 1 48 | spriteTessellationDetail: -1 49 | textureType: 0 50 | textureShape: 1 51 | maxTextureSizeSet: 0 52 | compressionQualitySet: 0 53 | textureFormatSet: 0 54 | platformSettings: 55 | - buildTarget: DefaultTexturePlatform 56 | maxTextureSize: 256 57 | textureFormat: -1 58 | textureCompression: 0 59 | compressionQuality: 50 60 | crunchedCompression: 0 61 | allowsAlphaSplitting: 0 62 | overridden: 0 63 | - buildTarget: Standalone 64 | maxTextureSize: 256 65 | textureFormat: -1 66 | textureCompression: 0 67 | compressionQuality: 50 68 | crunchedCompression: 0 69 | allowsAlphaSplitting: 0 70 | overridden: 0 71 | - buildTarget: iPhone 72 | maxTextureSize: 256 73 | textureFormat: -1 74 | textureCompression: 0 75 | compressionQuality: 50 76 | crunchedCompression: 0 77 | allowsAlphaSplitting: 0 78 | overridden: 0 79 | - buildTarget: Android 80 | maxTextureSize: 256 81 | textureFormat: -1 82 | textureCompression: 0 83 | compressionQuality: 50 84 | crunchedCompression: 0 85 | allowsAlphaSplitting: 0 86 | overridden: 0 87 | - buildTarget: WebGL 88 | maxTextureSize: 256 89 | textureFormat: -1 90 | textureCompression: 0 91 | compressionQuality: 50 92 | crunchedCompression: 0 93 | allowsAlphaSplitting: 0 94 | overridden: 0 95 | spriteSheet: 96 | serializedVersion: 2 97 | sprites: [] 98 | outline: [] 99 | spritePackingTag: 100 | userData: 101 | assetBundleName: 102 | assetBundleVariant: 103 | -------------------------------------------------------------------------------- /Assets/Libraries/Entitas/Editor/Images/EntitasEntityErrorHierarchyIcon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AlexCCLin/Entitas-GameFSM/bac2c1a51820df70a2c4948e990a8cca47686c30/Assets/Libraries/Entitas/Editor/Images/EntitasEntityErrorHierarchyIcon.png -------------------------------------------------------------------------------- /Assets/Libraries/Entitas/Editor/Images/EntitasEntityErrorHierarchyIcon.png.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 06bc0e5b0b5124fca8f5d7dde1d012b0 3 | labels: 4 | - EntitasEntityErrorHierarchyIcon 5 | timeCreated: 1461325930 6 | licenseType: Pro 7 | TextureImporter: 8 | fileIDToRecycleName: {} 9 | serializedVersion: 4 10 | mipmaps: 11 | mipMapMode: 0 12 | enableMipMap: 0 13 | sRGBTexture: 0 14 | linearTexture: 0 15 | fadeOut: 0 16 | borderMipMap: 0 17 | mipMapFadeDistanceStart: 1 18 | mipMapFadeDistanceEnd: 3 19 | bumpmap: 20 | convertToNormalMap: 0 21 | externalNormalMap: 0 22 | heightScale: 0.25 23 | normalMapFilter: 0 24 | isReadable: 0 25 | grayScaleToAlpha: 0 26 | generateCubemap: 6 27 | cubemapConvolution: 0 28 | seamlessCubemap: 0 29 | textureFormat: -3 30 | maxTextureSize: 256 31 | textureSettings: 32 | filterMode: 0 33 | aniso: -1 34 | mipBias: -1 35 | wrapMode: -1 36 | nPOTScale: 1 37 | lightmap: 0 38 | compressionQuality: 50 39 | spriteMode: 0 40 | spriteExtrude: 1 41 | spriteMeshType: 1 42 | alignment: 0 43 | spritePivot: {x: 0.5, y: 0.5} 44 | spriteBorder: {x: 0, y: 0, z: 0, w: 0} 45 | spritePixelsToUnits: 100 46 | alphaUsage: 1 47 | alphaIsTransparency: 1 48 | spriteTessellationDetail: -1 49 | textureType: 0 50 | textureShape: 1 51 | maxTextureSizeSet: 0 52 | compressionQualitySet: 0 53 | textureFormatSet: 0 54 | platformSettings: 55 | - buildTarget: DefaultTexturePlatform 56 | maxTextureSize: 256 57 | textureFormat: -1 58 | textureCompression: 0 59 | compressionQuality: 50 60 | crunchedCompression: 0 61 | allowsAlphaSplitting: 0 62 | overridden: 0 63 | - buildTarget: Standalone 64 | maxTextureSize: 256 65 | textureFormat: -1 66 | textureCompression: 0 67 | compressionQuality: 50 68 | crunchedCompression: 0 69 | allowsAlphaSplitting: 0 70 | overridden: 0 71 | spriteSheet: 72 | serializedVersion: 2 73 | sprites: [] 74 | outline: [] 75 | spritePackingTag: 76 | userData: 77 | assetBundleName: 78 | assetBundleVariant: 79 | -------------------------------------------------------------------------------- /Assets/Libraries/Entitas/Editor/Images/EntitasEntityHierarchyIcon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AlexCCLin/Entitas-GameFSM/bac2c1a51820df70a2c4948e990a8cca47686c30/Assets/Libraries/Entitas/Editor/Images/EntitasEntityHierarchyIcon.png -------------------------------------------------------------------------------- /Assets/Libraries/Entitas/Editor/Images/EntitasEntityHierarchyIcon.png.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 27b806265ee874b86aa2d28aba93ace2 3 | labels: 4 | - EntitasEntityHierarchyIcon 5 | timeCreated: 1457898659 6 | licenseType: Pro 7 | TextureImporter: 8 | fileIDToRecycleName: {} 9 | serializedVersion: 4 10 | mipmaps: 11 | mipMapMode: 0 12 | enableMipMap: 0 13 | sRGBTexture: 0 14 | linearTexture: 0 15 | fadeOut: 0 16 | borderMipMap: 0 17 | mipMapFadeDistanceStart: 1 18 | mipMapFadeDistanceEnd: 3 19 | bumpmap: 20 | convertToNormalMap: 0 21 | externalNormalMap: 0 22 | heightScale: 0.25 23 | normalMapFilter: 0 24 | isReadable: 0 25 | grayScaleToAlpha: 0 26 | generateCubemap: 6 27 | cubemapConvolution: 0 28 | seamlessCubemap: 0 29 | textureFormat: -3 30 | maxTextureSize: 256 31 | textureSettings: 32 | filterMode: 0 33 | aniso: -1 34 | mipBias: -1 35 | wrapMode: -1 36 | nPOTScale: 1 37 | lightmap: 0 38 | compressionQuality: 50 39 | spriteMode: 0 40 | spriteExtrude: 1 41 | spriteMeshType: 1 42 | alignment: 0 43 | spritePivot: {x: 0.5, y: 0.5} 44 | spriteBorder: {x: 0, y: 0, z: 0, w: 0} 45 | spritePixelsToUnits: 100 46 | alphaUsage: 1 47 | alphaIsTransparency: 1 48 | spriteTessellationDetail: -1 49 | textureType: 0 50 | textureShape: 1 51 | maxTextureSizeSet: 0 52 | compressionQualitySet: 0 53 | textureFormatSet: 0 54 | platformSettings: 55 | - buildTarget: DefaultTexturePlatform 56 | maxTextureSize: 256 57 | textureFormat: -1 58 | textureCompression: 0 59 | compressionQuality: 50 60 | crunchedCompression: 0 61 | allowsAlphaSplitting: 0 62 | overridden: 0 63 | - buildTarget: Standalone 64 | maxTextureSize: 256 65 | textureFormat: -1 66 | textureCompression: 0 67 | compressionQuality: 50 68 | crunchedCompression: 0 69 | allowsAlphaSplitting: 0 70 | overridden: 0 71 | spriteSheet: 72 | serializedVersion: 2 73 | sprites: [] 74 | outline: [] 75 | spritePackingTag: 76 | userData: 77 | assetBundleName: 78 | assetBundleVariant: 79 | -------------------------------------------------------------------------------- /Assets/Libraries/Entitas/Editor/Images/EntitasHeader.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AlexCCLin/Entitas-GameFSM/bac2c1a51820df70a2c4948e990a8cca47686c30/Assets/Libraries/Entitas/Editor/Images/EntitasHeader.png -------------------------------------------------------------------------------- /Assets/Libraries/Entitas/Editor/Images/EntitasHeader.png.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 65fb57b88da1f40c59682763366ab260 3 | labels: 4 | - EntitasHeader 5 | timeCreated: 1488042330 6 | licenseType: Pro 7 | TextureImporter: 8 | fileIDToRecycleName: {} 9 | serializedVersion: 4 10 | mipmaps: 11 | mipMapMode: 0 12 | enableMipMap: 0 13 | sRGBTexture: 0 14 | linearTexture: 0 15 | fadeOut: 0 16 | borderMipMap: 0 17 | mipMapFadeDistanceStart: 1 18 | mipMapFadeDistanceEnd: 3 19 | bumpmap: 20 | convertToNormalMap: 0 21 | externalNormalMap: 0 22 | heightScale: 0.25 23 | normalMapFilter: 0 24 | isReadable: 0 25 | grayScaleToAlpha: 0 26 | generateCubemap: 6 27 | cubemapConvolution: 0 28 | seamlessCubemap: 0 29 | textureFormat: -3 30 | maxTextureSize: 2048 31 | textureSettings: 32 | filterMode: 2 33 | aniso: 1 34 | mipBias: -1 35 | wrapMode: 1 36 | nPOTScale: 0 37 | lightmap: 0 38 | compressionQuality: 50 39 | spriteMode: 0 40 | spriteExtrude: 1 41 | spriteMeshType: 1 42 | alignment: 0 43 | spritePivot: {x: 0.5, y: 0.5} 44 | spriteBorder: {x: 0, y: 0, z: 0, w: 0} 45 | spritePixelsToUnits: 100 46 | alphaUsage: 1 47 | alphaIsTransparency: 0 48 | spriteTessellationDetail: -1 49 | textureType: 0 50 | textureShape: 1 51 | maxTextureSizeSet: 0 52 | compressionQualitySet: 0 53 | textureFormatSet: 0 54 | platformSettings: 55 | - buildTarget: DefaultTexturePlatform 56 | maxTextureSize: 2048 57 | textureFormat: -1 58 | textureCompression: 0 59 | compressionQuality: 50 60 | crunchedCompression: 0 61 | allowsAlphaSplitting: 0 62 | overridden: 0 63 | - buildTarget: Standalone 64 | maxTextureSize: 2048 65 | textureFormat: -1 66 | textureCompression: 0 67 | compressionQuality: 50 68 | crunchedCompression: 0 69 | allowsAlphaSplitting: 0 70 | overridden: 0 71 | spriteSheet: 72 | serializedVersion: 2 73 | sprites: [] 74 | outline: [] 75 | spritePackingTag: 76 | userData: 77 | assetBundleName: 78 | assetBundleVariant: 79 | -------------------------------------------------------------------------------- /Assets/Libraries/Entitas/Editor/Images/EntitasSystemsErrorHierarchyIcon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AlexCCLin/Entitas-GameFSM/bac2c1a51820df70a2c4948e990a8cca47686c30/Assets/Libraries/Entitas/Editor/Images/EntitasSystemsErrorHierarchyIcon.png -------------------------------------------------------------------------------- /Assets/Libraries/Entitas/Editor/Images/EntitasSystemsErrorHierarchyIcon.png.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 8fecc08fe51ec4ba990bfd58e4ed14b5 3 | labels: 4 | - EntitasSystemsErrorHierarchyIcon 5 | timeCreated: 1489846920 6 | licenseType: Pro 7 | TextureImporter: 8 | fileIDToRecycleName: {} 9 | serializedVersion: 4 10 | mipmaps: 11 | mipMapMode: 0 12 | enableMipMap: 0 13 | sRGBTexture: 0 14 | linearTexture: 0 15 | fadeOut: 0 16 | borderMipMap: 0 17 | mipMapFadeDistanceStart: 1 18 | mipMapFadeDistanceEnd: 3 19 | bumpmap: 20 | convertToNormalMap: 0 21 | externalNormalMap: 0 22 | heightScale: 0.25 23 | normalMapFilter: 0 24 | isReadable: 0 25 | grayScaleToAlpha: 0 26 | generateCubemap: 6 27 | cubemapConvolution: 0 28 | seamlessCubemap: 0 29 | textureFormat: 1 30 | maxTextureSize: 2048 31 | textureSettings: 32 | filterMode: 0 33 | aniso: -1 34 | mipBias: -1 35 | wrapMode: -1 36 | nPOTScale: 1 37 | lightmap: 0 38 | compressionQuality: 50 39 | spriteMode: 0 40 | spriteExtrude: 1 41 | spriteMeshType: 1 42 | alignment: 0 43 | spritePivot: {x: 0.5, y: 0.5} 44 | spriteBorder: {x: 0, y: 0, z: 0, w: 0} 45 | spritePixelsToUnits: 100 46 | alphaUsage: 1 47 | alphaIsTransparency: 1 48 | spriteTessellationDetail: -1 49 | textureType: 0 50 | textureShape: 1 51 | maxTextureSizeSet: 0 52 | compressionQualitySet: 0 53 | textureFormatSet: 0 54 | platformSettings: 55 | - buildTarget: DefaultTexturePlatform 56 | maxTextureSize: 256 57 | textureFormat: -1 58 | textureCompression: 0 59 | compressionQuality: 50 60 | crunchedCompression: 0 61 | allowsAlphaSplitting: 0 62 | overridden: 0 63 | - buildTarget: Standalone 64 | maxTextureSize: 256 65 | textureFormat: -1 66 | textureCompression: 0 67 | compressionQuality: 50 68 | crunchedCompression: 0 69 | allowsAlphaSplitting: 0 70 | overridden: 0 71 | spriteSheet: 72 | serializedVersion: 2 73 | sprites: [] 74 | outline: [] 75 | spritePackingTag: 76 | userData: 77 | assetBundleName: 78 | assetBundleVariant: 79 | -------------------------------------------------------------------------------- /Assets/Libraries/Entitas/Editor/Images/EntitasSystemsHierarchyIcon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AlexCCLin/Entitas-GameFSM/bac2c1a51820df70a2c4948e990a8cca47686c30/Assets/Libraries/Entitas/Editor/Images/EntitasSystemsHierarchyIcon.png -------------------------------------------------------------------------------- /Assets/Libraries/Entitas/Editor/Images/EntitasSystemsHierarchyIcon.png.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 0ee737a83aa9b4b56b2058b2b651ff0a 3 | labels: 4 | - EntitasSystemsHierarchyIcon 5 | timeCreated: 1489847588 6 | licenseType: Pro 7 | TextureImporter: 8 | fileIDToRecycleName: {} 9 | serializedVersion: 4 10 | mipmaps: 11 | mipMapMode: 0 12 | enableMipMap: 0 13 | sRGBTexture: 0 14 | linearTexture: 0 15 | fadeOut: 0 16 | borderMipMap: 0 17 | mipMapFadeDistanceStart: 1 18 | mipMapFadeDistanceEnd: 3 19 | bumpmap: 20 | convertToNormalMap: 0 21 | externalNormalMap: 0 22 | heightScale: 0.25 23 | normalMapFilter: 0 24 | isReadable: 0 25 | grayScaleToAlpha: 0 26 | generateCubemap: 6 27 | cubemapConvolution: 0 28 | seamlessCubemap: 0 29 | textureFormat: -3 30 | maxTextureSize: 256 31 | textureSettings: 32 | filterMode: 0 33 | aniso: -1 34 | mipBias: -1 35 | wrapMode: -1 36 | nPOTScale: 1 37 | lightmap: 0 38 | compressionQuality: 50 39 | spriteMode: 0 40 | spriteExtrude: 1 41 | spriteMeshType: 1 42 | alignment: 0 43 | spritePivot: {x: 0.5, y: 0.5} 44 | spriteBorder: {x: 0, y: 0, z: 0, w: 0} 45 | spritePixelsToUnits: 100 46 | alphaUsage: 1 47 | alphaIsTransparency: 1 48 | spriteTessellationDetail: -1 49 | textureType: 0 50 | textureShape: 1 51 | maxTextureSizeSet: 0 52 | compressionQualitySet: 0 53 | textureFormatSet: 0 54 | platformSettings: 55 | - buildTarget: DefaultTexturePlatform 56 | maxTextureSize: 256 57 | textureFormat: -1 58 | textureCompression: 0 59 | compressionQuality: 50 60 | crunchedCompression: 0 61 | allowsAlphaSplitting: 0 62 | overridden: 0 63 | - buildTarget: Standalone 64 | maxTextureSize: 256 65 | textureFormat: -1 66 | textureCompression: 0 67 | compressionQuality: 50 68 | crunchedCompression: 0 69 | allowsAlphaSplitting: 0 70 | overridden: 0 71 | spriteSheet: 72 | serializedVersion: 2 73 | sprites: [] 74 | outline: [] 75 | spritePackingTag: 76 | userData: 77 | assetBundleName: 78 | assetBundleVariant: 79 | -------------------------------------------------------------------------------- /Assets/Libraries/Entitas/Editor/Plugins.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 6fd072a81a1464e4d9f4075429f4a9cf 3 | folderAsset: yes 4 | timeCreated: 1521858289 5 | licenseType: Free 6 | DefaultImporter: 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /Assets/Libraries/Entitas/Editor/Plugins/DesperateDevs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: fffdf75e5e2f74664aff74a5a9346ad7 3 | folderAsset: yes 4 | timeCreated: 1521858289 5 | licenseType: Free 6 | DefaultImporter: 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /Assets/Libraries/Entitas/Editor/Plugins/DesperateDevs/DesperateDevs.CodeGeneration.Plugins.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AlexCCLin/Entitas-GameFSM/bac2c1a51820df70a2c4948e990a8cca47686c30/Assets/Libraries/Entitas/Editor/Plugins/DesperateDevs/DesperateDevs.CodeGeneration.Plugins.dll -------------------------------------------------------------------------------- /Assets/Libraries/Entitas/Editor/Plugins/DesperateDevs/DesperateDevs.CodeGeneration.Plugins.dll.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 83976f9c826ec49309504f0f5486927d 3 | timeCreated: 1521858294 4 | licenseType: Free 5 | PluginImporter: 6 | serializedVersion: 1 7 | iconMap: {} 8 | executionOrder: {} 9 | isPreloaded: 0 10 | platformData: 11 | Any: 12 | enabled: 0 13 | settings: {} 14 | Editor: 15 | enabled: 1 16 | settings: 17 | DefaultValueInitialized: true 18 | WindowsStoreApps: 19 | enabled: 0 20 | settings: 21 | CPU: AnyCPU 22 | userData: 23 | assetBundleName: 24 | assetBundleVariant: 25 | -------------------------------------------------------------------------------- /Assets/Libraries/Entitas/Editor/Plugins/DesperateDevs/DesperateDevs.CodeGeneration.Unity.Plugins.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AlexCCLin/Entitas-GameFSM/bac2c1a51820df70a2c4948e990a8cca47686c30/Assets/Libraries/Entitas/Editor/Plugins/DesperateDevs/DesperateDevs.CodeGeneration.Unity.Plugins.dll -------------------------------------------------------------------------------- /Assets/Libraries/Entitas/Editor/Plugins/DesperateDevs/DesperateDevs.CodeGeneration.Unity.Plugins.dll.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: c2ba58dc1232c49ae9add10d46259243 3 | timeCreated: 1521858298 4 | licenseType: Free 5 | PluginImporter: 6 | serializedVersion: 1 7 | iconMap: {} 8 | executionOrder: {} 9 | isPreloaded: 0 10 | platformData: 11 | Any: 12 | enabled: 0 13 | settings: {} 14 | Editor: 15 | enabled: 1 16 | settings: 17 | DefaultValueInitialized: true 18 | WindowsStoreApps: 19 | enabled: 0 20 | settings: 21 | CPU: AnyCPU 22 | userData: 23 | assetBundleName: 24 | assetBundleVariant: 25 | -------------------------------------------------------------------------------- /Assets/Libraries/Entitas/Editor/Plugins/Entitas.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 39a178ae5a5bb488dae0dba209a23ff3 3 | folderAsset: yes 4 | timeCreated: 1521858289 5 | licenseType: Free 6 | DefaultImporter: 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /Assets/Libraries/Entitas/Editor/Plugins/Entitas/Entitas.CodeGeneration.Plugins.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AlexCCLin/Entitas-GameFSM/bac2c1a51820df70a2c4948e990a8cca47686c30/Assets/Libraries/Entitas/Editor/Plugins/Entitas/Entitas.CodeGeneration.Plugins.dll -------------------------------------------------------------------------------- /Assets/Libraries/Entitas/Editor/Plugins/Entitas/Entitas.CodeGeneration.Plugins.dll.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: faad21f69623c4c48a8db4adf0393588 3 | timeCreated: 1521858300 4 | licenseType: Free 5 | PluginImporter: 6 | serializedVersion: 1 7 | iconMap: {} 8 | executionOrder: {} 9 | isPreloaded: 0 10 | platformData: 11 | Any: 12 | enabled: 0 13 | settings: {} 14 | Editor: 15 | enabled: 1 16 | settings: 17 | DefaultValueInitialized: true 18 | WindowsStoreApps: 19 | enabled: 0 20 | settings: 21 | CPU: AnyCPU 22 | userData: 23 | assetBundleName: 24 | assetBundleVariant: 25 | -------------------------------------------------------------------------------- /Assets/Libraries/Entitas/Editor/Plugins/Entitas/Entitas.VisualDebugging.CodeGeneration.Plugins.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AlexCCLin/Entitas-GameFSM/bac2c1a51820df70a2c4948e990a8cca47686c30/Assets/Libraries/Entitas/Editor/Plugins/Entitas/Entitas.VisualDebugging.CodeGeneration.Plugins.dll -------------------------------------------------------------------------------- /Assets/Libraries/Entitas/Editor/Plugins/Entitas/Entitas.VisualDebugging.CodeGeneration.Plugins.dll.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: b01baa98f527a42539e919607444aea5 3 | timeCreated: 1521858297 4 | licenseType: Free 5 | PluginImporter: 6 | serializedVersion: 1 7 | iconMap: {} 8 | executionOrder: {} 9 | isPreloaded: 0 10 | platformData: 11 | Any: 12 | enabled: 0 13 | settings: {} 14 | Editor: 15 | enabled: 1 16 | settings: 17 | DefaultValueInitialized: true 18 | WindowsStoreApps: 19 | enabled: 0 20 | settings: 21 | CPU: AnyCPU 22 | userData: 23 | assetBundleName: 24 | assetBundleVariant: 25 | -------------------------------------------------------------------------------- /Assets/Libraries/Entitas/Entitas.CodeGeneration.Attributes.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AlexCCLin/Entitas-GameFSM/bac2c1a51820df70a2c4948e990a8cca47686c30/Assets/Libraries/Entitas/Entitas.CodeGeneration.Attributes.dll -------------------------------------------------------------------------------- /Assets/Libraries/Entitas/Entitas.CodeGeneration.Attributes.dll.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 7bb35fa7e28424e618bb93d825bca735 3 | timeCreated: 1521858294 4 | licenseType: Free 5 | PluginImporter: 6 | serializedVersion: 1 7 | iconMap: {} 8 | executionOrder: {} 9 | isPreloaded: 0 10 | platformData: 11 | Any: 12 | enabled: 1 13 | settings: {} 14 | Editor: 15 | enabled: 0 16 | settings: 17 | DefaultValueInitialized: true 18 | WindowsStoreApps: 19 | enabled: 0 20 | settings: 21 | CPU: AnyCPU 22 | userData: 23 | assetBundleName: 24 | assetBundleVariant: 25 | -------------------------------------------------------------------------------- /Assets/Libraries/Entitas/Entitas.Unity.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AlexCCLin/Entitas-GameFSM/bac2c1a51820df70a2c4948e990a8cca47686c30/Assets/Libraries/Entitas/Entitas.Unity.dll -------------------------------------------------------------------------------- /Assets/Libraries/Entitas/Entitas.Unity.dll.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: e14b6418af12a4232bac4cb4f03da1ac 3 | timeCreated: 1521858299 4 | licenseType: Free 5 | PluginImporter: 6 | serializedVersion: 1 7 | iconMap: {} 8 | executionOrder: {} 9 | isPreloaded: 0 10 | platformData: 11 | Any: 12 | enabled: 1 13 | settings: {} 14 | Editor: 15 | enabled: 0 16 | settings: 17 | DefaultValueInitialized: true 18 | WindowsStoreApps: 19 | enabled: 0 20 | settings: 21 | CPU: AnyCPU 22 | userData: 23 | assetBundleName: 24 | assetBundleVariant: 25 | -------------------------------------------------------------------------------- /Assets/Libraries/Entitas/Entitas.VisualDebugging.Unity.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AlexCCLin/Entitas-GameFSM/bac2c1a51820df70a2c4948e990a8cca47686c30/Assets/Libraries/Entitas/Entitas.VisualDebugging.Unity.dll -------------------------------------------------------------------------------- /Assets/Libraries/Entitas/Entitas.VisualDebugging.Unity.dll.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 2cb0b712de1a64728b3288eccc26d4df 3 | timeCreated: 1521858291 4 | licenseType: Free 5 | PluginImporter: 6 | serializedVersion: 1 7 | iconMap: {} 8 | executionOrder: {} 9 | isPreloaded: 0 10 | platformData: 11 | Any: 12 | enabled: 1 13 | settings: {} 14 | Editor: 15 | enabled: 0 16 | settings: 17 | DefaultValueInitialized: true 18 | WindowsStoreApps: 19 | enabled: 0 20 | settings: 21 | CPU: AnyCPU 22 | userData: 23 | assetBundleName: 24 | assetBundleVariant: 25 | -------------------------------------------------------------------------------- /Assets/Libraries/Entitas/Entitas.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AlexCCLin/Entitas-GameFSM/bac2c1a51820df70a2c4948e990a8cca47686c30/Assets/Libraries/Entitas/Entitas.dll -------------------------------------------------------------------------------- /Assets/Libraries/Entitas/Entitas.dll.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 8442cb63f2c0642d6909137dc5d4d2ca 3 | timeCreated: 1521858295 4 | licenseType: Free 5 | PluginImporter: 6 | serializedVersion: 1 7 | iconMap: {} 8 | executionOrder: {} 9 | isPreloaded: 0 10 | platformData: 11 | Any: 12 | enabled: 1 13 | settings: {} 14 | Editor: 15 | enabled: 0 16 | settings: 17 | DefaultValueInitialized: true 18 | WindowsStoreApps: 19 | enabled: 0 20 | settings: 21 | CPU: AnyCPU 22 | userData: 23 | assetBundleName: 24 | assetBundleVariant: 25 | -------------------------------------------------------------------------------- /Assets/Libraries/Entitas/EntitasUpgradeGuide.md: -------------------------------------------------------------------------------- 1 | Entitas Upgrade Guide 2 | ===================== 3 | 4 | Entitas provides automated migration tools to help upgrading to new versions. 5 | You can apply automatic migrations in Unity by opening the Entitas Migration Window 6 | `Tools > Entitas > Migrate...` 7 | 8 | This document contains checklists for every release with breaking changes. 9 | 10 | Entitas 0.47.2 upgrade guide 11 | ============================ 12 | 13 | #### Breaking changes 14 | 15 | Apply Migration 0.47.2 to automatically rename the changed keys your properties files. 16 | 17 | The following keys changed from: 18 | 19 | - CodeGenerator.SearchPaths 20 | - CodeGenerator.Plugins 21 | - CodeGenerator.PreProcessors 22 | - CodeGenerator.DataProviders 23 | - CodeGenerator.CodeGenerators 24 | - CodeGenerator.PostProcessors 25 | - CodeGenerator.CLI.Ignore.UnusedKeys or Ignore.Keys 26 | 27 | to: 28 | 29 | - Jenny.SearchPaths 30 | - Jenny.Plugins 31 | - Jenny.PreProcessors 32 | - Jenny.DataProviders 33 | - Jenny.CodeGenerators 34 | - Jenny.PostProcessors 35 | - Jenny.Ignore.Keys 36 | 37 | --- 38 | 39 | Entitas 0.46.0 upgrade guide 40 | ============================ 41 | 42 | #### Breaking changes 43 | 44 | Removed methods marked obsolete in 0.42.0 from April 2017 45 | - `context.CreateCollector(IMatcher matcher, GroupEvent groupEvent)` 46 | - `new Context(int totalComponents, int startCreationIndex, ContextInfo contextInfo)` 47 | - `context.DestroyEntity(TEnity entity)` 48 | 49 | #### After you installed 50 | 51 | First, edit the file `Generated/Feature.cs` and comment or delete the lines with compiler errors. 52 | 53 | Then, run auto-import to use the new DesperateDevs.CodeGeneration.Plugins and generate. 54 | 55 | Entitas.properties can be named differently now. By default it will be called 56 | Preferences.properties. Additionally, you can delete User.properties or rename it 57 | to Xyz.userproperties. If this file doesn't exist, it will automatically be generated for you. 58 | You can have multiple properties and userproperties files now, e.g. 59 | Preferences.properties and Roslyn.properties. In Unity it will automatically find and use 60 | the first file. When using the Code Generator CLI (called Jenny now) you can explicitly 61 | specify files like this 62 | 63 | ``` 64 | // will find and use the first file 65 | $ jenny gen 66 | 67 | // specify a file 68 | $ jenny gen Roslyn.properties 69 | 70 | // optionally specify an other userproperties 71 | jenny gen Roslyn.properties My.userproperties 72 | ``` 73 | 74 | --- 75 | 76 | Entitas 0.45.0 upgrade guide 77 | ============================ 78 | 79 | #### Breaking changes 80 | 81 | Use the command line tool `MigrationAssistant.exe` and apply Migration 0.45.0 to 82 | automatically rename the changed keys in Entitas.properties 83 | 84 | `MigrationAssistant.exe 0.45.0 path/to/project` 85 | 86 | The following keys in Entitas.properties changed from: 87 | 88 | - Entitas.CodeGeneration.CodeGenerator.SearchPaths 89 | - Entitas.CodeGeneration.CodeGenerator.Plugins 90 | - Entitas.CodeGeneration.CodeGenerator.DataProviders 91 | - Entitas.CodeGeneration.CodeGenerator.CodeGenerators 92 | - Entitas.CodeGeneration.CodeGenerator.PostProcessors 93 | - Entitas.CodeGeneration.CodeGenerator.CLI.Ignore.UnusedKeys 94 | 95 | to: 96 | 97 | - CodeGenerator.SearchPaths 98 | - CodeGenerator.Plugins 99 | - CodeGenerator.DataProviders 100 | - CodeGenerator.CodeGenerators 101 | - CodeGenerator.PostProcessors 102 | - CodeGenerator.CLI.Ignore.UnusedKeys 103 | 104 | The default plugins are now in folder called `Entitas` instead of `Default`. Please update 105 | the searchPaths in Entitas.properties. 106 | `Entitas.exe` is now uppercase with capital E 107 | 108 | --- 109 | 110 | Entitas 0.42.0 upgrade guide 111 | ============================ 112 | 113 | #### Breaking changes 114 | - Removed Entitas.Blueprints.Unity.* 115 | - Changed ReactiveSystem.GetTrigger method signature 116 | - Marked obsolete: `context.DestroyEntity(entity)`. Use `entity.Destroy()` instead 117 | - Marked obsolete: `context.CreateCollector(matcher, event)`, use new `context.CreateCollector(triggerOnEvent)` when you need `.Removed` or `.AddedOrRemoved` (e.g. `GameMatcher.View.Removed()`) 118 | 119 | #### After you installed 120 | - Removed Entitas.Blueprints.Unity.* 121 | - Remove all Entitas.Blueprints.Unity.* related code 122 | - Remove BinaryBlueprints from your project. Consider using extension methods as described here instead https://github.com/sschmid/Entitas-CSharp/issues/390 123 | - Remove from Entitas.properties: 124 | - Entitas.Blueprints.CodeGeneration.Plugins 125 | - Entitas.Blueprints.CodeGeneration.Plugins.BlueprintDataProvider 126 | - Entitas.Blueprints.CodeGeneration.Plugins.BlueprintsGenerator 127 | 128 | - Changed ReactiveSystem.GetTrigger() method signature 129 | - find and replace `protected override Collector` -> `protected override ICollector` 130 | 131 | - Generate 132 | 133 | - Marked obsolete: `context.DestroyEntity(entity)`. Use `entity.Destroy()` instead 134 | - Marked obsolete: `context.CreateCollector(matcher, event)`, use new `context.CreateCollector(triggerOnEvent)` when you need `.Removed` or `.AddedOrRemoved` (e.g. `GameMatcher.View.Removed()`) 135 | 136 | --- 137 | 138 | Entitas 0.41.0 upgrade guide 139 | ============================ 140 | 141 | #### Breaking changes 142 | In order to deploy Entitas as Dlls which enables 3rd party Addons and the extendable command line code generator the projects have been restructured. This restructuring has an impact on namespaces. 143 | 144 | #### Before you install 145 | - You're fine - nothing to do for you :heart: 146 | 147 | #### After you installed 148 | - Apply Migrations 0.41.0-1 149 | - Apply Migrations 0.41.0-2 150 | - Apply Migrations 0.41.0-3 151 | 152 | These migrations should update most of the namespaces. Depending on which features of Entitas you have used there might be a chance that not all namespaces have been updated. In this case please fix the remaining namespaces manually. 153 | 154 | Entitas.properties keys have been updated to support the latest code generator. Please open Entitas.properties in your project root and make sure the keys are updated. Here's an example from Match One 155 | 156 | ``` 157 | Entitas.CodeGeneration.Project = Assembly-CSharp.csproj 158 | Entitas.CodeGeneration.SearchPaths = Assets/Libraries/Entitas, Assets/Libraries/Entitas/Editor, /Applications/Unity/Unity.app/Contents/Managed 159 | Entitas.CodeGeneration.Assemblies = Library/ScriptAssemblies/Assembly-CSharp.dll 160 | Entitas.CodeGeneration.Plugins = Entitas.CodeGeneration.Plugins, Entitas.CodeGeneration.Unity.Editor, Entitas.VisualDebugging.CodeGeneration.Plugins, Entitas.Blueprints.CodeGeneration.Plugins 161 | Entitas.CodeGeneration.DataProviders = Entitas.Blueprints.CodeGeneration.Plugins.BlueprintDataProvider, Entitas.CodeGeneration.Plugins.ComponentDataProvider, Entitas.CodeGeneration.Plugins.ContextDataProvider, Entitas.CodeGeneration.Plugins.EntityIndexDataProvider 162 | Entitas.CodeGeneration.CodeGenerators = Entitas.Blueprints.CodeGeneration.Plugins.BlueprintsGenerator, Entitas.CodeGeneration.Plugins.ComponentContextGenerator, Entitas.CodeGeneration.Plugins.ComponentEntityGenerator, Entitas.CodeGeneration.Plugins.ComponentGenerator, Entitas.CodeGeneration.Plugins.ComponentsLookupGenerator, Entitas.CodeGeneration.Plugins.ContextAttributeGenerator, Entitas.CodeGeneration.Plugins.ContextGenerator, Entitas.CodeGeneration.Plugins.ContextsGenerator, Entitas.CodeGeneration.Plugins.EntityGenerator, Entitas.CodeGeneration.Plugins.EntityIndexGenerator, Entitas.CodeGeneration.Plugins.MatcherGenerator, Entitas.VisualDebugging.CodeGeneration.Plugins.ContextObserverGenerator, Entitas.VisualDebugging.CodeGeneration.Plugins.FeatureClassGenerator 163 | Entitas.CodeGeneration.PostProcessors = Entitas.CodeGeneration.Plugins.AddFileHeaderPostProcessor, Entitas.CodeGeneration.Plugins.CleanTargetDirectoryPostProcessor, Entitas.CodeGeneration.Plugins.MergeFilesPostProcessor, Entitas.CodeGeneration.Plugins.NewLinePostProcessor, Entitas.CodeGeneration.Plugins.WriteToDiskPostProcessor, Entitas.CodeGeneration.Plugins.ConsoleWriteLinePostProcessor, Entitas.CodeGeneration.Unity.Editor.DebugLogPostProcessor 164 | Entitas.CodeGeneration.TargetDirectory = Assets/Sources/ 165 | Entitas.CodeGeneration.Contexts = Game, GameState, Input 166 | Entitas.VisualDebugging.Unity.SystemWarningThreshold = 8 167 | Entitas.VisualDebugging.Unity.DefaultInstanceCreatorFolderPath = Assets/Editor/DefaultInstanceCreator/ 168 | Entitas.VisualDebugging.Unity.TypeDrawerFolderPath = Assets/Editor/TypeDrawer/ 169 | ``` 170 | 171 | Explanation: 172 | - Entitas.CodeGeneration.Project: Relative path to your project.csproj (when using Unity use `Assembly-CSharp.csproj`) 173 | - Entitas.CodeGeneration.SearchPaths: The new code generator can be extended with 3rd party plugins. Specify all folders where plugin dlls can be found. Plugins may depend on UnityEngine or UnityEditor, if so please specify where those dlls can be found (Unity default on Mac: `/Applications/Unity/Unity.app/Contents/Managed` 174 | - Entitas.CodeGeneration.Assemblies: One or more Dlls that contain your components 175 | - Entitas.CodeGeneration.Plugins: One or more Code Generator Plugin Dlls or namespaces 176 | 177 | If all set up correctly DataProviders, CodeGenerators and PostProcessors can be set in Unity. 178 | 179 | The command line code generator currently doesn't support the following plugins: 180 | - Entitas.Blueprints.CodeGeneration.Plugins (contains Blueprint DataProvider and CodeGenerator) 181 | - Entitas.CodeGeneration.Unity.Editor (contains DebugLogPostProcessor) 182 | 183 | because they use Unity specific api. They will work as expected when generating from within Unity but don't work on the command line. 184 | 185 | To test the config for potential problems, please unzip Entitas-CodeGenerator.zip in the root folder of your project. 186 | 187 | --- 188 | 189 | ### Note for Windows users 190 | - Right-click Entitas-CodeGenerator.zip, open properties 191 | - Check "Unblock" 192 | - Hit Apply 193 | - unzip 194 | 195 | --- 196 | 197 | ``` 198 | // skip mono on Windows 199 | $ mono ./CodeGenerator/entitas.exe 200 | Entitas Code Generator version 0.41.0 201 | usage: entitas new [-f] - Creates new Entitas.properties config with default values 202 | entitas edit - Opens Entitas.properties config 203 | entitas doctor - Checks the config for potential problems 204 | entitas status - Lists available and unavailable plugins 205 | entitas fix - Adds missing or removes unused keys interactively 206 | entitas scan - Scans and prints available types found in specified assemblies 207 | entitas dry - Simulates generating files without writing to disk 208 | entitas gen - Generates files based on Entitas.properties 209 | [-v] - verbose output 210 | [-s] - silent output (errors only) 211 | ``` 212 | 213 | To check the config for potential problems please run 214 | ``` 215 | $ mono ./CodeGenerator/entitas.exe doctor 216 | ``` 217 | 218 | The `doctor` command will show you the status and potential problems. Sometime you might get a warning like this: 219 | 220 | ``` 221 | - Could not resolve xyz.dll 222 | ``` 223 | 224 | This is just a warning. If no error is shown after running the `doctor` command, you can ignore those. All code generator plugins must be resolvable in order to be used. Use the `status` command to see available and unavailable plugins. This command helps you manage the plugins. Add or remove DataProviders, CodeGenerators or PostProcessors and check with `status` until you're happy. As usual, you can also use the Entitas Preferences Window in Unity to set up everything. 225 | 226 | If there are nor problems use the `gen` command to generate or use the green generate button in Unity as usual. 227 | 228 | --- 229 | 230 | Entitas 0.37.0 upgrade guide 231 | ============================ 232 | 233 | #### Breaking changes 234 | Entitas went type-safe! This was a huge task and I'm happy to finally share this with you guys! 235 | This feature makes Entitas safer and more managable in growing code bases and will eliminate certain kind of bugs. 236 | This change breaks existing projects! It is possible to manually migrate existing projects but there is no special workflow 237 | other than manually use find / replace to fix all compile errors. I use Entitas 0.37.0 in my current project (500+ systems) 238 | and was able to migrate within less than two days. If you have less systems and components you should be able to migrate within one day. 239 | 240 | Reminder: If you're updating from versions < 0.36.0 you should update to 0.36.0 first. Be aware that existing Blueprints(Beta) are breaking 241 | because of the renaming from `Pool` to `Context`. Existing Binary Blueprints have to be manually updated. 242 | 243 | If you're not sure if you should update you can wait another week. I plan to make a video to show how to upgrade existing projects. 244 | After this you should be able to decide if you want to update or not. 245 | 246 | #### Before you install 247 | - Rename `SingleEntityAttribute` to `UniqueAttribute` 248 | - Change namespace of all attributes in CodeGenerator/Attributes to `Entitas.CodeGenerator.Api` 249 | - Find / replace `using Entitas.CodeGenerator` to `using Entitas.CodeGenerator.Api` in all generated context attributes 250 | - Find / replace `using Entitas.CodeGenerator;` to `using Entitas.CodeGenerator.Api;` in all generated components 251 | 252 | #### After you installed 253 | 254 | After installing Entitas 0.37.0 you most likely end up having lots of compiler errors. The 2 biggest issues are: 255 | - Generated components 256 | - Systems 257 | 258 | There migh also be other issues depending how you used Entitas before, but fixing the generated components and the systems 259 | might already do most of the work. 260 | 261 | ##### Problem 1 (Components): 262 | The old generated components extend Entitas.Entity by using `partial class`. 263 | The new version inherits Entitas.Entity to have a new entity type and to get rid of `partial class` to enable 264 | having Entitas as a precompiled dll. 265 | 266 | ##### Solution 1 (Components) 267 | The goal is to update the generated components. I see 3 possible workflows to fix them: 268 | 1. Delete all components and generated components and use the EntitasLang DSL https://github.com/mzaks/ECS-Lang 269 | 2. Temporarily move all the logic (systems) out of your Unity project and delete the generated components. 270 | After this there shouldn't be any compile errors anymore (if so, temporarily move them out if your Unity project). 271 | Now you should be able to re-generate. After that, move all the files back to your Unity project. 272 | 3. Manually use find / replace in the generated components folder to migrate the components 273 | 274 | ##### Problem 2 (Systems) 275 | All reactive systems need to be updated to be type-safe. 276 | 277 | ##### Solution 2 (Systems) 278 | Manually use find / replace to migrate e.g. method signatures and other issues 279 | Take a look at [Match-One AnimatePositionSystem.cs](https://github.com/sschmid/Match-One/blob/develop/Assets/Sources/Logic/View/Systems/AnimatePositionSystem.cs) 280 | to see how the new reactive systems look like. 281 | 282 | ##### Other issues 283 | There might be other issues related to the type-safety. Rule of thumb: 284 | - Every occurrences of `Entity` must be typed now, e.g. `GameEntity` 285 | - Every occurrences of `Group` must be typed now, e.g. `IGroup` 286 | - Every occurrences of `Context` must be typed now, e.g. `IContext` or `GameContext` if possible 287 | - Every occurrences of `Collector` must be typed now, e.g. `Collector` 288 | - Every occurrences of `Matcher` must be typed now, e.g. `Matcher.AllOf(...)` 289 | 290 | I recommend using find / replace on ceratin folders to fix those issues efficiently. 291 | 292 | --- 293 | 294 | Entitas 0.36.0 upgrade guide 295 | ============================ 296 | 297 | #### Breaking changes 298 | The term `Pool` has been replaced with `Context`. This affects all classes that 299 | contain the word pool. 300 | `EntityCollector` has been renamed to `Collector` 301 | `GroupEventType` has been renamed to `GroupEvent` 302 | 303 | 304 | #### Before you install 305 | - Rename `Pools.CreatePool()` to `Pools.CreateContext` 306 | - Rename `Pool` to `Context` 307 | - Rename `Pools` to `Contexts` 308 | - Rename `Pools.SetAllPools()` to `Pools.SetAllContexts()` 309 | - Rename `PoolAttribute` to `ContextAttribute` 310 | - Rename `EntityCollector` to `Collector` 311 | - Rename `GroupEventType` to `GroupEvent` 312 | - Rename `GroupEventType.OnEntityAdded` to `GroupEvent.Added` 313 | - Rename `GroupEventType.OnEntityRemoved` to `GroupEvent.Removed` 314 | - Rename `GroupEventType.OnEntityAddedOrRemoved` to `GroupEvent.AddedOrRemoved` 315 | 316 | #### After you installed 317 | - Use the command line tool `MigrationAssistant.exe` and apply Migration 0.36.0-2 318 | - Manually migrate all systems and fix compiler errors 319 | - apply Migration 0.36.0-1 320 | - Ensure all code generator are selected and generate 321 | 322 | --- 323 | 324 | Entitas 0.35.0 upgrade guide 325 | ============================ 326 | 327 | #### Breaking changes 328 | `IMatcher.Where()` has been removed. See #194 329 | 330 | #### Before you install 331 | - You're fine - nothing to do for you :heart: 332 | 333 | #### After you installed 334 | - Fix all the errors where you used `matcher.Where()` 335 | 336 | --- 337 | 338 | Entitas 0.34.0 upgrade guide 339 | ============================ 340 | 341 | #### Breaking changes 342 | `GroupObserver` has been renamed to `EntityCollector`. See #168 343 | 344 | #### Before you install 345 | - Rename `GroupObserver` to `EntityCollector` 346 | - Rename `.CreateGroupObserver()` to `.CreateEntityCollector()` 347 | - Rename `IGroupObserverSystem` to `IEntityCollectorSystem` 348 | - Find & Replace `public EntityCollector groupObserver` with `public EntityCollector entityCollector` 349 | 350 | #### After you installed 351 | - You're fine - nothing to do for you :heart: 352 | 353 | --- 354 | 355 | Entitas 0.33.0 upgrade guide 356 | ============================ 357 | 358 | #### Breaking changes 359 | `IDeinitializeSystem` has been renamed to `ITearDownSystem`. See #164 360 | 361 | #### Before you install 362 | - Manually rename `IDeinitializeSystem` to `ITearDownSystem` 363 | 364 | #### After you installed 365 | - You're fine - nothing to do for you :heart: 366 | 367 | --- 368 | 369 | Entitas 0.32.0 upgrade guide 370 | ============================ 371 | 372 | Use the command line tool `MigrationAssistant.exe` to automatically fix compile errors. 373 | Entitas 0.32.0 introduces a new Pools class. Using the new PoolsGenerator will require 374 | to update your existing project manually. You can still use the old Pools class in your 375 | existing project if you want. If so, please use the OldPoolsGenerator instead of the new one. 376 | 377 | --- 378 | 379 | Entitas 0.30.0 upgrade guide 380 | ============================ 381 | 382 | Some code generators got renamed. Apply Migration 0.30.0 383 | 384 | --- 385 | 386 | Entitas 0.29.0 upgrade guide 387 | ============================ 388 | 389 | Marked old PoolMetaData constructor obsolete. If you encounter compile errors 390 | please apply Migration 0.26.0, open C# project and generate again. 391 | 392 | --- 393 | 394 | Entitas 0.28.0 upgrade guide 395 | ============================ 396 | 397 | If you're using Entitas with Unity, please open the Entitas preferences and make 398 | sure that all your desired code generators are activated. 399 | Due to some code generator renamings the ComponentIndicesGenerators inactive. 400 | 401 | The SystemsGenerator has been removed. Please use `pool.CreateSystem()` instead. 402 | 403 | --- 404 | 405 | Entitas 0.27.0 upgrade guide 406 | ============================ 407 | 408 | If you're using Entitas with Unity, please open the Entitas preferences and make 409 | sure that all your desired code generators are activated. 410 | Due to some code generator renamings the ComponentLookupGenerator and 411 | the ComponentsGenerator are inactive. Activate them (if desired) and generate. 412 | 413 | --- 414 | 415 | Entitas 0.26.0 upgrade guide 416 | ============================ 417 | 418 | Use the command line tool `MigrationAssistant.exe` to automatically fix compile errors. 419 | After that generate again. 420 | 421 | --- 422 | 423 | Entitas 0.24.0 upgrade guide 424 | ============================ 425 | 426 | To fix the compile errors after updating to Entitas 0.24.0, delete in `Pools.cs` 427 | 428 | ```csharp 429 | #if (UNITY_EDITOR) 430 | var poolObserver = new Entitas.Unity.VisualDebugging.PoolObserver(_pool, ComponentIds.componentNames, ComponentIds.componentTypes, "Pool"); 431 | UnityEngine.Object.DontDestroyOnLoad(poolObserver.entitiesContainer); 432 | #endif 433 | ``` 434 | 435 | and generate again. 436 | 437 | --- 438 | 439 | Entitas 0.23.0 upgrade guide 440 | ============================ 441 | 442 | Entitas 0.23.0 changed and applied naming conventions. 443 | Before updating to this version, follow these steps to prepare your project: 444 | 445 | #### Rename 446 | 447 | Pool.Count -> Pool.count 448 | Group.Count -> Group.count 449 | Properties.count -> Properties.count 450 | 451 | #### Find/Replace in generated folder 452 | 453 | ": AllOfMatcher " -> "" 454 | ": base(new [] { index }) " -> "" 455 | "static AllOfMatcher _matcher" -> "static IMatcher _matcher" 456 | "public static AllOfMatcher" -> "public static IMatcher" 457 | "new Matcher" -> "Matcher.AllOf" 458 | 459 | #### Delete 460 | 461 | In generated ...ComponentIds 462 | 463 | namespace Entitas { 464 | public partial class XYZMatcher { 465 | public Matcher(int index) { 466 | } 467 | 468 | public override string ToString() { 469 | return ComponentIds.IdToString(indices[0]); 470 | } 471 | } 472 | } 473 | 474 | --- 475 | 476 | Entitas 0.22.0 upgrade guide 477 | ============================ 478 | 479 | Entitas 0.22.0 changed IReactiveSystem and IMultiReactiveSystem and renamed IStartSystem.Start to IInitializeSystem.Initialize. 480 | 481 | Use the command line tool `MigrationAssistant.exe` to automatically migrate IReactiveSystem. 482 | 483 | --- 484 | 485 | Entitas 0.19.0 upgrade guide 486 | ============================ 487 | 488 | Entitas 0.19.0 introduces a few breaking changes: 489 | 490 | Added new e.OnComponentReplaced and removed all *WillBeRemoved events. 491 | 492 | If you used `group.OnEntityWillBeRemoved`, you could replace it either with 493 | ```cs 494 | _group.OnEntityRemoved += (group, entity, index, component) => { //... }; 495 | ``` 496 | or with 497 | ```cs 498 | _group.OnEntityUpdated += (group, entity, index, previousComponent, newComponent) => { // ...}; 499 | ``` 500 | If your generated component extensions are not compiling, find/replace `WillRemoveComponent` with `//WillRemoveComponent` 501 | to temporarily ignore the errors. 502 | 503 | IReactiveSystem.Execute takes List instead of Entity[]. Use the command line tool `MigrationAssistant.exe` to automatically migrate. 504 | 505 | ``` 506 | $ mono MigrationAssistant.exe 507 | usage: 508 | [-l] - print all available versions 509 | [version] [path] - apply migration of version [version] to source files located at [path] 510 | 511 | $ mono MigrationAssistant.exe -l 512 | 0.18.0 - Migrates IReactiveSystem API 513 | 0.19.0 - Migrates IReactiveSystem.Execute 514 | 515 | // Example from Math-One example project, where all the systems are located in the Features folder 516 | $ mono MigrationAssistant.exe 0.19.0 /Path/To/Project/Assets/Sources/Features 517 | ``` 518 | 519 | --- 520 | 521 | Entitas 0.18.0 upgrade guide 522 | ============================ 523 | 524 | Entitas 0.18.0 changes IReactiveSystem. To upgrade your source files, follow these steps 525 | - Install Entitas 0.18.0 (which will result in compiler errors) 526 | - Use the command line tool `MigrationAssistant.exe` to automatically migrate 527 | 528 | ``` 529 | $ mono MigrationAssistant.exe 530 | usage: 531 | [-l] - print all available versions 532 | [version] [path] - apply migration of version [version] to source files located at [path] 533 | 534 | $ mono MigrationAssistant.exe -l 535 | 0.18.0 - Migrates IReactiveSystem API 536 | 537 | // Example from Math-One example project, where all the systems are located in the Features folder 538 | $ mono MigrationAssistant.exe 0.18.0 /Path/To/Project/Assets/Sources/Features 539 | ``` 540 | 541 | --- 542 | 543 | Entitas 0.12.0 upgrade guide 544 | ============================ 545 | 546 | Entitas 0.12.0 generates prefixed matchers based on the PoolAttribute and introduces some 547 | API changes. In your existing project with a Entitas version < 0.12.0 manually rename the 548 | following classes and methods. 549 | 550 | ## Before installing Entitas 0.12.0 551 | 552 | #### Rename 553 | 554 | pool.CreateSystem() -> pool.CreateExecuteSystem() 555 | 556 | Now that you're prepared for integrating the latest version, delete your existing version 557 | of Entitas, EntitasCodeGenerator and EntitasUnity. 558 | 559 | #### Delete 560 | 561 | Entitas 562 | EntitasCodeGenerator 563 | EntitasUnity 564 | 565 | ## Install Entitas 0.12.0 566 | 567 | #### Setup Entitas Preferences 568 | 569 | Open the Unity preference panel and select Entitas. Check and update the path to the folder where 570 | the code generator will save all generated files. If you are using the PoolAttribute in your components, 571 | add all custom pool names used in your application. Make sure that all existing custom PoolAttributes call 572 | the base constructor with the same name as the class (without 'Attribute'). 573 | If you are not using the PoolAttribute in your components, you can skip this process. 574 | 575 | ```cs 576 | using Entitas.CodeGenerator; 577 | 578 | public class CoreGameAttribute : PoolAttribute { 579 | public CoreGameAttribute() : base("CoreGame") { 580 | } 581 | } 582 | ``` 583 | 584 | #### Code Generator 585 | 586 | Use the code generator and generate 587 | 588 | #### Update API 589 | 590 | Click the MenuItem "Entitas/Update API". All occurrences of the old Matcher will be updated 591 | to the new version, which is prefixed based on the PoolAttribute. 592 | 593 | #### Delete 594 | 595 | Delete all custom PoolAttributes 596 | 597 | --- 598 | 599 | Entitas 0.10.0 upgrade guide 600 | ============================ 601 | 602 | Beside features, Entitas 0.10.0 includes lots of renaming. If your current Entitas 603 | version is < 0.10.0, you might want to follow the next few simple renaming steps, 604 | to speed up the integration of the latest version of Entitas. 605 | In your existing project with a Entitas version < 0.10.0 manually rename the following 606 | classes and methods. 607 | 608 | ## Before installing Entitas 0.10.0 609 | 610 | #### Rename 611 | 612 | EntityRepository -> Pool 613 | EntityRepository.GetCollection() -> Pool.GetGroup() 614 | 615 | EntityCollection -> Group 616 | EntityCollection.EntityCollectionChange -> Group.GroupChanged 617 | 618 | EntityRepositoryObserver -> GroupObserver 619 | EntityRepositoryObserver.EntityCollectionEventType -> GroupObserver.GroupEventType 620 | 621 | IEntityMatcher -> IMatcher 622 | IEntitySystem -> IExecuteSystem 623 | AllOfEntityMatcher -> AllOfMatcher 624 | EntityRepositoryAttribute -> PoolAttribute 625 | IReactiveSubEntitySystem -> IReactiveSystem 626 | ReactiveEntitySystem -> ReactiveSystem 627 | 628 | #### Delete 629 | 630 | EntityWillBeRemovedEntityRepositoryObserver -> DELETE 631 | IReactiveSubEntityWillBeRemovedSystem -> DELETE 632 | ReactiveEntityWillBeRemovedSystem -> DELETE 633 | 634 | Now that you're prepared for integrating the latest version, delete your existing version 635 | of Entitas, EntitasCodeGenerator and ToolKit. 636 | 637 | #### Delete 638 | 639 | Entitas 640 | EntitasCodeGenerator 641 | ToolKit (unless you use classes from ToolKit. The new version of Entitas doesn't depend on ToolKit anymore) 642 | 643 | 644 | ## Install Entitas 0.10.0 645 | 646 | #### Fix remaining issues 647 | 648 | IReactiveSubEntityWillBeRemovedSystem 649 | - Consider implementing ISystem & ISetPool and use group.OnEntityWillBeRemoved += foobar; 650 | 651 | #### Code Generator 652 | 653 | Use the code generator and generate 654 | -------------------------------------------------------------------------------- /Assets/Libraries/Entitas/EntitasUpgradeGuide.md.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: fb9dcb62db1594e29adc0d9de43245d9 3 | timeCreated: 1521858289 4 | licenseType: Free 5 | DefaultImporter: 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/Libraries/Entitas/LICENSE.txt: -------------------------------------------------------------------------------- 1 | The MIT License 2 | 3 | Copyright (c) 2014 - 2016 Simon Schmid 4 | 5 | 6 | Permission is hereby granted, free of charge, to any person obtaining a copy 7 | of this software and associated documentation files (the "Software"), to deal 8 | in the Software without restriction, including without limitation the rights 9 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 10 | copies of the Software, and to permit persons to whom the Software is 11 | furnished to do so, subject to the following conditions: 12 | 13 | The above copyright notice and this permission notice shall be included in 14 | all copies or substantial portions of the Software. 15 | 16 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 18 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 19 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 20 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 21 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 22 | THE SOFTWARE. 23 | -------------------------------------------------------------------------------- /Assets/Libraries/Entitas/LICENSE.txt.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: f7e030b390cff47769d92e6e78c89c3b 3 | timeCreated: 1521858301 4 | licenseType: Free 5 | TextScriptImporter: 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/Libraries/Entitas/README.md: -------------------------------------------------------------------------------- 1 |

2 | Entitas 3 |

4 | 5 |

6 | 7 | Join the chat at https://gitter.im/sschmid/Entitas-CSharp 8 | 9 | Twitter Follow Me 10 | 11 | Twitter Follow Me 12 | 13 | Build Status 14 | 15 | Latest release 16 |

17 | 18 |

19 | Entitas is free, but powered by 20 | 21 | your donations 22 | 23 |

24 | 25 | Entitas - The Entity Component System Framework for C# and Unity 26 | ================================================================ 27 | 28 | Entitas is a super fast Entity Component System Framework (ECS) specifically made for C# and Unity. Internal caching and blazing fast component access makes it second to none. Several design decisions have been made to work optimal in a garbage collected environment and to go easy on the garbage collector. Entitas comes with an optional code generator which radically reduces the amount of code you have to write and [makes your code read like well written prose.][clean-coders] 29 | 30 |

31 | 32 | CSharp 33 | 34 | Unity3d 35 | 36 | Unite Europe 2015 37 | 38 | Unite Europe 2016 39 | 40 | Wooga 41 | 42 | Gram Games.png 43 |

44 | 45 | --- 46 | 47 | ### **[» Download](#download-entitas)** 48 | ### **[» Documentation][documentation]** 49 | ### **[» Ask a question][issues-new]** 50 | ### **[» Wiki and example projects][wiki]** 51 | ### **[» #madeWithEntitas][wiki-games-and-examples]** 52 | 53 | --- 54 | 55 | Video Tutorials & Unity Unite Talks 56 | ================= 57 | 58 | | Entitas ECS Unity Tutorial | Entitas ECS Unity Tutorial | Entity system architecture with Unity | ECS architecture with Unity by example | 59 | |:---------------------------------:|:---------------------------------:|:--------------------------------------------------------------------:|:--------------------------------------------------------------------:| 60 | | [![Shmup1][shmup1-thumb]][shmup1] | [![Shmup2][shmup2-thumb]][shmup2] | [![Unite 15][unite15-thumb]][unite15] | [![Unite 16][unite16-thumb]][unite16] | 61 | | Setup & Basics | Git & Unit Tests | [» Open the slides on SlideShare: Unite Europe 2015][unite15-slides] | [» Open the slides on SlideShare: Unite Europe 2016][unite16-slides] | 62 | 63 | 64 | First glimpse 65 | ============= 66 | 67 | The optional [code generator][wiki-code-generator] lets you write code that is super fast, safe and literally screams its intent. 68 | 69 | ```csharp 70 | public static GameEntity CreateRedGem(this GameContext context, Vector3 position) { 71 | var entity = context.CreateEntity(); 72 | entity.isGameBoardElement = true; 73 | entity.isMovable = true; 74 | entity.AddPosition(position); 75 | entity.AddAsset("RedGem"); 76 | entity.isInteractive = true; 77 | return entity; 78 | } 79 | ``` 80 | 81 | ```csharp 82 | var entities = context.GetEntities(Matcher.AllOf(GameMatcher.Position, GameMatcher.Velocity)); 83 | foreach(var e in entities) { 84 | var pos = e.position; 85 | var vel = e.velocity; 86 | e.ReplacePosition(pos.value + vel.value); 87 | } 88 | ``` 89 | 90 | 91 | Overview 92 | ======== 93 | 94 | Entitas is fast, light and gets rid of unnecessary complexity. There are less than a handful classes you have to know to rocket start your game or application: 95 | 96 | - Entity 97 | - Context 98 | - Group 99 | - Entity Collector 100 | 101 | [Read more...][wiki-overview] 102 | 103 | 104 | Code Generator 105 | ============== 106 | 107 | The Code Generator generates classes and methods for you, so you can focus on getting the job done. It radically reduces the amount of code you have to write and improves readability by a huge magnitude. It makes your code less error-prone while ensuring best performance. I strongly recommend using it! 108 | 109 | [Read more...][wiki-code-generator] 110 | 111 | 112 | Unity integration 113 | ================= 114 | 115 | The optional Unity module integrates Entitas nicely into Unity and provides powerful editor extensions to inspect and debug contexts, groups, entities, components and systems. 116 | 117 | [Read more...][wiki-unity-integration] 118 | 119 |

120 | Entitas.Unity MenuItems
121 | Entitas.Unity.VisualDebugging Entity 122 | Entitas.Unity.VisualDebugging Systems 123 |

124 | 125 | 126 | Entitas deep dive 127 | ================= 128 | 129 | [Read the wiki][wiki] or checkout the [example projects][wiki-example-projects] to see Entitas in action. These example projects illustrate how systems, groups, collectors and entities all play together seamlessly. 130 | 131 | 132 | Download Entitas 133 | ================ 134 | 135 | Each release is published with zip files containing all source files you need. 136 | 137 | [Show releases][releases] 138 | 139 | 140 | Thanks to 141 | ========= 142 | 143 | Big shout out to [@mzaks][github-mzaks], [@cloudjubei][github-cloudjubei] and [@devboy][github-devboy] for endless hours of discussion and helping making Entitas awesome! 144 | 145 | 146 | Maintainer(s) 147 | ============= 148 | 149 | - [@sschmid][github-sschmid] | [@s_schmid][twitter-sschmid] | [@entitas_csharp][twitter-entitas_csharp] 150 | 151 | 152 | Different language? 153 | =================== 154 | 155 | Entitas is available in 156 | - [C#](https://github.com/sschmid/Entitas-CSharp) 157 | - [Swift](https://github.com/mzaks/Entitas-Swift) 158 | - [C++](https://github.com/JuDelCo/Entitas-Cpp) 159 | - [Objective-C](https://github.com/wooga/entitas) 160 | - [Java](https://github.com/Rubentxu/entitas-java) 161 | - [Python](https://github.com/Aenyhm/entitas-python) 162 | - [Scala](https://github.com/darkoverlordofdata/entitas-scala) 163 | - [Go](https://github.com/wooga/go-entitas) 164 | - [F#](https://github.com/darkoverlordofdata/entitas-fsharp) 165 | - [TypeScript](https://github.com/darkoverlordofdata/entitas-ts) 166 | - [Kotlin](https://github.com/darkoverlordofdata/entitas-kotlin) 167 | - [Haskell](https://github.com/mhaemmerle/entitas-haskell) 168 | - [Erlang](https://github.com/mhaemmerle/entitas_erl) 169 | - [Clojure](https://github.com/mhaemmerle/entitas-clj) 170 | 171 | 172 | [clean-coders]: https://cleancoders.com "Clean Coders" 173 | 174 | [documentation]: http://sschmid.github.io/Entitas-CSharp/ "Entitas Documentation" 175 | [wiki]: https://github.com/sschmid/Entitas-CSharp/wiki "Entitas Wiki" 176 | [wiki-code-generator]: https://github.com/sschmid/Entitas-CSharp/wiki/Code-Generator "Wiki - Code Generator" 177 | [wiki-overview]: https://github.com/sschmid/Entitas-CSharp/wiki/Overview "Wiki - Overview" 178 | [wiki-unity-integration]: https://github.com/sschmid/Entitas-CSharp/wiki/Unity-integration "Wiki - Unity Integration" 179 | [wiki-example-projects]: https://github.com/sschmid/Entitas-CSharp/wiki/Example-projects "Wiki - Example Projects" 180 | [wiki-games-and-examples]: https://github.com/sschmid/Entitas-CSharp/wiki/%23madeWithEntitas "Wiki - #madeWithEntitas" 181 | 182 | [shmup1-thumb]: https://raw.githubusercontent.com/sschmid/Entitas-CSharp/master/Readme/Images/Entitas-Shmup-Part-1.jpg "Video: Entitas - Shmup - Part 1" 183 | [shmup1]: https://www.youtube.com/watch?v=L-18XRTarOM "Video: Entitas - Shmup - Part 1" 184 | [shmup2-thumb]: https://raw.githubusercontent.com/sschmid/Entitas-CSharp/master/Readme/Images/Entitas-Shmup-Part-2.jpg "Video: Entitas - Shmup - Part 2" 185 | [shmup2]: https://www.youtube.com/watch?v=DZpvUnj2dGI "Video: Entitas - Shmup - Part 2" 186 | [unite15-thumb]: https://raw.githubusercontent.com/sschmid/Entitas-CSharp/master/Readme/Images/UniteEurope2015-Video.png "Video: Watch the Entitas Talk at Unite Europe 2015" 187 | [unite15]: https://www.youtube.com/watch?v=Re5kGtxTW6E "Video: Watch the Entitas Talk at Unite Europe 2015" 188 | [unite15-slides]: http://www.slideshare.net/sschmid/uniteeurope-2015 "SlideShare: Unite Europe 2015" 189 | [unite16-thumb]: https://raw.githubusercontent.com/sschmid/Entitas-CSharp/master/Readme/Images/UniteEurope2016-Video.png "Video: Watch the Entitas Talk at Unite Europe 2016" 190 | [unite16]: https://www.youtube.com/watch?v=Phx7IJ3XUzg "Video: Watch the Entitas Talk at Unite Europe 2016" 191 | [unite16-slides]: http://www.slideshare.net/sschmid/uniteeurope-2016 "SlideShare: Unite Europe 2016" 192 | 193 | [releases]: https://github.com/sschmid/Entitas-CSharp/releases "Releases" 194 | [issues-new]: https://github.com/sschmid/Entitas-CSharp/issues/new "New issue" 195 | 196 | [twitter-sschmid]: https://twitter.com/s_schmid "s_schmid on Twitter" 197 | [twitter-entitas_csharp]: https://twitter.com/entitas_csharp "entitas_csharp on Twitter" 198 | 199 | [github-sschmid]: https://github.com/sschmid "@sschmid" 200 | [github-mzaks]: https://github.com/mzaks "@mzaks" 201 | [github-cloudjubei]: https://github.com/cloudjubei "@cloudjubei" 202 | [github-devboy]: https://github.com/devboy "@devboy" 203 | -------------------------------------------------------------------------------- /Assets/Libraries/Entitas/README.md.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 442f74ff5ce63479a8c9079d89facff4 3 | timeCreated: 1521858289 4 | licenseType: Free 5 | DefaultImporter: 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/Libraries/Entitas/RELEASE_NOTES.md.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 83d56e7432e1140f69c200d3654fdb2a 3 | timeCreated: 1521858289 4 | licenseType: Free 5 | DefaultImporter: 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/Scenes.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 233b11b77e1d647e48885683462b0026 3 | folderAsset: yes 4 | timeCreated: 1533459893 5 | licenseType: Free 6 | DefaultImporter: 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /Assets/Scenes/GameFSM.unity: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AlexCCLin/Entitas-GameFSM/bac2c1a51820df70a2c4948e990a8cca47686c30/Assets/Scenes/GameFSM.unity -------------------------------------------------------------------------------- /Assets/Scenes/GameFSM.unity.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: cc5ed8bb11b6b4625a898603efc6453c 3 | timeCreated: 1533460342 4 | licenseType: Free 5 | DefaultImporter: 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/Sources.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 8c1e95eb55ff1476299ead07f183309f 3 | folderAsset: yes 4 | timeCreated: 1533459972 5 | licenseType: Free 6 | DefaultImporter: 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /Assets/Sources/GameFSMPackage.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 6e28cd4824fbb4e88a7d228cbc220615 3 | folderAsset: yes 4 | timeCreated: 1533460118 5 | licenseType: Free 6 | DefaultImporter: 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /Assets/Sources/GameFSMPackage/Components.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 0edddeeefc0ad4762b5be8d6e6eeac7d 3 | folderAsset: yes 4 | timeCreated: 1532019496 5 | licenseType: Free 6 | DefaultImporter: 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /Assets/Sources/GameFSMPackage/Components/FSMComponents.cs: -------------------------------------------------------------------------------- 1 | //created by snippet - ecs_icomponent 2 | using Entitas; 3 | using Entitas.CodeGeneration.Attributes; 4 | using System.Collections.Generic; 5 | using UnityEngine; 6 | 7 | //GAMESTATE根據不同遊戲會有不同設定 8 | public enum GAMESTATE { 9 | GAME_INIT, //初始部分 10 | GAME_TITLE, //開頭畫面 11 | GAME_SETUP, //遊戲設定部分 12 | GAME_PLAY, //遊戲主體遊玩部分 13 | GAME_STORE, //遊戲商店部分 14 | GAME_END, //遊戲結束部分 15 | GAME_INFO, //開發資訊部分 16 | GAME_X //不指定遊戲state, 相當於-1 don't care 17 | } 18 | 19 | 20 | 21 | [Game] 22 | public sealed class FSMStateComponent : IComponent { 23 | public GAMESTATE current_state; 24 | public GAMESTATE previous_state; 25 | } 26 | 27 | [Game] 28 | public sealed class FSMSwitchComponent : IComponent { 29 | public bool stack; //決定這次switch是否要stack 目前的 fsm_state, =true : 需要stack 30 | public GAMESTATE from_state; //GAME_X: don't care, otherwise need match from GAMESTATE 31 | public GAMESTATE to_state; //to GAMESTATE 32 | } 33 | 34 | [Game] 35 | public sealed class FSMHoldComponent : IComponent { 36 | public string reason; //必須要填寫理由 37 | } 38 | 39 | [Game] 40 | public sealed class FSMContinueComponent : IComponent { 41 | public string reason; //必須要填寫理由 42 | } 43 | 44 | [Game] 45 | public sealed class FSMResetComponent : IComponent { 46 | public string reason; //必須要填寫理由 47 | } 48 | 49 | //記錄 fsm stack , 實現stack fsm 功能 50 | [Game] 51 | public sealed class FSMStackComponent : IComponent { 52 | public List fsm_stack; 53 | } 54 | 55 | //popup fsm stack, return fsm到上一個state 56 | [Game] 57 | public sealed class FSMReturnComponent : IComponent { 58 | 59 | } 60 | 61 | //======================================================= 62 | //a real fsm processing event 63 | [Game] 64 | [Event(false)] 65 | public sealed class FSMProcessingComponent : IComponent { 66 | //這個是一個flag ,代表FSM正在 processing (Listener 沒全做完) 67 | //Note : 原本 listener_busy_cnt做在這,但是這個component跟event結合 68 | //eventSystem會在此component 有變動時trigger event listener 69 | //這樣無法讓每個event listener 在生成一次FSMProcessing時只做一次 70 | //(會因為listener_cnt變動做很多次) 故這樣修改 71 | } 72 | [Game] 73 | public sealed class FSMProcessingCntComponent : IComponent { 74 | public int listener_busy_cnt; 75 | //這個會在此component建立時收集該entity的 listerner 個數 (並同時發出 fsmhold) 76 | //當 listener收到event時, 會將此busy_cnt - 1, 77 | //當 busy_cnt == 0 時,表示fsm processing完成 (並發出 fsmcontinue) 78 | } 79 | //======================================================== 80 | //這是FSM trigger event 送到Mono gameobject 所需要的component 81 | //當此component一新增時, 會觸發 FSMAdapterSystem 82 | //進行 gameobject 生成,附帶 FSMAdapter script 上去 83 | //新增 Listerner 上去 84 | //再進行 Listener 連結 85 | [Game] 86 | public sealed class FSMAdapterComponent : IComponent { 87 | public GameObject game_object; 88 | } 89 | -------------------------------------------------------------------------------- /Assets/Sources/GameFSMPackage/Components/FSMComponents.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 86fb353697c5d4c39a6dc27941931a7b 3 | timeCreated: 1532019508 4 | licenseType: Free 5 | MonoImporter: 6 | serializedVersion: 2 7 | defaultReferences: [] 8 | executionOrder: 0 9 | icon: {instanceID: 0} 10 | userData: 11 | assetBundleName: 12 | assetBundleVariant: 13 | -------------------------------------------------------------------------------- /Assets/Sources/GameFSMPackage/Prefabs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: d4ad9f819113e44c885c275ed5228f69 3 | folderAsset: yes 4 | timeCreated: 1532880575 5 | licenseType: Free 6 | DefaultImporter: 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /Assets/Sources/GameFSMPackage/Prefabs/TestCube.prefab: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AlexCCLin/Entitas-GameFSM/bac2c1a51820df70a2c4948e990a8cca47686c30/Assets/Sources/GameFSMPackage/Prefabs/TestCube.prefab -------------------------------------------------------------------------------- /Assets/Sources/GameFSMPackage/Prefabs/TestCube.prefab.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 7d9da860136e14bad855498f182470e3 3 | timeCreated: 1532880578 4 | licenseType: Free 5 | NativeFormatImporter: 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/Sources/GameFSMPackage/README: -------------------------------------------------------------------------------- 1 | Version 1.1 2 | ================== 3 | 1. Initial Game FSM template version, it's based on Entitas 1.4.2 4 | 2. 如果你的Entitas是free 版本, 安裝整個package前請follow以下步驟 5 | 1) 請不要整個package目錄放進 Asset 下, 請先暫時放在Asset外 6 | 2) 請先將package/components 目錄拷貝到 Asset/Sources 下 7 | (Sources目錄 是你預定放置Entitas source code的地方) 8 | 3) 放置完後, 啟用Entitas Auto-gen code 的功能, 這時Entitas會parsing 9 | Components目錄內的components宣告, 創建Code 10 | 4) 確認無Error後,刪除Coponents 目錄, 11 | 再將整個package移到Asset/Sources目錄下 12 | 5) 完成移植 13 | -------------------------------------------------------------------------------- /Assets/Sources/GameFSMPackage/README.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: a1bab9f3781ab4748b4b109b5b50e40b 3 | timeCreated: 1533460216 4 | licenseType: Free 5 | DefaultImporter: 6 | userData: 7 | assetBundleName: 8 | assetBundleVariant: 9 | -------------------------------------------------------------------------------- /Assets/Sources/GameFSMPackage/Scripts.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 564807a1911064a47ae608f90eeb1e23 3 | folderAsset: yes 4 | timeCreated: 1532366158 5 | licenseType: Free 6 | DefaultImporter: 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /Assets/Sources/GameFSMPackage/Scripts/FSMDelayEventAdapter.cs: -------------------------------------------------------------------------------- 1 | using UnityEngine; 2 | using System.Collections; 3 | using Entitas; 4 | 5 | public class FSMDelayEventAdapter : FSMEventAdapter { 6 | FSMDebugService fsm_debug_service = FSMDebugService.singleton; 7 | 8 | 9 | public override void OnFSMProcessing(GameEntity entity) { 10 | fsm_debug_service.fsm_msg_report (this.gameObject.name + " : Delay Event : Receive OnFSMProcessing event"); 11 | 12 | StartCoroutine (processing_delay (entity)); 13 | } 14 | 15 | IEnumerator processing_delay(GameEntity e) { 16 | yield return new WaitForSeconds (1); 17 | 18 | //call-back 19 | if (e.hasFSMProcessingCnt) { //防止reset後, FSMProcessingCnt消失造成的error 20 | int cnt = e.fSMProcessingCnt.listener_busy_cnt; 21 | e.ReplaceFSMProcessingCnt (cnt - 1); 22 | } 23 | } 24 | 25 | 26 | } 27 | -------------------------------------------------------------------------------- /Assets/Sources/GameFSMPackage/Scripts/FSMDelayEventAdapter.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: ed4443b97010343f4b311f8300c8a920 3 | timeCreated: 1533137753 4 | licenseType: Free 5 | MonoImporter: 6 | serializedVersion: 2 7 | defaultReferences: [] 8 | executionOrder: 0 9 | icon: {instanceID: 0} 10 | userData: 11 | assetBundleName: 12 | assetBundleVariant: 13 | -------------------------------------------------------------------------------- /Assets/Sources/GameFSMPackage/Scripts/FSMEventAdapter.cs: -------------------------------------------------------------------------------- 1 | using UnityEngine; 2 | using System.Collections; 3 | using Entitas; 4 | 5 | public class FSMEventAdapter : MonoBehaviour, IFSMProcessingListener { 6 | FSMDebugService fsm_debug_service = FSMDebugService.singleton; 7 | 8 | 9 | public virtual void OnFSMProcessing(GameEntity entity) { 10 | fsm_debug_service.fsm_msg_report (this.gameObject.name + " : Receive OnFSMProcessing event"); 11 | 12 | //call-back 13 | int cnt = entity.fSMProcessingCnt.listener_busy_cnt; 14 | entity.ReplaceFSMProcessingCnt (cnt - 1); 15 | } 16 | 17 | } 18 | -------------------------------------------------------------------------------- /Assets/Sources/GameFSMPackage/Scripts/FSMEventAdapter.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: cbfd257e776b940b98374c16995faeb8 3 | timeCreated: 1532845030 4 | licenseType: Free 5 | MonoImporter: 6 | serializedVersion: 2 7 | defaultReferences: [] 8 | executionOrder: 0 9 | icon: {instanceID: 0} 10 | userData: 11 | assetBundleName: 12 | assetBundleVariant: 13 | -------------------------------------------------------------------------------- /Assets/Sources/GameFSMPackage/Scripts/FSMGameController.cs: -------------------------------------------------------------------------------- 1 | //created by snippet - ecs_game_controller 2 | using Entitas; 3 | using UnityEngine; 4 | 5 | public class FSMGameController : MonoBehaviour { 6 | 7 | //prefabs 8 | public GameObject cube_prefab; 9 | // 10 | public GameObject[] static_event_listerner_objs; 11 | 12 | 13 | public FSMServices _services = FSMServices.singleton; 14 | 15 | Systems _systems; 16 | 17 | void Awake() { 18 | var contexts = Contexts.sharedInstance; 19 | _services.Initialize (contexts, this); 20 | _systems = new FSMGameSystems(contexts); 21 | } 22 | 23 | void Start() { 24 | _systems.Initialize(); 25 | } 26 | 27 | void Update() { 28 | _systems.Execute(); 29 | _systems.Cleanup(); 30 | } 31 | 32 | void OnDestroy() { 33 | _systems.TearDown(); 34 | } 35 | } -------------------------------------------------------------------------------- /Assets/Sources/GameFSMPackage/Scripts/FSMGameController.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: dbab120a61feb403c95f8e3f11f0ebd1 3 | timeCreated: 1532366190 4 | licenseType: Free 5 | MonoImporter: 6 | serializedVersion: 2 7 | defaultReferences: [] 8 | executionOrder: 0 9 | icon: {instanceID: 0} 10 | userData: 11 | assetBundleName: 12 | assetBundleVariant: 13 | -------------------------------------------------------------------------------- /Assets/Sources/GameFSMPackage/Services.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 57f6c953c27f344d39f75040c4dfbf96 3 | folderAsset: yes 4 | timeCreated: 1532365757 5 | licenseType: Free 6 | DefaultImporter: 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /Assets/Sources/GameFSMPackage/Services/FSMAdatpterService.cs: -------------------------------------------------------------------------------- 1 | //created by snippet - ecs_entity_services 2 | using Entitas.Unity; 3 | using UnityEngine; 4 | 5 | public class FSMAdapterService { 6 | 7 | FSMDebugService fsm_debug_service = FSMDebugService.singleton; 8 | 9 | public Transform root_transform; 10 | public GameObject adapter_prefab; 11 | GameObject[] _static_event_listener_objs; 12 | 13 | public static FSMAdapterService singleton = new FSMAdapterService(); 14 | 15 | Contexts _contexts; 16 | 17 | public void Initialize(Contexts contexts, FSMGameController uniTestController) { 18 | _contexts = contexts; 19 | adapter_prefab = uniTestController.cube_prefab; 20 | root_transform = uniTestController.transform; 21 | 22 | _static_event_listener_objs = uniTestController.static_event_listerner_objs; 23 | 24 | } 25 | 26 | //這個表示Scene內已有 掛有 event_listener 的gameobject 27 | //透過這個 function call來跟某個entity 做連結 28 | public void fsm_link_static_event_listener_gameobjects (GameEntity e) { 29 | fsm_debug_service.fsm_msg_report ("fsm_link_static_event_listener_gameobjects"); 30 | foreach (GameObject obj in _static_event_listener_objs) { 31 | obj.Link (e, _contexts.game); 32 | e.AddFSMProcessingListener (obj.GetComponent()); 33 | } 34 | } 35 | 36 | //這個是動態生成 event adapter時所需要的 function 37 | public void fsm_create_prefab_adapter(GameEntity e) { 38 | GameObject _obj = (GameObject) GameObject.Instantiate (adapter_prefab, Vector3.zero, Quaternion.identity); 39 | _obj.transform.SetParent (root_transform); 40 | _obj.Link (e, _contexts.game); 41 | 42 | //_obj.AddComponent; 43 | 44 | e.AddFSMProcessingListener (_obj.GetComponent()); 45 | } 46 | 47 | } -------------------------------------------------------------------------------- /Assets/Sources/GameFSMPackage/Services/FSMAdatpterService.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: cb60a3c9e80ab4e0f824589a1e2d809a 3 | timeCreated: 1532879482 4 | licenseType: Free 5 | MonoImporter: 6 | serializedVersion: 2 7 | defaultReferences: [] 8 | executionOrder: 0 9 | icon: {instanceID: 0} 10 | userData: 11 | assetBundleName: 12 | assetBundleVariant: 13 | -------------------------------------------------------------------------------- /Assets/Sources/GameFSMPackage/Services/FSMDebugService.cs: -------------------------------------------------------------------------------- 1 | //created by snippet - ecs_entity_services 2 | using UnityEngine; 3 | 4 | public class FSMDebugService { 5 | //other Serices include 6 | //public RandomService randomService = RandomService.game; 7 | //other Mono class include 8 | //public BackGroundManager bg_manager; 9 | 10 | 11 | 12 | public static FSMDebugService singleton = new FSMDebugService(); 13 | 14 | //Contexts _contexts; 15 | 16 | public void Initialize(Contexts contexts) { 17 | //_contexts = contexts; 18 | //bg_manager = GameObject.Find ("BackGroundSprite"); 19 | } 20 | 21 | public void fsm_msg_report(string message) { 22 | Debug.Log(message); 23 | } 24 | 25 | } -------------------------------------------------------------------------------- /Assets/Sources/GameFSMPackage/Services/FSMDebugService.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 15a7453e1640e4785ab71cdf616f5e8d 3 | timeCreated: 1532366445 4 | licenseType: Free 5 | MonoImporter: 6 | serializedVersion: 2 7 | defaultReferences: [] 8 | executionOrder: 0 9 | icon: {instanceID: 0} 10 | userData: 11 | assetBundleName: 12 | assetBundleVariant: 13 | -------------------------------------------------------------------------------- /Assets/Sources/GameFSMPackage/Services/FSMServices.cs: -------------------------------------------------------------------------------- 1 | //created by snippet - ecs_services 2 | using System; 3 | 4 | public class FSMServices { 5 | 6 | public static FSMServices singleton = new FSMServices(); 7 | 8 | public void Initialize(Contexts contexts, FSMGameController uniTestController) { 9 | 10 | FSMDebugService.singleton.Initialize(contexts); 11 | FSMSwitchService.singleton.Initialize (contexts); 12 | FSMAdapterService.singleton.Initialize (contexts, uniTestController); 13 | } 14 | } -------------------------------------------------------------------------------- /Assets/Sources/GameFSMPackage/Services/FSMServices.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 033bf448bf9a041338cf7ed73681e0c3 3 | timeCreated: 1532366955 4 | licenseType: Free 5 | MonoImporter: 6 | serializedVersion: 2 7 | defaultReferences: [] 8 | executionOrder: 0 9 | icon: {instanceID: 0} 10 | userData: 11 | assetBundleName: 12 | assetBundleVariant: 13 | -------------------------------------------------------------------------------- /Assets/Sources/GameFSMPackage/Services/FSMSwitchService.cs: -------------------------------------------------------------------------------- 1 | //created by snippet - ecs_entity_services 2 | using UnityEngine; 3 | using System.Collections.Generic; 4 | 5 | public class FSMSwitchService { 6 | //other Serices include 7 | //public RandomService randomService = RandomService.game; 8 | //other Mono class include 9 | //public BackGroundManager bg_manager; 10 | FSMDebugService fsm_debug_service = FSMDebugService.singleton; 11 | 12 | public static FSMSwitchService singleton = new FSMSwitchService(); 13 | 14 | Contexts _contexts; 15 | 16 | public void Initialize(Contexts contexts) { 17 | _contexts = contexts; 18 | } 19 | //提供一個init API 20 | public GameEntity fsm_init() { 21 | GameEntity e = _contexts.game.CreateEntity (); 22 | e.AddFSMState(GAMESTATE.GAME_INIT, GAMESTATE.GAME_INIT); 23 | 24 | List _stack_list = new List (); 25 | _stack_list.Add (GAMESTATE.GAME_INIT); 26 | 27 | e.AddFSMStack (_stack_list); 28 | return e; 29 | } 30 | 31 | 32 | //我們提供一種服務讓外部系統switch fsm : 如果fsm 沒有switch component,就新增,有,就用replace 33 | public void fsm_switch(GameEntity e, GAMESTATE from_state, GAMESTATE to_state) { 34 | if (e.isFSMReturn) { 35 | fsm_debug_service.fsm_msg_report ("Warning, Already have FSMReturn in entity"); 36 | return; 37 | } 38 | 39 | if (e.hasFSMSwitch) 40 | e.ReplaceFSMSwitch (false, from_state, to_state); 41 | else 42 | e.AddFSMSwitch (false, from_state, to_state); 43 | } 44 | 45 | //我們提供一種服務讓外部系統switch fsm : 如果fsm 沒有switch component,就新增,有,就用replace 46 | //這是決定要stack fsm_state的 function call 47 | public void fsm_switch_stack(GameEntity e, GAMESTATE from_state, GAMESTATE to_state) { 48 | if (e.isFSMReturn) { 49 | fsm_debug_service.fsm_msg_report ("Warning, Already have FSMReturn in entity"); 50 | return; 51 | } 52 | 53 | if (e.hasFSMSwitch) 54 | e.ReplaceFSMSwitch (true, from_state, to_state); 55 | else 56 | e.AddFSMSwitch (true, from_state, to_state); 57 | } 58 | 59 | public void fsm_reset(GameEntity e, string reason) { 60 | if(!e.hasFSMReset) 61 | e.AddFSMReset (reason); 62 | } 63 | public void fsm_hold(GameEntity e, string reason) { 64 | if(!e.hasFSMHold) 65 | e.AddFSMHold (reason); 66 | } 67 | public void fsm_continue(GameEntity e, string reason) { 68 | if(!e.hasFSMContinue) 69 | e.AddFSMContinue (reason); 70 | } 71 | public void fsm_return(GameEntity e) { 72 | if (e.hasFSMSwitch) { 73 | fsm_debug_service.fsm_msg_report ("Warning, Already have FSMSwitch in entity"); 74 | return; 75 | } 76 | 77 | if (!e.isFSMReturn) 78 | e.isFSMReturn = true; 79 | } 80 | 81 | 82 | 83 | } -------------------------------------------------------------------------------- /Assets/Sources/GameFSMPackage/Services/FSMSwitchService.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 09662db8c3c844a0f85e3c7b88671014 3 | timeCreated: 1532442928 4 | licenseType: Free 5 | MonoImporter: 6 | serializedVersion: 2 7 | defaultReferences: [] 8 | executionOrder: 0 9 | icon: {instanceID: 0} 10 | userData: 11 | assetBundleName: 12 | assetBundleVariant: 13 | -------------------------------------------------------------------------------- /Assets/Sources/GameFSMPackage/Systems.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 6aa8a74d205934b45ab25989c2303365 3 | folderAsset: yes 4 | timeCreated: 1532020082 5 | licenseType: Free 6 | DefaultImporter: 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /Assets/Sources/GameFSMPackage/Systems/FSMAdapterSystem.cs: -------------------------------------------------------------------------------- 1 | //created by snippet - ecs_react_init_system 2 | using System.Collections.Generic; 3 | //using System.Linq; 4 | using Entitas; 5 | using UnityEngine; 6 | 7 | 8 | public sealed class FSMAdapterSystem : ReactiveSystem, ICleanupSystem { 9 | 10 | 11 | 12 | //connect services 13 | FSMAdapterService fsm_adapter_service = FSMAdapterService.singleton; 14 | 15 | //readonly Contexts _contexts; 16 | readonly IGroup _fsm_adapter_entities; 17 | 18 | public FSMAdapterSystem (Contexts contexts) : base(contexts.game){ 19 | //_contexts = contexts; 20 | _fsm_adapter_entities = contexts.game.GetGroup(GameMatcher.FSMAdapter); 21 | } 22 | 23 | 24 | protected override ICollector GetTrigger(IContext context) { 25 | return context.CreateCollector (GameMatcher.FSMAdapter); 26 | } 27 | 28 | protected override bool Filter(GameEntity entity) { 29 | return entity.hasFSMAdapter; 30 | } 31 | 32 | protected override void Execute(List entities) { 33 | foreach (var e in entities) 34 | { 35 | fsm_adapter_service.fsm_create_prefab_adapter (e); 36 | } 37 | } 38 | 39 | 40 | public void Cleanup() { 41 | foreach(var e in _fsm_adapter_entities.GetEntities()) { 42 | e.RemoveFSMAdapter (); 43 | } 44 | } 45 | 46 | } -------------------------------------------------------------------------------- /Assets/Sources/GameFSMPackage/Systems/FSMAdapterSystem.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: e4de46444d6dd40e7972b4cb3707e51c 3 | timeCreated: 1532879208 4 | licenseType: Free 5 | MonoImporter: 6 | serializedVersion: 2 7 | defaultReferences: [] 8 | executionOrder: 0 9 | icon: {instanceID: 0} 10 | userData: 11 | assetBundleName: 12 | assetBundleVariant: 13 | -------------------------------------------------------------------------------- /Assets/Sources/GameFSMPackage/Systems/FSMHoldSystem.cs: -------------------------------------------------------------------------------- 1 | //created by snippet - ecs_react_cleanup_system 2 | using System.Collections.Generic; 3 | //using System.Linq; 4 | using Entitas; 5 | public sealed class FSMHoldSystem : ReactiveSystem, ICleanupSystem{ 6 | 7 | //connect services 8 | //FSMDebugService fsm_debug_service = FSMDebugService.singleton; 9 | 10 | readonly Contexts _contexts; 11 | readonly IGroup _fsm_continue_entities; 12 | 13 | public FSMHoldSystem (Contexts contexts) : base(contexts.game){ 14 | _contexts = contexts; 15 | _fsm_continue_entities = _contexts.game.GetGroup(GameMatcher.FSMContinue); 16 | } 17 | 18 | protected override ICollector GetTrigger(IContext context) { 19 | return context.CreateCollector (GameMatcher.FSMContinue.Added()); 20 | } 21 | 22 | protected override bool Filter(GameEntity entity) { 23 | return entity.hasFSMHold & entity.hasFSMContinue; 24 | } 25 | 26 | protected override void Execute(List entities) { 27 | //fsm_debug_service.fsm_msg_report ("==> hold execute"); 28 | foreach (var e in entities) 29 | { 30 | e.RemoveFSMHold (); 31 | 32 | if (e.hasFSMSwitch) { 33 | //如果有殘留FSMSwitch, 刪除,並重生FSMSwitch trigger FSMSwitch System 34 | GAMESTATE _from_state = e.fSMSwitch.from_state; 35 | GAMESTATE _to_state = e.fSMSwitch.to_state; 36 | bool _stack = e.fSMSwitch.stack; 37 | e.RemoveFSMSwitch (); 38 | 39 | e.AddFSMSwitch (_stack, _from_state, _to_state); 40 | 41 | } 42 | if (e.isFSMReturn) { 43 | //如果有殘留FSMReturn, 刪除,並重生FSMReturn trigger FSMSwitch System 44 | e.isFSMReturn = false; 45 | 46 | e.isFSMReturn = true; 47 | } 48 | } 49 | } 50 | 51 | public void Cleanup() { 52 | foreach(var e in _fsm_continue_entities.GetEntities()) { 53 | e.RemoveFSMContinue(); 54 | 55 | } 56 | } 57 | 58 | } -------------------------------------------------------------------------------- /Assets/Sources/GameFSMPackage/Systems/FSMHoldSystem.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 872223ffaeac141ca8fc6e635e6893e3 3 | timeCreated: 1532359847 4 | licenseType: Free 5 | MonoImporter: 6 | serializedVersion: 2 7 | defaultReferences: [] 8 | executionOrder: 0 9 | icon: {instanceID: 0} 10 | userData: 11 | assetBundleName: 12 | assetBundleVariant: 13 | -------------------------------------------------------------------------------- /Assets/Sources/GameFSMPackage/Systems/FSMProcessingSystem.cs: -------------------------------------------------------------------------------- 1 | //created by snippet - ecs_react_cleanup_system 2 | using System.Collections.Generic; 3 | //using System.Linq; 4 | using Entitas; 5 | public sealed class FSMProcessingSystem : ReactiveSystem { 6 | 7 | //connect services 8 | FSMDebugService fsm_debug_service = FSMDebugService.singleton; 9 | 10 | //readonly Contexts _contexts; 11 | //readonly IGroup _listener_list; 12 | 13 | public FSMProcessingSystem (Contexts contexts) : base(contexts.game){ 14 | //_contexts = contexts; 15 | //_listener_list = contexts.game.GetGroup(GameMatcher.FSMProcessingListener); 16 | } 17 | 18 | protected override ICollector GetTrigger(IContext context) { 19 | return context.CreateCollector (GameMatcher.FSMProcessingCnt); 20 | } 21 | 22 | protected override bool Filter(GameEntity entity) { 23 | return entity.isFSMProcessing & entity.hasFSMProcessingCnt; 24 | } 25 | 26 | protected override void Execute(List entities) { 27 | fsm_debug_service.fsm_msg_report ("fsm processing execute : "); 28 | foreach (var e in entities) 29 | { 30 | //fsm_debug_service.fsm_msg_report ( e.fSMProcessingCnt.listener_busy_cnt.ToString() ); 31 | if (e.fSMProcessingCnt.listener_busy_cnt == 0) { 32 | e.isFSMProcessing = false; 33 | e.RemoveFSMProcessingCnt (); 34 | } 35 | } 36 | } 37 | 38 | 39 | } -------------------------------------------------------------------------------- /Assets/Sources/GameFSMPackage/Systems/FSMProcessingSystem.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: ab8839f1ee9074f9781b353b2eed27ea 3 | timeCreated: 1532790032 4 | licenseType: Free 5 | MonoImporter: 6 | serializedVersion: 2 7 | defaultReferences: [] 8 | executionOrder: 0 9 | icon: {instanceID: 0} 10 | userData: 11 | assetBundleName: 12 | assetBundleVariant: 13 | -------------------------------------------------------------------------------- /Assets/Sources/GameFSMPackage/Systems/FSMResetSystem.cs: -------------------------------------------------------------------------------- 1 | //created by snippet - ecs_react_cleanup_system 2 | using System.Collections.Generic; 3 | //using System.Linq; 4 | using Entitas; 5 | public sealed class FSMResetSystem : ReactiveSystem, ICleanupSystem{ 6 | 7 | //connect services 8 | 9 | 10 | //readonly Contexts _contexts; 11 | readonly IGroup _fsm_reset_entities; 12 | 13 | public FSMResetSystem (Contexts contexts) : base(contexts.game){ 14 | //_contexts = contexts; 15 | _fsm_reset_entities = contexts.game.GetGroup(GameMatcher.FSMReset); 16 | } 17 | 18 | protected override ICollector GetTrigger(IContext context) { 19 | return context.CreateCollector (GameMatcher.FSMReset.Added()); 20 | } 21 | 22 | protected override bool Filter(GameEntity entity) { 23 | return entity.hasFSMState & entity.hasFSMReset; 24 | } 25 | 26 | protected override void Execute(List entities) { 27 | //_contexts.gameState.ReplaceScore (_contexts.gameState.score.value + entities.Count); 28 | foreach (var e in entities) 29 | { 30 | e.fSMState.previous_state = GAMESTATE.GAME_INIT; 31 | e.fSMState.current_state = GAMESTATE.GAME_INIT; 32 | 33 | if (e.hasFSMStack) { 34 | e.fSMStack.fsm_stack.Clear (); 35 | e.fSMStack.fsm_stack.Add (GAMESTATE.GAME_INIT); 36 | } 37 | 38 | if (e.isFSMProcessing) { 39 | e.isFSMProcessing = false; 40 | e.RemoveFSMProcessingCnt (); 41 | } 42 | } 43 | } 44 | 45 | public void Cleanup() { 46 | foreach(var e in _fsm_reset_entities.GetEntities()) { 47 | if (e.hasFSMHold) 48 | e.RemoveFSMHold (); 49 | 50 | e.RemoveFSMReset(); 51 | } 52 | } 53 | 54 | } -------------------------------------------------------------------------------- /Assets/Sources/GameFSMPackage/Systems/FSMResetSystem.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 354551bf120e649c4bf9f5fea1368b16 3 | timeCreated: 1532360630 4 | licenseType: Free 5 | MonoImporter: 6 | serializedVersion: 2 7 | defaultReferences: [] 8 | executionOrder: 0 9 | icon: {instanceID: 0} 10 | userData: 11 | assetBundleName: 12 | assetBundleVariant: 13 | -------------------------------------------------------------------------------- /Assets/Sources/GameFSMPackage/Systems/FSMReturnSystem.cs: -------------------------------------------------------------------------------- 1 | //created by snippet - ecs_react_cleanup_system 2 | using System.Collections.Generic; 3 | //using System.Linq; 4 | using Entitas; 5 | public sealed class FSMReturnSystem : ReactiveSystem, ICleanupSystem{ 6 | 7 | //connect services 8 | FSMDebugService fsm_debug_service = FSMDebugService.singleton; 9 | 10 | //readonly Contexts _contexts; 11 | readonly IGroup _fsm_return_entities; 12 | 13 | 14 | public FSMReturnSystem (Contexts contexts) : base(contexts.game) { 15 | //_contexts = contexts; 16 | _fsm_return_entities = contexts.game.GetGroup(GameMatcher.FSMReturn); 17 | } 18 | 19 | protected override ICollector GetTrigger(IContext context) { 20 | 21 | return context.CreateCollector (GameMatcher.FSMReturn.Added ()); 22 | //return context.CreateCollector (GameMatcher.AnyOf(GameMatcher.FSMReturn, GameMatcher.FSMContinue)); //這樣不行!! no trigger 23 | } 24 | 25 | protected override bool Filter(GameEntity entity) { 26 | return entity.hasFSMState & entity.hasFSMStack & entity.isFSMReturn & !entity.hasFSMHold & !entity.hasFSMSwitch; 27 | } 28 | 29 | protected override void Execute(List entities) { 30 | //fsm_debug_service.fsm_msg_report ("==> return execute"); 31 | foreach (var e in entities) 32 | { 33 | //Return FSM 34 | if (e.fSMStack.fsm_stack.Count <= 1) { 35 | fsm_debug_service.fsm_msg_report ("Warning!! FSM is alredy in last state"); 36 | } else { 37 | //e.fSMState.previous_state = e.fSMState.current_state; 38 | //e.fSMState.current_state = e.fSMStack.fsm_stack [0]; 39 | GAMESTATE _state = e.fSMStack.fsm_stack[e.fSMStack.fsm_stack.Count-2]; 40 | e.AddFSMSwitch(false, GAMESTATE.GAME_X, _state); 41 | e.fSMStack.fsm_stack.RemoveAt (e.fSMStack.fsm_stack.Count - 1); 42 | } 43 | } 44 | } 45 | 46 | public void Cleanup() { 47 | foreach(var e in _fsm_return_entities.GetEntities()) { 48 | if (!e.hasFSMHold) 49 | e.isFSMReturn = false; 50 | } 51 | } 52 | 53 | } -------------------------------------------------------------------------------- /Assets/Sources/GameFSMPackage/Systems/FSMReturnSystem.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 78dc86015fcce4c48a007f036439f066 3 | timeCreated: 1532618379 4 | licenseType: Free 5 | MonoImporter: 6 | serializedVersion: 2 7 | defaultReferences: [] 8 | executionOrder: 0 9 | icon: {instanceID: 0} 10 | userData: 11 | assetBundleName: 12 | assetBundleVariant: 13 | -------------------------------------------------------------------------------- /Assets/Sources/GameFSMPackage/Systems/FSMSwitchSystem.cs: -------------------------------------------------------------------------------- 1 | //created by snippet - ecs_react_cleanup_system 2 | using System.Collections.Generic; 3 | //using System.Linq; 4 | using Entitas; 5 | public sealed class FSMSwitchSystem : ReactiveSystem, ICleanupSystem{ 6 | 7 | //connect services 8 | FSMDebugService fsm_debug_service = FSMDebugService.singleton; 9 | 10 | //readonly Contexts _contexts; 11 | readonly IGroup _fsm_switch_entities; 12 | //readonly IGroup _fsm_processing_listeners; 13 | 14 | 15 | public FSMSwitchSystem (Contexts contexts) : base(contexts.game) { 16 | //_contexts = contexts; 17 | _fsm_switch_entities = contexts.game.GetGroup(GameMatcher.FSMSwitch); 18 | //_fsm_processing_listeners = contexts.game.GetGroup(GameMatcher.FSMProcessingListener); 19 | } 20 | 21 | protected override ICollector GetTrigger(IContext context) { 22 | 23 | return context.CreateCollector (GameMatcher.FSMSwitch.Added ()); 24 | //return context.CreateCollector (GameMatcher.AnyOf(GameMatcher.FSMSwitch, GameMatcher.FSMContinue)); 25 | } 26 | 27 | protected override bool Filter(GameEntity entity) { 28 | return entity.hasFSMState & entity.hasFSMSwitch & !entity.hasFSMHold & !entity.isFSMProcessing; 29 | } 30 | 31 | protected override void Execute(List entities) { 32 | //fsm_debug_service.fsm_msg_report ("==> switch execute"); 33 | foreach (var e in entities) 34 | { 35 | if (e.fSMSwitch.from_state == GAMESTATE.GAME_X) { //don't care from state 36 | e.fSMState.previous_state = e.fSMState.current_state; 37 | e.fSMState.current_state = e.fSMSwitch.to_state; 38 | 39 | if (e.hasFSMStack & !e.isFSMReturn & e.fSMSwitch.stack) { 40 | e.fSMStack.fsm_stack.Add (e.fSMSwitch.to_state); 41 | } 42 | 43 | fsm_trigger_processing (e); 44 | } else { 45 | if (e.fSMSwitch.from_state != e.fSMState.current_state) { 46 | //something wrong! report error 47 | //debug_service report 48 | fsm_debug_service.fsm_msg_report("Error!! FSM from_state / current_state mismatch!!"); 49 | } else { 50 | e.fSMState.previous_state = e.fSMState.current_state; 51 | e.fSMState.current_state = e.fSMSwitch.to_state; 52 | 53 | if (e.hasFSMStack & !e.isFSMReturn & e.fSMSwitch.stack) { 54 | e.fSMStack.fsm_stack.Add (e.fSMSwitch.to_state); 55 | } 56 | 57 | fsm_trigger_processing (e); 58 | } 59 | } 60 | } 61 | } 62 | 63 | private void fsm_trigger_processing(GameEntity e) { 64 | if (e.hasFSMProcessingListener) { 65 | fsm_debug_service.fsm_msg_report ("Trigger FSM processing, listener_cnt = " + e.fSMProcessingListener.value.Count); 66 | //記錄該entity 內的 FSMProcessingListener 的 listerner 個數 67 | //每個listener 會call-back ,並倒扣 FSMProcessing 的value - 1 68 | e.isFSMProcessing = true; 69 | e.AddFSMProcessingCnt (e.fSMProcessingListener.value.Count); 70 | } 71 | } 72 | 73 | 74 | public void Cleanup() { 75 | foreach(var e in _fsm_switch_entities.GetEntities()) { 76 | if(!e.hasFSMHold ) 77 | e.RemoveFSMSwitch (); 78 | } 79 | } 80 | 81 | } -------------------------------------------------------------------------------- /Assets/Sources/GameFSMPackage/Systems/FSMSwitchSystem.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 352fd3f3fefe9403eb6cbc1d09ab522e 3 | timeCreated: 1532358642 4 | licenseType: Free 5 | MonoImporter: 6 | serializedVersion: 2 7 | defaultReferences: [] 8 | executionOrder: 0 9 | icon: {instanceID: 0} 10 | userData: 11 | assetBundleName: 12 | assetBundleVariant: 13 | -------------------------------------------------------------------------------- /Assets/Sources/GameFSMPackage/Systems/FSMSystems.cs: -------------------------------------------------------------------------------- 1 | //created by snippet - ecs_feature_systems 2 | 3 | 4 | public sealed class FSMGameSystems : Feature { 5 | public FSMGameSystems(Contexts contexts) { 6 | 7 | Add (new FSMUniTestSystem (contexts)); //UniTest 8 | //以下順序綁定 9 | //為了達成處理System hold著時, FSMSwitch依然留著, 當FSMContinue 解開FSMHold時 10 | //留在entity裡的FSMSwitch仍然可以被處裡 11 | //手法是當 Hold System處理FSMContine ,remove FSMHold時,會copy 一份原FSMSwitch 12 | //篩除原來的FSMSwitch, 再新增加一個FSMSwitch,目的是為了trigger FSMSwitchSystem 13 | //達成以上功能 14 | Add(new FSMHoldSystem(contexts)); 15 | Add(new FSMReturnSystem (contexts)); 16 | Add(new FSMSwitchSystem(contexts)); 17 | Add(new FSMResetSystem(contexts)); 18 | Add (new FSMAdapterSystem (contexts)); //For Event Processing 19 | Add(new FSMProcessingSystem(contexts)); //For Event Processing 20 | Add (new FSMProcessingEventSystem (contexts)); //For Event Processing 21 | // 22 | } 23 | } -------------------------------------------------------------------------------- /Assets/Sources/GameFSMPackage/Systems/FSMSystems.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 7a612951cf9704596b779d96dcea87f3 3 | timeCreated: 1532020337 4 | licenseType: Free 5 | MonoImporter: 6 | serializedVersion: 2 7 | defaultReferences: [] 8 | executionOrder: 0 9 | icon: {instanceID: 0} 10 | userData: 11 | assetBundleName: 12 | assetBundleVariant: 13 | -------------------------------------------------------------------------------- /Assets/Sources/GameFSMPackage/Systems/UniTest.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 6ab416acfc1ff41d0b0ce155c6beb79c 3 | folderAsset: yes 4 | timeCreated: 1532361259 5 | licenseType: Free 6 | DefaultImporter: 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /Assets/Sources/GameFSMPackage/Systems/UniTest/FSMUniTestSystem.cs: -------------------------------------------------------------------------------- 1 | //created by snippet - ecs_init_system 2 | using System.Collections.Generic; 3 | //using System.Linq; 4 | using Entitas; 5 | using UnityEngine; 6 | 7 | 8 | public sealed class FSMUniTestSystem : IExecuteSystem , IInitializeSystem { 9 | 10 | 11 | //connect services 12 | FSMDebugService fsm_debug_service = FSMDebugService.singleton; 13 | FSMSwitchService fsm_switch_service = FSMSwitchService.singleton; 14 | FSMAdapterService fsm_adapter_service = FSMAdapterService.singleton; 15 | 16 | //readonly Contexts _contexts; 17 | //readonly IGroup game_fsm_entity; 18 | GameEntity fsm_entity; 19 | 20 | public FSMUniTestSystem (Contexts contexts) { 21 | //_contexts = contexts; 22 | //game_fsm_entity = _contexts.game.GetGroup (GameMatcher.FSMState); 23 | } 24 | 25 | public void Initialize() { 26 | fsm_entity = fsm_switch_service.fsm_init(); 27 | 28 | //將static event_listener 連結起來 29 | fsm_adapter_service.fsm_link_static_event_listener_gameobjects (fsm_entity); 30 | 31 | } 32 | 33 | 34 | public void Execute() { 35 | 36 | //GameEntity e = game_fsm_entity.GetSingleEntity(); //對Game FSM而言,應該是singletone entity才對 37 | GameEntity e = fsm_entity; 38 | 39 | if (Input.GetKeyDown (KeyCode.A)) { 40 | 41 | fsm_debug_service.fsm_msg_report ("FSM Unit Test : pressed A"); 42 | fsm_switch_service.fsm_switch (e, GAMESTATE.GAME_X, GAMESTATE.GAME_SETUP); 43 | 44 | } else if (Input.GetKeyDown (KeyCode.B)) { 45 | 46 | fsm_debug_service.fsm_msg_report ("FSM Unit Test : pressed B"); 47 | fsm_switch_service.fsm_switch (e, GAMESTATE.GAME_X, GAMESTATE.GAME_STORE); 48 | 49 | } else if (Input.GetKeyDown (KeyCode.C)) { 50 | 51 | fsm_debug_service.fsm_msg_report ("FSM Unit Test : pressed C"); 52 | fsm_switch_service.fsm_switch (e, GAMESTATE.GAME_X, GAMESTATE.GAME_PLAY); 53 | 54 | } else if (Input.GetKeyDown (KeyCode.D)) { 55 | 56 | fsm_debug_service.fsm_msg_report ("FSM Unit Test : pressed D"); 57 | fsm_switch_service.fsm_switch (e, GAMESTATE.GAME_X, GAMESTATE.GAME_END); 58 | } else if (Input.GetKeyDown (KeyCode.E)) { 59 | 60 | fsm_debug_service.fsm_msg_report ("FSM Unit Test : pressed E"); 61 | fsm_switch_service.fsm_switch_stack (e, GAMESTATE.GAME_X, GAMESTATE.GAME_END); 62 | 63 | } else if (Input.GetKeyDown (KeyCode.F)) { 64 | 65 | fsm_debug_service.fsm_msg_report ("FSM Unit Test : pressed F"); 66 | //e.AddFSMReset ("Keycode E pressed test"); 67 | fsm_switch_service.fsm_reset (e, "Keycode E pressed test"); 68 | 69 | } else if (Input.GetKeyDown (KeyCode.H)) { 70 | fsm_debug_service.fsm_msg_report ("FSM Unit Test : pressed H, Hold flag"); 71 | //e.AddFSMHold ("Add Hold flag to hold FSM state"); 72 | fsm_switch_service.fsm_hold (e, "Keycode E pressed test"); 73 | } else if (Input.GetKeyDown (KeyCode.S)) { 74 | fsm_debug_service.fsm_msg_report ("FSM Unit Test : pressed S, Continue flag"); 75 | //e.AddFSMContinue ("Add Continue flag to Continue FSM state"); 76 | fsm_switch_service.fsm_continue (e, "Add Continue flag to Continue FSM state"); 77 | } else if (Input.GetKeyDown (KeyCode.R)) { 78 | fsm_debug_service.fsm_msg_report ("FSM Unit Test : pressed R, Return flag"); 79 | //e.isFSMReturn = true; 80 | fsm_switch_service.fsm_return (e); 81 | } else if (Input.GetKeyDown (KeyCode.P)) { 82 | fsm_debug_service.fsm_msg_report ("FSM Unit Test : pressed P, Create one event adapter"); 83 | fsm_adapter_service.fsm_create_prefab_adapter (fsm_entity); 84 | } 85 | 86 | } 87 | 88 | } -------------------------------------------------------------------------------- /Assets/Sources/GameFSMPackage/Systems/UniTest/FSMUniTestSystem.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 41c04f110a4a840a88a9a5a81259971f 3 | timeCreated: 1532367046 4 | licenseType: Free 5 | MonoImporter: 6 | serializedVersion: 2 7 | defaultReferences: [] 8 | executionOrder: 0 9 | icon: {instanceID: 0} 10 | userData: 11 | assetBundleName: 12 | assetBundleVariant: 13 | -------------------------------------------------------------------------------- /Assets/Sources/Generated.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: e28d56c3f97974a788fcd569a43bc2b2 3 | folderAsset: yes 4 | timeCreated: 1533459972 5 | licenseType: Free 6 | DefaultImporter: 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /Assets/Sources/Generated/Contexts.cs: -------------------------------------------------------------------------------- 1 | //------------------------------------------------------------------------------ 2 | // 3 | // This code was generated by Entitas.CodeGeneration.Plugins.ContextsGenerator. 4 | // 5 | // Changes to this file may cause incorrect behavior and will be lost if 6 | // the code is regenerated. 7 | // 8 | //------------------------------------------------------------------------------ 9 | public partial class Contexts : Entitas.IContexts { 10 | 11 | public static Contexts sharedInstance { 12 | get { 13 | if (_sharedInstance == null) { 14 | _sharedInstance = new Contexts(); 15 | } 16 | 17 | return _sharedInstance; 18 | } 19 | set { _sharedInstance = value; } 20 | } 21 | 22 | static Contexts _sharedInstance; 23 | 24 | public GameContext game { get; set; } 25 | 26 | public Entitas.IContext[] allContexts { get { return new Entitas.IContext [] { game }; } } 27 | 28 | public Contexts() { 29 | game = new GameContext(); 30 | 31 | var postConstructors = System.Linq.Enumerable.Where( 32 | GetType().GetMethods(), 33 | method => System.Attribute.IsDefined(method, typeof(Entitas.CodeGeneration.Attributes.PostConstructorAttribute)) 34 | ); 35 | 36 | foreach (var postConstructor in postConstructors) { 37 | postConstructor.Invoke(this, null); 38 | } 39 | } 40 | 41 | public void Reset() { 42 | var contexts = allContexts; 43 | for (int i = 0; i < contexts.Length; i++) { 44 | contexts[i].Reset(); 45 | } 46 | } 47 | } 48 | 49 | //------------------------------------------------------------------------------ 50 | // 51 | // This code was generated by Entitas.VisualDebugging.CodeGeneration.Plugins.ContextObserverGenerator. 52 | // 53 | // Changes to this file may cause incorrect behavior and will be lost if 54 | // the code is regenerated. 55 | // 56 | //------------------------------------------------------------------------------ 57 | public partial class Contexts { 58 | 59 | #if (!ENTITAS_DISABLE_VISUAL_DEBUGGING && UNITY_EDITOR) 60 | 61 | [Entitas.CodeGeneration.Attributes.PostConstructor] 62 | public void InitializeContexObservers() { 63 | try { 64 | CreateContextObserver(game); 65 | } catch(System.Exception) { 66 | } 67 | } 68 | 69 | public void CreateContextObserver(Entitas.IContext context) { 70 | if (UnityEngine.Application.isPlaying) { 71 | var observer = new Entitas.VisualDebugging.Unity.ContextObserver(context); 72 | UnityEngine.Object.DontDestroyOnLoad(observer.gameObject); 73 | } 74 | } 75 | 76 | #endif 77 | } 78 | -------------------------------------------------------------------------------- /Assets/Sources/Generated/Contexts.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 9fd102f55773b4f0a83174d1b21ac454 3 | timeCreated: 1533459972 4 | licenseType: Free 5 | MonoImporter: 6 | serializedVersion: 2 7 | defaultReferences: [] 8 | executionOrder: 0 9 | icon: {instanceID: 0} 10 | userData: 11 | assetBundleName: 12 | assetBundleVariant: 13 | -------------------------------------------------------------------------------- /Assets/Sources/Generated/Events.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 3e23f52dd9e6a4eac80764ec06d843cf 3 | folderAsset: yes 4 | timeCreated: 1533459972 5 | licenseType: Free 6 | DefaultImporter: 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /Assets/Sources/Generated/Events/Components.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 83535d854ff3f451f9fab7f2cc8edc92 3 | folderAsset: yes 4 | timeCreated: 1533460196 5 | licenseType: Free 6 | DefaultImporter: 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /Assets/Sources/Generated/Events/Components/FSMProcessingListenerComponent.cs: -------------------------------------------------------------------------------- 1 | //------------------------------------------------------------------------------ 2 | // 3 | // This code was generated by Entitas.CodeGeneration.Plugins.EventListenerComponentGenerator. 4 | // 5 | // Changes to this file may cause incorrect behavior and will be lost if 6 | // the code is regenerated. 7 | // 8 | //------------------------------------------------------------------------------ 9 | [Entitas.CodeGeneration.Attributes.DontGenerate(false)] 10 | public sealed class FSMProcessingListenerComponent : Entitas.IComponent { 11 | public System.Collections.Generic.List value; 12 | } 13 | -------------------------------------------------------------------------------- /Assets/Sources/Generated/Events/Components/FSMProcessingListenerComponent.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 911d666f0199a4b1aac5387d516deffb 3 | timeCreated: 1533460197 4 | licenseType: Free 5 | MonoImporter: 6 | serializedVersion: 2 7 | defaultReferences: [] 8 | executionOrder: 0 9 | icon: {instanceID: 0} 10 | userData: 11 | assetBundleName: 12 | assetBundleVariant: 13 | -------------------------------------------------------------------------------- /Assets/Sources/Generated/Events/EventSystems.cs: -------------------------------------------------------------------------------- 1 | //------------------------------------------------------------------------------ 2 | // 3 | // This code was generated by Entitas.CodeGeneration.Plugins.EventSystemsGenerator. 4 | // 5 | // Changes to this file may cause incorrect behavior and will be lost if 6 | // the code is regenerated. 7 | // 8 | //------------------------------------------------------------------------------ 9 | public sealed class EventSystems : Feature { 10 | 11 | public EventSystems(Contexts contexts) { 12 | Add(new FSMProcessingEventSystem(contexts)); // priority: 0 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /Assets/Sources/Generated/Events/EventSystems.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 4b403e905cf9b453cb3d17fda5c12375 3 | timeCreated: 1533459972 4 | licenseType: Free 5 | MonoImporter: 6 | serializedVersion: 2 7 | defaultReferences: [] 8 | executionOrder: 0 9 | icon: {instanceID: 0} 10 | userData: 11 | assetBundleName: 12 | assetBundleVariant: 13 | -------------------------------------------------------------------------------- /Assets/Sources/Generated/Events/Interfaces.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: e71747151f5e14d5b85fe15caa9cf41d 3 | folderAsset: yes 4 | timeCreated: 1533460196 5 | licenseType: Free 6 | DefaultImporter: 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /Assets/Sources/Generated/Events/Interfaces/IFSMProcessingListener.cs: -------------------------------------------------------------------------------- 1 | //------------------------------------------------------------------------------ 2 | // 3 | // This code was generated by Entitas.CodeGeneration.Plugins.EventListenertInterfaceGenerator. 4 | // 5 | // Changes to this file may cause incorrect behavior and will be lost if 6 | // the code is regenerated. 7 | // 8 | //------------------------------------------------------------------------------ 9 | public interface IFSMProcessingListener { 10 | void OnFSMProcessing(GameEntity entity); 11 | } 12 | -------------------------------------------------------------------------------- /Assets/Sources/Generated/Events/Interfaces/IFSMProcessingListener.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: a66b8fe1d0d1f47b9aa12bf690f92303 3 | timeCreated: 1533460197 4 | licenseType: Free 5 | MonoImporter: 6 | serializedVersion: 2 7 | defaultReferences: [] 8 | executionOrder: 0 9 | icon: {instanceID: 0} 10 | userData: 11 | assetBundleName: 12 | assetBundleVariant: 13 | -------------------------------------------------------------------------------- /Assets/Sources/Generated/Events/Systems.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 3cc5e886d16a24129b06269cd8eb680f 3 | folderAsset: yes 4 | timeCreated: 1533460196 5 | licenseType: Free 6 | DefaultImporter: 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /Assets/Sources/Generated/Events/Systems/FSMProcessingEventSystem.cs: -------------------------------------------------------------------------------- 1 | //------------------------------------------------------------------------------ 2 | // 3 | // This code was generated by Entitas.CodeGeneration.Plugins.EventSystemGenerator. 4 | // 5 | // Changes to this file may cause incorrect behavior and will be lost if 6 | // the code is regenerated. 7 | // 8 | //------------------------------------------------------------------------------ 9 | public sealed class FSMProcessingEventSystem : Entitas.ReactiveSystem { 10 | 11 | readonly Entitas.IGroup _listeners; 12 | 13 | public FSMProcessingEventSystem(Contexts contexts) : base(contexts.game) { 14 | _listeners = contexts.game.GetGroup(GameMatcher.FSMProcessingListener); 15 | } 16 | 17 | protected override Entitas.ICollector GetTrigger(Entitas.IContext context) { 18 | return Entitas.CollectorContextExtension.CreateCollector( 19 | context, Entitas.TriggerOnEventMatcherExtension.Added(GameMatcher.FSMProcessing) 20 | ); 21 | } 22 | 23 | protected override bool Filter(GameEntity entity) { 24 | return entity.isFSMProcessing; 25 | } 26 | 27 | protected override void Execute(System.Collections.Generic.List entities) { 28 | foreach (var e in entities) { 29 | 30 | foreach (var listenerEntity in _listeners) { 31 | foreach (var listener in listenerEntity.fSMProcessingListener.value) { 32 | listener.OnFSMProcessing(e); 33 | } 34 | } 35 | } 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /Assets/Sources/Generated/Events/Systems/FSMProcessingEventSystem.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: f7930cdea2e5d480ba0c381c7e3fd27d 3 | timeCreated: 1533460197 4 | licenseType: Free 5 | MonoImporter: 6 | serializedVersion: 2 7 | defaultReferences: [] 8 | executionOrder: 0 9 | icon: {instanceID: 0} 10 | userData: 11 | assetBundleName: 12 | assetBundleVariant: 13 | -------------------------------------------------------------------------------- /Assets/Sources/Generated/Feature.cs: -------------------------------------------------------------------------------- 1 | //------------------------------------------------------------------------------ 2 | // 3 | // This code was generated by Entitas.VisualDebugging.CodeGeneration.Plugins.FeatureClassGenerator. 4 | // 5 | // Changes to this file may cause incorrect behavior and will be lost if 6 | // the code is regenerated. 7 | // 8 | //------------------------------------------------------------------------------ 9 | #if (!ENTITAS_DISABLE_VISUAL_DEBUGGING && UNITY_EDITOR) 10 | 11 | public class Feature : Entitas.VisualDebugging.Unity.DebugSystems { 12 | 13 | public Feature(string name) : base(name) { 14 | } 15 | 16 | public Feature() : base(true) { 17 | var typeName = DesperateDevs.Utils.SerializationTypeExtension.ToCompilableString(GetType()); 18 | var shortType = DesperateDevs.Utils.SerializationTypeExtension.ShortTypeName(typeName); 19 | var readableType = DesperateDevs.Utils.StringExtension.ToSpacedCamelCase(shortType); 20 | 21 | initialize(readableType); 22 | } 23 | } 24 | 25 | #elif (!ENTITAS_DISABLE_DEEP_PROFILING && DEVELOPMENT_BUILD) 26 | 27 | public class Feature : Entitas.Systems { 28 | 29 | System.Collections.Generic.List _initializeSystemNames; 30 | System.Collections.Generic.List _executeSystemNames; 31 | System.Collections.Generic.List _cleanupSystemNames; 32 | System.Collections.Generic.List _tearDownSystemNames; 33 | 34 | public Feature(string name) : this() { 35 | } 36 | 37 | public Feature() { 38 | _initializeSystemNames = new System.Collections.Generic.List(); 39 | _executeSystemNames = new System.Collections.Generic.List(); 40 | _cleanupSystemNames = new System.Collections.Generic.List(); 41 | _tearDownSystemNames = new System.Collections.Generic.List(); 42 | } 43 | 44 | public override Entitas.Systems Add(Entitas.ISystem system) { 45 | var systemName = system.GetType().FullName; 46 | 47 | if (system is Entitas.IInitializeSystem) { 48 | _initializeSystemNames.Add(systemName); 49 | } 50 | 51 | if (system is Entitas.IExecuteSystem) { 52 | _executeSystemNames.Add(systemName); 53 | } 54 | 55 | if (system is Entitas.ICleanupSystem) { 56 | _cleanupSystemNames.Add(systemName); 57 | } 58 | 59 | if (system is Entitas.ITearDownSystem) { 60 | _tearDownSystemNames.Add(systemName); 61 | } 62 | 63 | return base.Add(system); 64 | } 65 | 66 | public override void Initialize() { 67 | for (int i = 0; i < _initializeSystems.Count; i++) { 68 | UnityEngine.Profiling.Profiler.BeginSample(_initializeSystemNames[i]); 69 | _initializeSystems[i].Initialize(); 70 | UnityEngine.Profiling.Profiler.EndSample(); 71 | } 72 | } 73 | 74 | public override void Execute() { 75 | for (int i = 0; i < _executeSystems.Count; i++) { 76 | UnityEngine.Profiling.Profiler.BeginSample(_executeSystemNames[i]); 77 | _executeSystems[i].Execute(); 78 | UnityEngine.Profiling.Profiler.EndSample(); 79 | } 80 | } 81 | 82 | public override void Cleanup() { 83 | for (int i = 0; i < _cleanupSystems.Count; i++) { 84 | UnityEngine.Profiling.Profiler.BeginSample(_cleanupSystemNames[i]); 85 | _cleanupSystems[i].Cleanup(); 86 | UnityEngine.Profiling.Profiler.EndSample(); 87 | } 88 | } 89 | 90 | public override void TearDown() { 91 | for (int i = 0; i < _tearDownSystems.Count; i++) { 92 | UnityEngine.Profiling.Profiler.BeginSample(_tearDownSystemNames[i]); 93 | _tearDownSystems[i].TearDown(); 94 | UnityEngine.Profiling.Profiler.EndSample(); 95 | } 96 | } 97 | } 98 | 99 | #else 100 | 101 | public class Feature : Entitas.Systems { 102 | 103 | public Feature(string name) { 104 | } 105 | 106 | public Feature() { 107 | } 108 | } 109 | 110 | #endif 111 | -------------------------------------------------------------------------------- /Assets/Sources/Generated/Feature.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 47deb0001e5ed4376bbb3002e3002fae 3 | timeCreated: 1533459972 4 | licenseType: Free 5 | MonoImporter: 6 | serializedVersion: 2 7 | defaultReferences: [] 8 | executionOrder: 0 9 | icon: {instanceID: 0} 10 | userData: 11 | assetBundleName: 12 | assetBundleVariant: 13 | -------------------------------------------------------------------------------- /Assets/Sources/Generated/Game.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 09782d1a8197647dc8e2569d29d4d62c 3 | folderAsset: yes 4 | timeCreated: 1533459972 5 | licenseType: Free 6 | DefaultImporter: 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /Assets/Sources/Generated/Game/Components.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: ab5e9f04a357b47a6a7428241ea7c1df 3 | folderAsset: yes 4 | timeCreated: 1533460196 5 | licenseType: Free 6 | DefaultImporter: 7 | userData: 8 | assetBundleName: 9 | assetBundleVariant: 10 | -------------------------------------------------------------------------------- /Assets/Sources/Generated/Game/Components/GameFSMAdapterComponent.cs: -------------------------------------------------------------------------------- 1 | //------------------------------------------------------------------------------ 2 | // 3 | // This code was generated by Entitas.CodeGeneration.Plugins.ComponentEntityApiGenerator. 4 | // 5 | // Changes to this file may cause incorrect behavior and will be lost if 6 | // the code is regenerated. 7 | // 8 | //------------------------------------------------------------------------------ 9 | public partial class GameEntity { 10 | 11 | public FSMAdapterComponent fSMAdapter { get { return (FSMAdapterComponent)GetComponent(GameComponentsLookup.FSMAdapter); } } 12 | public bool hasFSMAdapter { get { return HasComponent(GameComponentsLookup.FSMAdapter); } } 13 | 14 | public void AddFSMAdapter(UnityEngine.GameObject newGame_object) { 15 | var index = GameComponentsLookup.FSMAdapter; 16 | var component = CreateComponent(index); 17 | component.game_object = newGame_object; 18 | AddComponent(index, component); 19 | } 20 | 21 | public void ReplaceFSMAdapter(UnityEngine.GameObject newGame_object) { 22 | var index = GameComponentsLookup.FSMAdapter; 23 | var component = CreateComponent(index); 24 | component.game_object = newGame_object; 25 | ReplaceComponent(index, component); 26 | } 27 | 28 | public void RemoveFSMAdapter() { 29 | RemoveComponent(GameComponentsLookup.FSMAdapter); 30 | } 31 | } 32 | 33 | //------------------------------------------------------------------------------ 34 | // 35 | // This code was generated by Entitas.CodeGeneration.Plugins.ComponentMatcherApiGenerator. 36 | // 37 | // Changes to this file may cause incorrect behavior and will be lost if 38 | // the code is regenerated. 39 | // 40 | //------------------------------------------------------------------------------ 41 | public sealed partial class GameMatcher { 42 | 43 | static Entitas.IMatcher _matcherFSMAdapter; 44 | 45 | public static Entitas.IMatcher FSMAdapter { 46 | get { 47 | if (_matcherFSMAdapter == null) { 48 | var matcher = (Entitas.Matcher)Entitas.Matcher.AllOf(GameComponentsLookup.FSMAdapter); 49 | matcher.componentNames = GameComponentsLookup.componentNames; 50 | _matcherFSMAdapter = matcher; 51 | } 52 | 53 | return _matcherFSMAdapter; 54 | } 55 | } 56 | } 57 | -------------------------------------------------------------------------------- /Assets/Sources/Generated/Game/Components/GameFSMAdapterComponent.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 516341a72ba7646dca977633a6ec25f2 3 | timeCreated: 1533460197 4 | licenseType: Free 5 | MonoImporter: 6 | serializedVersion: 2 7 | defaultReferences: [] 8 | executionOrder: 0 9 | icon: {instanceID: 0} 10 | userData: 11 | assetBundleName: 12 | assetBundleVariant: 13 | -------------------------------------------------------------------------------- /Assets/Sources/Generated/Game/Components/GameFSMContinueComponent.cs: -------------------------------------------------------------------------------- 1 | //------------------------------------------------------------------------------ 2 | // 3 | // This code was generated by Entitas.CodeGeneration.Plugins.ComponentEntityApiGenerator. 4 | // 5 | // Changes to this file may cause incorrect behavior and will be lost if 6 | // the code is regenerated. 7 | // 8 | //------------------------------------------------------------------------------ 9 | public partial class GameEntity { 10 | 11 | public FSMContinueComponent fSMContinue { get { return (FSMContinueComponent)GetComponent(GameComponentsLookup.FSMContinue); } } 12 | public bool hasFSMContinue { get { return HasComponent(GameComponentsLookup.FSMContinue); } } 13 | 14 | public void AddFSMContinue(string newReason) { 15 | var index = GameComponentsLookup.FSMContinue; 16 | var component = CreateComponent(index); 17 | component.reason = newReason; 18 | AddComponent(index, component); 19 | } 20 | 21 | public void ReplaceFSMContinue(string newReason) { 22 | var index = GameComponentsLookup.FSMContinue; 23 | var component = CreateComponent(index); 24 | component.reason = newReason; 25 | ReplaceComponent(index, component); 26 | } 27 | 28 | public void RemoveFSMContinue() { 29 | RemoveComponent(GameComponentsLookup.FSMContinue); 30 | } 31 | } 32 | 33 | //------------------------------------------------------------------------------ 34 | // 35 | // This code was generated by Entitas.CodeGeneration.Plugins.ComponentMatcherApiGenerator. 36 | // 37 | // Changes to this file may cause incorrect behavior and will be lost if 38 | // the code is regenerated. 39 | // 40 | //------------------------------------------------------------------------------ 41 | public sealed partial class GameMatcher { 42 | 43 | static Entitas.IMatcher _matcherFSMContinue; 44 | 45 | public static Entitas.IMatcher FSMContinue { 46 | get { 47 | if (_matcherFSMContinue == null) { 48 | var matcher = (Entitas.Matcher)Entitas.Matcher.AllOf(GameComponentsLookup.FSMContinue); 49 | matcher.componentNames = GameComponentsLookup.componentNames; 50 | _matcherFSMContinue = matcher; 51 | } 52 | 53 | return _matcherFSMContinue; 54 | } 55 | } 56 | } 57 | -------------------------------------------------------------------------------- /Assets/Sources/Generated/Game/Components/GameFSMContinueComponent.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 7234fb6231b734da4bbcccf46f3c7720 3 | timeCreated: 1533460197 4 | licenseType: Free 5 | MonoImporter: 6 | serializedVersion: 2 7 | defaultReferences: [] 8 | executionOrder: 0 9 | icon: {instanceID: 0} 10 | userData: 11 | assetBundleName: 12 | assetBundleVariant: 13 | -------------------------------------------------------------------------------- /Assets/Sources/Generated/Game/Components/GameFSMHoldComponent.cs: -------------------------------------------------------------------------------- 1 | //------------------------------------------------------------------------------ 2 | // 3 | // This code was generated by Entitas.CodeGeneration.Plugins.ComponentEntityApiGenerator. 4 | // 5 | // Changes to this file may cause incorrect behavior and will be lost if 6 | // the code is regenerated. 7 | // 8 | //------------------------------------------------------------------------------ 9 | public partial class GameEntity { 10 | 11 | public FSMHoldComponent fSMHold { get { return (FSMHoldComponent)GetComponent(GameComponentsLookup.FSMHold); } } 12 | public bool hasFSMHold { get { return HasComponent(GameComponentsLookup.FSMHold); } } 13 | 14 | public void AddFSMHold(string newReason) { 15 | var index = GameComponentsLookup.FSMHold; 16 | var component = CreateComponent(index); 17 | component.reason = newReason; 18 | AddComponent(index, component); 19 | } 20 | 21 | public void ReplaceFSMHold(string newReason) { 22 | var index = GameComponentsLookup.FSMHold; 23 | var component = CreateComponent(index); 24 | component.reason = newReason; 25 | ReplaceComponent(index, component); 26 | } 27 | 28 | public void RemoveFSMHold() { 29 | RemoveComponent(GameComponentsLookup.FSMHold); 30 | } 31 | } 32 | 33 | //------------------------------------------------------------------------------ 34 | // 35 | // This code was generated by Entitas.CodeGeneration.Plugins.ComponentMatcherApiGenerator. 36 | // 37 | // Changes to this file may cause incorrect behavior and will be lost if 38 | // the code is regenerated. 39 | // 40 | //------------------------------------------------------------------------------ 41 | public sealed partial class GameMatcher { 42 | 43 | static Entitas.IMatcher _matcherFSMHold; 44 | 45 | public static Entitas.IMatcher FSMHold { 46 | get { 47 | if (_matcherFSMHold == null) { 48 | var matcher = (Entitas.Matcher)Entitas.Matcher.AllOf(GameComponentsLookup.FSMHold); 49 | matcher.componentNames = GameComponentsLookup.componentNames; 50 | _matcherFSMHold = matcher; 51 | } 52 | 53 | return _matcherFSMHold; 54 | } 55 | } 56 | } 57 | -------------------------------------------------------------------------------- /Assets/Sources/Generated/Game/Components/GameFSMHoldComponent.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 31ce820eba8594b1c9a1f560db3f4297 3 | timeCreated: 1533460197 4 | licenseType: Free 5 | MonoImporter: 6 | serializedVersion: 2 7 | defaultReferences: [] 8 | executionOrder: 0 9 | icon: {instanceID: 0} 10 | userData: 11 | assetBundleName: 12 | assetBundleVariant: 13 | -------------------------------------------------------------------------------- /Assets/Sources/Generated/Game/Components/GameFSMProcessingCntComponent.cs: -------------------------------------------------------------------------------- 1 | //------------------------------------------------------------------------------ 2 | // 3 | // This code was generated by Entitas.CodeGeneration.Plugins.ComponentEntityApiGenerator. 4 | // 5 | // Changes to this file may cause incorrect behavior and will be lost if 6 | // the code is regenerated. 7 | // 8 | //------------------------------------------------------------------------------ 9 | public partial class GameEntity { 10 | 11 | public FSMProcessingCntComponent fSMProcessingCnt { get { return (FSMProcessingCntComponent)GetComponent(GameComponentsLookup.FSMProcessingCnt); } } 12 | public bool hasFSMProcessingCnt { get { return HasComponent(GameComponentsLookup.FSMProcessingCnt); } } 13 | 14 | public void AddFSMProcessingCnt(int newListener_busy_cnt) { 15 | var index = GameComponentsLookup.FSMProcessingCnt; 16 | var component = CreateComponent(index); 17 | component.listener_busy_cnt = newListener_busy_cnt; 18 | AddComponent(index, component); 19 | } 20 | 21 | public void ReplaceFSMProcessingCnt(int newListener_busy_cnt) { 22 | var index = GameComponentsLookup.FSMProcessingCnt; 23 | var component = CreateComponent(index); 24 | component.listener_busy_cnt = newListener_busy_cnt; 25 | ReplaceComponent(index, component); 26 | } 27 | 28 | public void RemoveFSMProcessingCnt() { 29 | RemoveComponent(GameComponentsLookup.FSMProcessingCnt); 30 | } 31 | } 32 | 33 | //------------------------------------------------------------------------------ 34 | // 35 | // This code was generated by Entitas.CodeGeneration.Plugins.ComponentMatcherApiGenerator. 36 | // 37 | // Changes to this file may cause incorrect behavior and will be lost if 38 | // the code is regenerated. 39 | // 40 | //------------------------------------------------------------------------------ 41 | public sealed partial class GameMatcher { 42 | 43 | static Entitas.IMatcher _matcherFSMProcessingCnt; 44 | 45 | public static Entitas.IMatcher FSMProcessingCnt { 46 | get { 47 | if (_matcherFSMProcessingCnt == null) { 48 | var matcher = (Entitas.Matcher)Entitas.Matcher.AllOf(GameComponentsLookup.FSMProcessingCnt); 49 | matcher.componentNames = GameComponentsLookup.componentNames; 50 | _matcherFSMProcessingCnt = matcher; 51 | } 52 | 53 | return _matcherFSMProcessingCnt; 54 | } 55 | } 56 | } 57 | -------------------------------------------------------------------------------- /Assets/Sources/Generated/Game/Components/GameFSMProcessingCntComponent.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: a9064ce8d859b41d2bca27c64f021823 3 | timeCreated: 1533460197 4 | licenseType: Free 5 | MonoImporter: 6 | serializedVersion: 2 7 | defaultReferences: [] 8 | executionOrder: 0 9 | icon: {instanceID: 0} 10 | userData: 11 | assetBundleName: 12 | assetBundleVariant: 13 | -------------------------------------------------------------------------------- /Assets/Sources/Generated/Game/Components/GameFSMProcessingComponent.cs: -------------------------------------------------------------------------------- 1 | //------------------------------------------------------------------------------ 2 | // 3 | // This code was generated by Entitas.CodeGeneration.Plugins.ComponentEntityApiGenerator. 4 | // 5 | // Changes to this file may cause incorrect behavior and will be lost if 6 | // the code is regenerated. 7 | // 8 | //------------------------------------------------------------------------------ 9 | public partial class GameEntity { 10 | 11 | static readonly FSMProcessingComponent fSMProcessingComponent = new FSMProcessingComponent(); 12 | 13 | public bool isFSMProcessing { 14 | get { return HasComponent(GameComponentsLookup.FSMProcessing); } 15 | set { 16 | if (value != isFSMProcessing) { 17 | var index = GameComponentsLookup.FSMProcessing; 18 | if (value) { 19 | var componentPool = GetComponentPool(index); 20 | var component = componentPool.Count > 0 21 | ? componentPool.Pop() 22 | : fSMProcessingComponent; 23 | 24 | AddComponent(index, component); 25 | } else { 26 | RemoveComponent(index); 27 | } 28 | } 29 | } 30 | } 31 | } 32 | 33 | //------------------------------------------------------------------------------ 34 | // 35 | // This code was generated by Entitas.CodeGeneration.Plugins.ComponentMatcherApiGenerator. 36 | // 37 | // Changes to this file may cause incorrect behavior and will be lost if 38 | // the code is regenerated. 39 | // 40 | //------------------------------------------------------------------------------ 41 | public sealed partial class GameMatcher { 42 | 43 | static Entitas.IMatcher _matcherFSMProcessing; 44 | 45 | public static Entitas.IMatcher FSMProcessing { 46 | get { 47 | if (_matcherFSMProcessing == null) { 48 | var matcher = (Entitas.Matcher)Entitas.Matcher.AllOf(GameComponentsLookup.FSMProcessing); 49 | matcher.componentNames = GameComponentsLookup.componentNames; 50 | _matcherFSMProcessing = matcher; 51 | } 52 | 53 | return _matcherFSMProcessing; 54 | } 55 | } 56 | } 57 | -------------------------------------------------------------------------------- /Assets/Sources/Generated/Game/Components/GameFSMProcessingComponent.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: ad5e2ca7833674a988b578acdad15f99 3 | timeCreated: 1533460197 4 | licenseType: Free 5 | MonoImporter: 6 | serializedVersion: 2 7 | defaultReferences: [] 8 | executionOrder: 0 9 | icon: {instanceID: 0} 10 | userData: 11 | assetBundleName: 12 | assetBundleVariant: 13 | -------------------------------------------------------------------------------- /Assets/Sources/Generated/Game/Components/GameFSMProcessingListenerComponent.cs: -------------------------------------------------------------------------------- 1 | //------------------------------------------------------------------------------ 2 | // 3 | // This code was generated by Entitas.CodeGeneration.Plugins.ComponentEntityApiGenerator. 4 | // 5 | // Changes to this file may cause incorrect behavior and will be lost if 6 | // the code is regenerated. 7 | // 8 | //------------------------------------------------------------------------------ 9 | public partial class GameEntity { 10 | 11 | public FSMProcessingListenerComponent fSMProcessingListener { get { return (FSMProcessingListenerComponent)GetComponent(GameComponentsLookup.FSMProcessingListener); } } 12 | public bool hasFSMProcessingListener { get { return HasComponent(GameComponentsLookup.FSMProcessingListener); } } 13 | 14 | public void AddFSMProcessingListener(System.Collections.Generic.List newValue) { 15 | var index = GameComponentsLookup.FSMProcessingListener; 16 | var component = CreateComponent(index); 17 | component.value = newValue; 18 | AddComponent(index, component); 19 | } 20 | 21 | public void ReplaceFSMProcessingListener(System.Collections.Generic.List newValue) { 22 | var index = GameComponentsLookup.FSMProcessingListener; 23 | var component = CreateComponent(index); 24 | component.value = newValue; 25 | ReplaceComponent(index, component); 26 | } 27 | 28 | public void RemoveFSMProcessingListener() { 29 | RemoveComponent(GameComponentsLookup.FSMProcessingListener); 30 | } 31 | } 32 | 33 | //------------------------------------------------------------------------------ 34 | // 35 | // This code was generated by Entitas.CodeGeneration.Plugins.ComponentMatcherApiGenerator. 36 | // 37 | // Changes to this file may cause incorrect behavior and will be lost if 38 | // the code is regenerated. 39 | // 40 | //------------------------------------------------------------------------------ 41 | public sealed partial class GameMatcher { 42 | 43 | static Entitas.IMatcher _matcherFSMProcessingListener; 44 | 45 | public static Entitas.IMatcher FSMProcessingListener { 46 | get { 47 | if (_matcherFSMProcessingListener == null) { 48 | var matcher = (Entitas.Matcher)Entitas.Matcher.AllOf(GameComponentsLookup.FSMProcessingListener); 49 | matcher.componentNames = GameComponentsLookup.componentNames; 50 | _matcherFSMProcessingListener = matcher; 51 | } 52 | 53 | return _matcherFSMProcessingListener; 54 | } 55 | } 56 | } 57 | 58 | //------------------------------------------------------------------------------ 59 | // 60 | // This code was generated by Entitas.CodeGeneration.Plugins.EventEntityApiGenerator. 61 | // 62 | // Changes to this file may cause incorrect behavior and will be lost if 63 | // the code is regenerated. 64 | // 65 | //------------------------------------------------------------------------------ 66 | public partial class GameEntity { 67 | 68 | public void AddFSMProcessingListener(IFSMProcessingListener value) { 69 | var listeners = hasFSMProcessingListener 70 | ? fSMProcessingListener.value 71 | : new System.Collections.Generic.List(); 72 | listeners.Add(value); 73 | ReplaceFSMProcessingListener(listeners); 74 | } 75 | 76 | public void RemoveFSMProcessingListener(IFSMProcessingListener value, bool removeComponentWhenEmpty = true) { 77 | var listeners = fSMProcessingListener.value; 78 | listeners.Remove(value); 79 | if (removeComponentWhenEmpty && listeners.Count == 0) { 80 | RemoveFSMProcessingListener(); 81 | } else { 82 | ReplaceFSMProcessingListener(listeners); 83 | } 84 | } 85 | } 86 | -------------------------------------------------------------------------------- /Assets/Sources/Generated/Game/Components/GameFSMProcessingListenerComponent.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 495bc61ff293c43dfaa9acb4a4f4d641 3 | timeCreated: 1533460197 4 | licenseType: Free 5 | MonoImporter: 6 | serializedVersion: 2 7 | defaultReferences: [] 8 | executionOrder: 0 9 | icon: {instanceID: 0} 10 | userData: 11 | assetBundleName: 12 | assetBundleVariant: 13 | -------------------------------------------------------------------------------- /Assets/Sources/Generated/Game/Components/GameFSMResetComponent.cs: -------------------------------------------------------------------------------- 1 | //------------------------------------------------------------------------------ 2 | // 3 | // This code was generated by Entitas.CodeGeneration.Plugins.ComponentEntityApiGenerator. 4 | // 5 | // Changes to this file may cause incorrect behavior and will be lost if 6 | // the code is regenerated. 7 | // 8 | //------------------------------------------------------------------------------ 9 | public partial class GameEntity { 10 | 11 | public FSMResetComponent fSMReset { get { return (FSMResetComponent)GetComponent(GameComponentsLookup.FSMReset); } } 12 | public bool hasFSMReset { get { return HasComponent(GameComponentsLookup.FSMReset); } } 13 | 14 | public void AddFSMReset(string newReason) { 15 | var index = GameComponentsLookup.FSMReset; 16 | var component = CreateComponent(index); 17 | component.reason = newReason; 18 | AddComponent(index, component); 19 | } 20 | 21 | public void ReplaceFSMReset(string newReason) { 22 | var index = GameComponentsLookup.FSMReset; 23 | var component = CreateComponent(index); 24 | component.reason = newReason; 25 | ReplaceComponent(index, component); 26 | } 27 | 28 | public void RemoveFSMReset() { 29 | RemoveComponent(GameComponentsLookup.FSMReset); 30 | } 31 | } 32 | 33 | //------------------------------------------------------------------------------ 34 | // 35 | // This code was generated by Entitas.CodeGeneration.Plugins.ComponentMatcherApiGenerator. 36 | // 37 | // Changes to this file may cause incorrect behavior and will be lost if 38 | // the code is regenerated. 39 | // 40 | //------------------------------------------------------------------------------ 41 | public sealed partial class GameMatcher { 42 | 43 | static Entitas.IMatcher _matcherFSMReset; 44 | 45 | public static Entitas.IMatcher FSMReset { 46 | get { 47 | if (_matcherFSMReset == null) { 48 | var matcher = (Entitas.Matcher)Entitas.Matcher.AllOf(GameComponentsLookup.FSMReset); 49 | matcher.componentNames = GameComponentsLookup.componentNames; 50 | _matcherFSMReset = matcher; 51 | } 52 | 53 | return _matcherFSMReset; 54 | } 55 | } 56 | } 57 | -------------------------------------------------------------------------------- /Assets/Sources/Generated/Game/Components/GameFSMResetComponent.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 3ac8da386572f4b8783615d2a2bf9197 3 | timeCreated: 1533460197 4 | licenseType: Free 5 | MonoImporter: 6 | serializedVersion: 2 7 | defaultReferences: [] 8 | executionOrder: 0 9 | icon: {instanceID: 0} 10 | userData: 11 | assetBundleName: 12 | assetBundleVariant: 13 | -------------------------------------------------------------------------------- /Assets/Sources/Generated/Game/Components/GameFSMReturnComponent.cs: -------------------------------------------------------------------------------- 1 | //------------------------------------------------------------------------------ 2 | // 3 | // This code was generated by Entitas.CodeGeneration.Plugins.ComponentEntityApiGenerator. 4 | // 5 | // Changes to this file may cause incorrect behavior and will be lost if 6 | // the code is regenerated. 7 | // 8 | //------------------------------------------------------------------------------ 9 | public partial class GameEntity { 10 | 11 | static readonly FSMReturnComponent fSMReturnComponent = new FSMReturnComponent(); 12 | 13 | public bool isFSMReturn { 14 | get { return HasComponent(GameComponentsLookup.FSMReturn); } 15 | set { 16 | if (value != isFSMReturn) { 17 | var index = GameComponentsLookup.FSMReturn; 18 | if (value) { 19 | var componentPool = GetComponentPool(index); 20 | var component = componentPool.Count > 0 21 | ? componentPool.Pop() 22 | : fSMReturnComponent; 23 | 24 | AddComponent(index, component); 25 | } else { 26 | RemoveComponent(index); 27 | } 28 | } 29 | } 30 | } 31 | } 32 | 33 | //------------------------------------------------------------------------------ 34 | // 35 | // This code was generated by Entitas.CodeGeneration.Plugins.ComponentMatcherApiGenerator. 36 | // 37 | // Changes to this file may cause incorrect behavior and will be lost if 38 | // the code is regenerated. 39 | // 40 | //------------------------------------------------------------------------------ 41 | public sealed partial class GameMatcher { 42 | 43 | static Entitas.IMatcher _matcherFSMReturn; 44 | 45 | public static Entitas.IMatcher FSMReturn { 46 | get { 47 | if (_matcherFSMReturn == null) { 48 | var matcher = (Entitas.Matcher)Entitas.Matcher.AllOf(GameComponentsLookup.FSMReturn); 49 | matcher.componentNames = GameComponentsLookup.componentNames; 50 | _matcherFSMReturn = matcher; 51 | } 52 | 53 | return _matcherFSMReturn; 54 | } 55 | } 56 | } 57 | -------------------------------------------------------------------------------- /Assets/Sources/Generated/Game/Components/GameFSMReturnComponent.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 7350f7fd6bc214467ae56c43dbe4d4f7 3 | timeCreated: 1533460197 4 | licenseType: Free 5 | MonoImporter: 6 | serializedVersion: 2 7 | defaultReferences: [] 8 | executionOrder: 0 9 | icon: {instanceID: 0} 10 | userData: 11 | assetBundleName: 12 | assetBundleVariant: 13 | -------------------------------------------------------------------------------- /Assets/Sources/Generated/Game/Components/GameFSMStackComponent.cs: -------------------------------------------------------------------------------- 1 | //------------------------------------------------------------------------------ 2 | // 3 | // This code was generated by Entitas.CodeGeneration.Plugins.ComponentEntityApiGenerator. 4 | // 5 | // Changes to this file may cause incorrect behavior and will be lost if 6 | // the code is regenerated. 7 | // 8 | //------------------------------------------------------------------------------ 9 | public partial class GameEntity { 10 | 11 | public FSMStackComponent fSMStack { get { return (FSMStackComponent)GetComponent(GameComponentsLookup.FSMStack); } } 12 | public bool hasFSMStack { get { return HasComponent(GameComponentsLookup.FSMStack); } } 13 | 14 | public void AddFSMStack(System.Collections.Generic.List newFsm_stack) { 15 | var index = GameComponentsLookup.FSMStack; 16 | var component = CreateComponent(index); 17 | component.fsm_stack = newFsm_stack; 18 | AddComponent(index, component); 19 | } 20 | 21 | public void ReplaceFSMStack(System.Collections.Generic.List newFsm_stack) { 22 | var index = GameComponentsLookup.FSMStack; 23 | var component = CreateComponent(index); 24 | component.fsm_stack = newFsm_stack; 25 | ReplaceComponent(index, component); 26 | } 27 | 28 | public void RemoveFSMStack() { 29 | RemoveComponent(GameComponentsLookup.FSMStack); 30 | } 31 | } 32 | 33 | //------------------------------------------------------------------------------ 34 | // 35 | // This code was generated by Entitas.CodeGeneration.Plugins.ComponentMatcherApiGenerator. 36 | // 37 | // Changes to this file may cause incorrect behavior and will be lost if 38 | // the code is regenerated. 39 | // 40 | //------------------------------------------------------------------------------ 41 | public sealed partial class GameMatcher { 42 | 43 | static Entitas.IMatcher _matcherFSMStack; 44 | 45 | public static Entitas.IMatcher FSMStack { 46 | get { 47 | if (_matcherFSMStack == null) { 48 | var matcher = (Entitas.Matcher)Entitas.Matcher.AllOf(GameComponentsLookup.FSMStack); 49 | matcher.componentNames = GameComponentsLookup.componentNames; 50 | _matcherFSMStack = matcher; 51 | } 52 | 53 | return _matcherFSMStack; 54 | } 55 | } 56 | } 57 | -------------------------------------------------------------------------------- /Assets/Sources/Generated/Game/Components/GameFSMStackComponent.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: aee8d52729f3346768688c3b7f932eca 3 | timeCreated: 1533460197 4 | licenseType: Free 5 | MonoImporter: 6 | serializedVersion: 2 7 | defaultReferences: [] 8 | executionOrder: 0 9 | icon: {instanceID: 0} 10 | userData: 11 | assetBundleName: 12 | assetBundleVariant: 13 | -------------------------------------------------------------------------------- /Assets/Sources/Generated/Game/Components/GameFSMStateComponent.cs: -------------------------------------------------------------------------------- 1 | //------------------------------------------------------------------------------ 2 | // 3 | // This code was generated by Entitas.CodeGeneration.Plugins.ComponentEntityApiGenerator. 4 | // 5 | // Changes to this file may cause incorrect behavior and will be lost if 6 | // the code is regenerated. 7 | // 8 | //------------------------------------------------------------------------------ 9 | public partial class GameEntity { 10 | 11 | public FSMStateComponent fSMState { get { return (FSMStateComponent)GetComponent(GameComponentsLookup.FSMState); } } 12 | public bool hasFSMState { get { return HasComponent(GameComponentsLookup.FSMState); } } 13 | 14 | public void AddFSMState(GAMESTATE newCurrent_state, GAMESTATE newPrevious_state) { 15 | var index = GameComponentsLookup.FSMState; 16 | var component = CreateComponent(index); 17 | component.current_state = newCurrent_state; 18 | component.previous_state = newPrevious_state; 19 | AddComponent(index, component); 20 | } 21 | 22 | public void ReplaceFSMState(GAMESTATE newCurrent_state, GAMESTATE newPrevious_state) { 23 | var index = GameComponentsLookup.FSMState; 24 | var component = CreateComponent(index); 25 | component.current_state = newCurrent_state; 26 | component.previous_state = newPrevious_state; 27 | ReplaceComponent(index, component); 28 | } 29 | 30 | public void RemoveFSMState() { 31 | RemoveComponent(GameComponentsLookup.FSMState); 32 | } 33 | } 34 | 35 | //------------------------------------------------------------------------------ 36 | // 37 | // This code was generated by Entitas.CodeGeneration.Plugins.ComponentMatcherApiGenerator. 38 | // 39 | // Changes to this file may cause incorrect behavior and will be lost if 40 | // the code is regenerated. 41 | // 42 | //------------------------------------------------------------------------------ 43 | public sealed partial class GameMatcher { 44 | 45 | static Entitas.IMatcher _matcherFSMState; 46 | 47 | public static Entitas.IMatcher FSMState { 48 | get { 49 | if (_matcherFSMState == null) { 50 | var matcher = (Entitas.Matcher)Entitas.Matcher.AllOf(GameComponentsLookup.FSMState); 51 | matcher.componentNames = GameComponentsLookup.componentNames; 52 | _matcherFSMState = matcher; 53 | } 54 | 55 | return _matcherFSMState; 56 | } 57 | } 58 | } 59 | -------------------------------------------------------------------------------- /Assets/Sources/Generated/Game/Components/GameFSMStateComponent.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 5831a356aabf443bbaf52a4cb34ab587 3 | timeCreated: 1533460197 4 | licenseType: Free 5 | MonoImporter: 6 | serializedVersion: 2 7 | defaultReferences: [] 8 | executionOrder: 0 9 | icon: {instanceID: 0} 10 | userData: 11 | assetBundleName: 12 | assetBundleVariant: 13 | -------------------------------------------------------------------------------- /Assets/Sources/Generated/Game/Components/GameFSMSwitchComponent.cs: -------------------------------------------------------------------------------- 1 | //------------------------------------------------------------------------------ 2 | // 3 | // This code was generated by Entitas.CodeGeneration.Plugins.ComponentEntityApiGenerator. 4 | // 5 | // Changes to this file may cause incorrect behavior and will be lost if 6 | // the code is regenerated. 7 | // 8 | //------------------------------------------------------------------------------ 9 | public partial class GameEntity { 10 | 11 | public FSMSwitchComponent fSMSwitch { get { return (FSMSwitchComponent)GetComponent(GameComponentsLookup.FSMSwitch); } } 12 | public bool hasFSMSwitch { get { return HasComponent(GameComponentsLookup.FSMSwitch); } } 13 | 14 | public void AddFSMSwitch(bool newStack, GAMESTATE newFrom_state, GAMESTATE newTo_state) { 15 | var index = GameComponentsLookup.FSMSwitch; 16 | var component = CreateComponent(index); 17 | component.stack = newStack; 18 | component.from_state = newFrom_state; 19 | component.to_state = newTo_state; 20 | AddComponent(index, component); 21 | } 22 | 23 | public void ReplaceFSMSwitch(bool newStack, GAMESTATE newFrom_state, GAMESTATE newTo_state) { 24 | var index = GameComponentsLookup.FSMSwitch; 25 | var component = CreateComponent(index); 26 | component.stack = newStack; 27 | component.from_state = newFrom_state; 28 | component.to_state = newTo_state; 29 | ReplaceComponent(index, component); 30 | } 31 | 32 | public void RemoveFSMSwitch() { 33 | RemoveComponent(GameComponentsLookup.FSMSwitch); 34 | } 35 | } 36 | 37 | //------------------------------------------------------------------------------ 38 | // 39 | // This code was generated by Entitas.CodeGeneration.Plugins.ComponentMatcherApiGenerator. 40 | // 41 | // Changes to this file may cause incorrect behavior and will be lost if 42 | // the code is regenerated. 43 | // 44 | //------------------------------------------------------------------------------ 45 | public sealed partial class GameMatcher { 46 | 47 | static Entitas.IMatcher _matcherFSMSwitch; 48 | 49 | public static Entitas.IMatcher FSMSwitch { 50 | get { 51 | if (_matcherFSMSwitch == null) { 52 | var matcher = (Entitas.Matcher)Entitas.Matcher.AllOf(GameComponentsLookup.FSMSwitch); 53 | matcher.componentNames = GameComponentsLookup.componentNames; 54 | _matcherFSMSwitch = matcher; 55 | } 56 | 57 | return _matcherFSMSwitch; 58 | } 59 | } 60 | } 61 | -------------------------------------------------------------------------------- /Assets/Sources/Generated/Game/Components/GameFSMSwitchComponent.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 33e291fd5693146a5a8ef6e8c05cba78 3 | timeCreated: 1533460197 4 | licenseType: Free 5 | MonoImporter: 6 | serializedVersion: 2 7 | defaultReferences: [] 8 | executionOrder: 0 9 | icon: {instanceID: 0} 10 | userData: 11 | assetBundleName: 12 | assetBundleVariant: 13 | -------------------------------------------------------------------------------- /Assets/Sources/Generated/Game/GameAttribute.cs: -------------------------------------------------------------------------------- 1 | //------------------------------------------------------------------------------ 2 | // 3 | // This code was generated by Entitas.CodeGeneration.Plugins.ContextAttributeGenerator. 4 | // 5 | // Changes to this file may cause incorrect behavior and will be lost if 6 | // the code is regenerated. 7 | // 8 | //------------------------------------------------------------------------------ 9 | public sealed class GameAttribute : Entitas.CodeGeneration.Attributes.ContextAttribute { 10 | 11 | public GameAttribute() : base("Game") { 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /Assets/Sources/Generated/Game/GameAttribute.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 6af5b6d8803c84a00afec5965a13e225 3 | timeCreated: 1533459972 4 | licenseType: Free 5 | MonoImporter: 6 | serializedVersion: 2 7 | defaultReferences: [] 8 | executionOrder: 0 9 | icon: {instanceID: 0} 10 | userData: 11 | assetBundleName: 12 | assetBundleVariant: 13 | -------------------------------------------------------------------------------- /Assets/Sources/Generated/Game/GameComponentsLookup.cs: -------------------------------------------------------------------------------- 1 | //------------------------------------------------------------------------------ 2 | // 3 | // This code was generated by Entitas.CodeGeneration.Plugins.ComponentLookupGenerator. 4 | // 5 | // Changes to this file may cause incorrect behavior and will be lost if 6 | // the code is regenerated. 7 | // 8 | //------------------------------------------------------------------------------ 9 | public static class GameComponentsLookup { 10 | 11 | public const int FSMAdapter = 0; 12 | public const int FSMContinue = 1; 13 | public const int FSMHold = 2; 14 | public const int FSMProcessingCnt = 3; 15 | public const int FSMProcessing = 4; 16 | public const int FSMProcessingListener = 5; 17 | public const int FSMReset = 6; 18 | public const int FSMReturn = 7; 19 | public const int FSMStack = 8; 20 | public const int FSMState = 9; 21 | public const int FSMSwitch = 10; 22 | 23 | public const int TotalComponents = 11; 24 | 25 | public static readonly string[] componentNames = { 26 | "FSMAdapter", 27 | "FSMContinue", 28 | "FSMHold", 29 | "FSMProcessingCnt", 30 | "FSMProcessing", 31 | "FSMProcessingListener", 32 | "FSMReset", 33 | "FSMReturn", 34 | "FSMStack", 35 | "FSMState", 36 | "FSMSwitch" 37 | }; 38 | 39 | public static readonly System.Type[] componentTypes = { 40 | typeof(FSMAdapterComponent), 41 | typeof(FSMContinueComponent), 42 | typeof(FSMHoldComponent), 43 | typeof(FSMProcessingCntComponent), 44 | typeof(FSMProcessingComponent), 45 | typeof(FSMProcessingListenerComponent), 46 | typeof(FSMResetComponent), 47 | typeof(FSMReturnComponent), 48 | typeof(FSMStackComponent), 49 | typeof(FSMStateComponent), 50 | typeof(FSMSwitchComponent) 51 | }; 52 | } 53 | -------------------------------------------------------------------------------- /Assets/Sources/Generated/Game/GameComponentsLookup.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: e206dc006563243b29ea6686aa34a8e9 3 | timeCreated: 1533459972 4 | licenseType: Free 5 | MonoImporter: 6 | serializedVersion: 2 7 | defaultReferences: [] 8 | executionOrder: 0 9 | icon: {instanceID: 0} 10 | userData: 11 | assetBundleName: 12 | assetBundleVariant: 13 | -------------------------------------------------------------------------------- /Assets/Sources/Generated/Game/GameContext.cs: -------------------------------------------------------------------------------- 1 | //------------------------------------------------------------------------------ 2 | // 3 | // This code was generated by Entitas.CodeGeneration.Plugins.ContextGenerator. 4 | // 5 | // Changes to this file may cause incorrect behavior and will be lost if 6 | // the code is regenerated. 7 | // 8 | //------------------------------------------------------------------------------ 9 | public sealed partial class GameContext : Entitas.Context { 10 | 11 | public GameContext() 12 | : base( 13 | GameComponentsLookup.TotalComponents, 14 | 0, 15 | new Entitas.ContextInfo( 16 | "Game", 17 | GameComponentsLookup.componentNames, 18 | GameComponentsLookup.componentTypes 19 | ), 20 | (entity) => 21 | 22 | #if (ENTITAS_FAST_AND_UNSAFE) 23 | new Entitas.UnsafeAERC() 24 | #else 25 | new Entitas.SafeAERC(entity) 26 | #endif 27 | 28 | ) { 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /Assets/Sources/Generated/Game/GameContext.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: ce38d2120b7124f7389d0fa0c3e168a1 3 | timeCreated: 1533459972 4 | licenseType: Free 5 | MonoImporter: 6 | serializedVersion: 2 7 | defaultReferences: [] 8 | executionOrder: 0 9 | icon: {instanceID: 0} 10 | userData: 11 | assetBundleName: 12 | assetBundleVariant: 13 | -------------------------------------------------------------------------------- /Assets/Sources/Generated/Game/GameEntity.cs: -------------------------------------------------------------------------------- 1 | //------------------------------------------------------------------------------ 2 | // 3 | // This code was generated by Entitas.CodeGeneration.Plugins.EntityGenerator. 4 | // 5 | // Changes to this file may cause incorrect behavior and will be lost if 6 | // the code is regenerated. 7 | // 8 | //------------------------------------------------------------------------------ 9 | public sealed partial class GameEntity : Entitas.Entity { 10 | } 11 | -------------------------------------------------------------------------------- /Assets/Sources/Generated/Game/GameEntity.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 8e7bba88b1df74009a71d95434522858 3 | timeCreated: 1533459972 4 | licenseType: Free 5 | MonoImporter: 6 | serializedVersion: 2 7 | defaultReferences: [] 8 | executionOrder: 0 9 | icon: {instanceID: 0} 10 | userData: 11 | assetBundleName: 12 | assetBundleVariant: 13 | -------------------------------------------------------------------------------- /Assets/Sources/Generated/Game/GameMatcher.cs: -------------------------------------------------------------------------------- 1 | //------------------------------------------------------------------------------ 2 | // 3 | // This code was generated by Entitas.CodeGeneration.Plugins.ContextMatcherGenerator. 4 | // 5 | // Changes to this file may cause incorrect behavior and will be lost if 6 | // the code is regenerated. 7 | // 8 | //------------------------------------------------------------------------------ 9 | public sealed partial class GameMatcher { 10 | 11 | public static Entitas.IAllOfMatcher AllOf(params int[] indices) { 12 | return Entitas.Matcher.AllOf(indices); 13 | } 14 | 15 | public static Entitas.IAllOfMatcher AllOf(params Entitas.IMatcher[] matchers) { 16 | return Entitas.Matcher.AllOf(matchers); 17 | } 18 | 19 | public static Entitas.IAnyOfMatcher AnyOf(params int[] indices) { 20 | return Entitas.Matcher.AnyOf(indices); 21 | } 22 | 23 | public static Entitas.IAnyOfMatcher AnyOf(params Entitas.IMatcher[] matchers) { 24 | return Entitas.Matcher.AnyOf(matchers); 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /Assets/Sources/Generated/Game/GameMatcher.cs.meta: -------------------------------------------------------------------------------- 1 | fileFormatVersion: 2 2 | guid: 058d78837ce32442ab312f975a5fb4c7 3 | timeCreated: 1533459972 4 | licenseType: Free 5 | MonoImporter: 6 | serializedVersion: 2 7 | defaultReferences: [] 8 | executionOrder: 0 9 | icon: {instanceID: 0} 10 | userData: 11 | assetBundleName: 12 | assetBundleVariant: 13 | -------------------------------------------------------------------------------- /FSMSystems.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AlexCCLin/Entitas-GameFSM/bac2c1a51820df70a2c4948e990a8cca47686c30/FSMSystems.png -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Entitas-GameFSM 2 | This is Game FSM package using Entitas 1.4.2 framework in Unity 3 | 4 | 5 | 在這個 Unity package下,我基於Entitas (ECS) 架構,實作了有限狀態機FSM 6 | 你可以視為是一個系統來處理遊戲中需要以FSM來描述行為的事 7 | 這個open project 將來會一直重複利用在未來幾個的遊戲計畫中 8 | 而每一個project 都會有unit-test的基本系統可以進行基本的測試驗證 9 | 10 | 11 | ## FSM 使用情境 12 | 1. 可以當整個遊戲的流程控制系統, 透過FSM狀態改變觸發事件進行場景切換,UI切換,進入遊戲,進入商店等流程控制 13 | 2. 可以當AI FSM, 可以設計成敵人的AI判斷,實作了 stack FSM, 可以設計功能強大一點的AI 14 | 3. 任何需要利用FSM流程控制的系統皆適用 15 | 16 | 17 | ## FSM 功能簡介 18 | 1. 實作一個FSM System, 可以透過FSMSwitchComponent轉換FSMStateComponent 裡的狀態 19 | 2. 支援FSM reset, 可以透過FSMResetComponent將FSM reset成初始狀態 20 | 3. 支援FSM Hold/Continue 功能,你可以透過FSMHoldComponent將FSM暫停,再用FSMContinueComponent繼續, 當FSM暫停時, 如果此時有FSMSwitchComponent進來,會暫停這個Component的觸發,一直到FSMContinueComponent出現才能繼續 21 | 4. 支援FSM Stack/Return 功能, 在FSMSwitchComponent中有stack 的bool flag,可以設定, FSM System會記下這的狀態 當產生FSMReturnComponent時,會跳回原來記下的狀態,此功能實作了 stack FSM 的功能 22 | 5. 支援 FSM event system, 當FSMSwitchComponent發生時,會觸發FSM event ,提供了 interface IFSMSwitchEventListener, 可接受FSM event 的監聽和OnFSMSwitch() 的實作 23 | 24 | ## FSM 系統介紹 25 | 26 | ![Image](https://github.com/AlexCCLin/Entitas-GameFSM/blob/master/FSMSystems.png) 27 | 28 | 29 | FSMUniTestSystem 30 | FSMSwitchService 31 | FSMHoldSystem 32 | FSMReturnSystem 33 | FSMSwitchStstem 34 | FSMResetSystem 35 | FSMAdapterService 36 | FSMAdapterSystem 37 | FSMProcessingSystem 38 | FSMProcessingEventSystem 39 | 40 | --------------------------------------------------------------------------------