mirror of
https://github.com/unity-atoms/unity-atoms.git
synced 2025-01-21 23:58:49 -05:00
Squashed commit of the following:
commit 847eff037204d841546c0da772d2f341f9cf1e25 Author: Adam Ramberg <andersson.adam.89@gmail.com> Date: Sun Mar 17 22:09:38 2019 +0100 #17 - Serializable not needed for ScriptableObject commit 593b275e6394b9d589de8a7a20375145dfc4aa84 Author: Adam Ramberg <andersson.adam.89@gmail.com> Date: Sun Mar 17 21:59:33 2019 +0100 18 - IGameEvent<T1, T2> RegisterListener commit 40443ce9bd4b1c339aaf19cfcb119f2336608dae Author: Adam Ramberg <andersson.adam.89@gmail.com> Date: Fri Mar 8 16:35:04 2019 +0100 Remove some more warnings commit bd453110ac51a6ebe3d54368fcb039bdbe52e278 Author: Adam Ramberg <andersson.adam.89@gmail.com> Date: Fri Mar 8 16:33:30 2019 +0100 Update README commit 90977b853a047c84efb5311768a09f4e8a1165b2 Author: Adam Ramberg <andersson.adam.89@gmail.com> Date: Fri Mar 8 16:31:45 2019 +0100 Initialize to null to get rid off warnings commit 38b7f5c4ede195aa7198f567801c9cbeedc9b6f6 Author: Adam Ramberg <andersson.adam.89@gmail.com> Date: Fri Mar 8 16:15:53 2019 +0100 More fixes to enable local unity project commit 404e1cbf88ed4431c61d3ece074e838e74ac5141 Author: Adam Ramberg <andersson.adam.89@gmail.com> Date: Fri Mar 8 16:12:37 2019 +0100 Remove duplicated asmdef commit 5734300684e8a16553f213157cad1b4722b7cb7f Author: Adam Ramberg <andersson.adam.89@gmail.com> Date: Fri Mar 8 16:09:46 2019 +0100 Change files to include commit d1e42b119a6bc1577b1792459fa298e063652337 Author: Adam Ramberg <andersson.adam.89@gmail.com> Date: Fri Mar 8 16:05:56 2019 +0100 Added root package json commit 1709a0347147d74460f653182bbaf8d15eb6154e Author: Adam Ramberg <andersson.adam.89@gmail.com> Date: Fri Mar 8 15:30:44 2019 +0100 #16 - Add test and examples Unity project commit a3ea1a133bf6727e011ba85c64569db45302e487 Author: Adam Ramberg <andersson.adam.89@gmail.com> Date: Fri Mar 8 13:12:02 2019 +0100 #13 - Make usage of UPM (package manager) commit 492a30e905f6cf3f5899cb7080ef2bda73110f00 Author: Adam Ramberg <andersson.adam.89@gmail.com> Date: Fri Mar 8 11:28:56 2019 +0100 Added extensions + code formatting fixes commit 709949a1016c236cfd363cf25392fedfd8d083ca Author: Oliver Biwer <soraphis@users.noreply.github.com> Date: Fri Mar 8 10:16:45 2019 +0100 More AtomicTags changes (#15) * - added assembly defintions, and unit tests - improved AtomicTags in regards of #8, #9 and #10 * Fixes #11 - Added Equality Members (inclusive HashCode) for ScriptableObjectVariableBase * removed Rider Plugins from git * Further AtomicTag optimization commit ae6584c879f182e727fe0a8d0aff4b0715829914 Author: Adam Ramberg <andersson.adam.89@gmail.com> Date: Fri Mar 8 10:08:36 2019 +0100 Editor config commit 197d7067608600e4e2d13dc42db909ee8f8c75df Author: Adam Ramberg <andersson.adam.89@gmail.com> Date: Fri Mar 8 09:23:12 2019 +0100 Added editor config file commit53d6adc07b
Author: Oliver Biwer <soraphis@users.noreply.github.com> Date: Tue Mar 5 22:57:47 2019 +0100 More efficient AtomicTags (#12) * - added assembly defintions, and unit tests - improved AtomicTags in regards of #8, #9 and #10 * Fixes #11 - Added Equality Members (inclusive HashCode) for ScriptableObjectVariableBase * removed Rider Plugins from git commit81209d83b5
Author: Adam Ramberg <andersson.adam.89@gmail.com> Date: Wed Dec 12 20:54:17 2018 +0100 Added MonoHooks + ColliderType + bug fixes commitc6b240cebb
Author: Adam Ramberg <andersson.adam.89@gmail.com> Date: Sat Dec 1 00:23:10 2018 +0100 Experimenting with adding UI state management commitdfd70a8944
Author: Adam Ramberg <andersson.adam.89@gmail.com> Date: Fri Nov 30 23:10:21 2018 +0100 Issue #6 - AtomicTags commit8907763227
Author: Adam Ramberg <andersson.adam.89@gmail.com> Date: Fri Nov 30 22:42:29 2018 +0100 First commit of v1.0.0
This commit is contained in:
parent
c5733ca7b6
commit
bdf81a5e9c
16
.editorconfig
Normal file
16
.editorconfig
Normal file
@ -0,0 +1,16 @@
|
||||
root = true
|
||||
|
||||
[*]
|
||||
indent_style = space
|
||||
indent_size = 4
|
||||
end_of_line = lf
|
||||
charset = utf-8
|
||||
trim_trailing_whitespace = true
|
||||
insert_final_newline = true
|
||||
|
||||
[*.md]
|
||||
trim_trailing_whitespace = false
|
||||
|
||||
[*.json]
|
||||
trim_trailing_whitespace = false
|
||||
insert_final_newline = false
|
3
.gitignore
vendored
3
.gitignore
vendored
@ -7,6 +7,9 @@
|
||||
|
||||
# Visual Studio 2015 cache directory
|
||||
/.vs/
|
||||
/.idea/
|
||||
|
||||
/Assets/Plugins/Editor/JetBrains*
|
||||
|
||||
# Autogenerated VS/MD/Consulo solution and project files
|
||||
ExportedObj/
|
||||
|
@ -1,9 +0,0 @@
|
||||
using UnityEngine;
|
||||
|
||||
namespace UnityAtoms
|
||||
{
|
||||
[CreateAssetMenu(menuName = "Unity Atoms/Constants/Bool", fileName = "BoolConstant", order = 2)]
|
||||
public class BoolConstant : ScriptableObjectVariableBase<bool>
|
||||
{
|
||||
}
|
||||
}
|
@ -1,9 +0,0 @@
|
||||
using UnityEngine;
|
||||
|
||||
namespace UnityAtoms
|
||||
{
|
||||
[CreateAssetMenu(menuName = "Unity Atoms/Constants/Color", fileName = "ColorConstant", order = 4)]
|
||||
public class ColorConstant : ScriptableObjectVariableBase<Color>
|
||||
{
|
||||
}
|
||||
}
|
@ -1,9 +0,0 @@
|
||||
using UnityEngine;
|
||||
|
||||
namespace UnityAtoms
|
||||
{
|
||||
[CreateAssetMenu(menuName = "Unity Atoms/Constants/Float", fileName = "FloatConstant", order = 1)]
|
||||
public class FloatConstant : ScriptableObjectVariableBase<float>
|
||||
{
|
||||
}
|
||||
}
|
@ -1,9 +0,0 @@
|
||||
using UnityEngine;
|
||||
|
||||
namespace UnityAtoms
|
||||
{
|
||||
[CreateAssetMenu(menuName = "Unity Atoms/Constants/Int", fileName = "IntConstant", order = 0)]
|
||||
public class IntConstant : ScriptableObjectVariableBase<int>
|
||||
{
|
||||
}
|
||||
}
|
@ -1,9 +0,0 @@
|
||||
using UnityEngine;
|
||||
|
||||
namespace UnityAtoms
|
||||
{
|
||||
[CreateAssetMenu(menuName = "Unity Atoms/Constants/String", fileName = "StringConstant", order = 3)]
|
||||
public class StringConstant : ScriptableObjectVariableBase<string>
|
||||
{
|
||||
}
|
||||
}
|
@ -1,9 +0,0 @@
|
||||
using UnityEngine;
|
||||
|
||||
namespace UnityAtoms
|
||||
{
|
||||
[CreateAssetMenu(menuName = "Unity Atoms/Constants/Vector2", fileName = "Vector2Constant", order = 5)]
|
||||
public class Vector2Constant : ScriptableObjectVariableBase<Vector2>
|
||||
{
|
||||
}
|
||||
}
|
@ -1,9 +0,0 @@
|
||||
using UnityEngine;
|
||||
|
||||
namespace UnityAtoms
|
||||
{
|
||||
[CreateAssetMenu(menuName = "Unity Atoms/Constants/Vector3", fileName = "Vector3Constant", order = 6)]
|
||||
public class Vector3Constant : ScriptableObjectVariableBase<Vector3>
|
||||
{
|
||||
}
|
||||
}
|
@ -1,723 +0,0 @@
|
||||
%YAML 1.1
|
||||
%TAG !u! tag:unity3d.com,2011:
|
||||
--- !u!29 &1
|
||||
OcclusionCullingSettings:
|
||||
m_ObjectHideFlags: 0
|
||||
serializedVersion: 2
|
||||
m_OcclusionBakeSettings:
|
||||
smallestOccluder: 5
|
||||
smallestHole: 0.25
|
||||
backfaceThreshold: 100
|
||||
m_SceneGUID: 00000000000000000000000000000000
|
||||
m_OcclusionCullingData: {fileID: 0}
|
||||
--- !u!104 &2
|
||||
RenderSettings:
|
||||
m_ObjectHideFlags: 0
|
||||
serializedVersion: 9
|
||||
m_Fog: 0
|
||||
m_FogColor: {r: 0.5, g: 0.5, b: 0.5, a: 1}
|
||||
m_FogMode: 3
|
||||
m_FogDensity: 0.01
|
||||
m_LinearFogStart: 0
|
||||
m_LinearFogEnd: 300
|
||||
m_AmbientSkyColor: {r: 0.212, g: 0.227, b: 0.259, a: 1}
|
||||
m_AmbientEquatorColor: {r: 0.114, g: 0.125, b: 0.133, a: 1}
|
||||
m_AmbientGroundColor: {r: 0.047, g: 0.043, b: 0.035, a: 1}
|
||||
m_AmbientIntensity: 1
|
||||
m_AmbientMode: 3
|
||||
m_SubtractiveShadowColor: {r: 0.42, g: 0.478, b: 0.627, a: 1}
|
||||
m_SkyboxMaterial: {fileID: 0}
|
||||
m_HaloStrength: 0.5
|
||||
m_FlareStrength: 1
|
||||
m_FlareFadeSpeed: 3
|
||||
m_HaloTexture: {fileID: 0}
|
||||
m_SpotCookie: {fileID: 10001, guid: 0000000000000000e000000000000000, type: 0}
|
||||
m_DefaultReflectionMode: 0
|
||||
m_DefaultReflectionResolution: 128
|
||||
m_ReflectionBounces: 1
|
||||
m_ReflectionIntensity: 1
|
||||
m_CustomReflection: {fileID: 0}
|
||||
m_Sun: {fileID: 0}
|
||||
m_IndirectSpecularColor: {r: 0, g: 0, b: 0, a: 1}
|
||||
m_UseRadianceAmbientProbe: 0
|
||||
--- !u!157 &3
|
||||
LightmapSettings:
|
||||
m_ObjectHideFlags: 0
|
||||
serializedVersion: 11
|
||||
m_GIWorkflowMode: 1
|
||||
m_GISettings:
|
||||
serializedVersion: 2
|
||||
m_BounceScale: 1
|
||||
m_IndirectOutputScale: 1
|
||||
m_AlbedoBoost: 1
|
||||
m_TemporalCoherenceThreshold: 1
|
||||
m_EnvironmentLightingMode: 0
|
||||
m_EnableBakedLightmaps: 0
|
||||
m_EnableRealtimeLightmaps: 0
|
||||
m_LightmapEditorSettings:
|
||||
serializedVersion: 10
|
||||
m_Resolution: 2
|
||||
m_BakeResolution: 40
|
||||
m_AtlasSize: 1024
|
||||
m_AO: 0
|
||||
m_AOMaxDistance: 1
|
||||
m_CompAOExponent: 1
|
||||
m_CompAOExponentDirect: 0
|
||||
m_Padding: 2
|
||||
m_LightmapParameters: {fileID: 0}
|
||||
m_LightmapsBakeMode: 1
|
||||
m_TextureCompression: 1
|
||||
m_FinalGather: 0
|
||||
m_FinalGatherFiltering: 1
|
||||
m_FinalGatherRayCount: 256
|
||||
m_ReflectionCompression: 2
|
||||
m_MixedBakeMode: 2
|
||||
m_BakeBackend: 0
|
||||
m_PVRSampling: 1
|
||||
m_PVRDirectSampleCount: 32
|
||||
m_PVRSampleCount: 500
|
||||
m_PVRBounces: 2
|
||||
m_PVRFilterTypeDirect: 0
|
||||
m_PVRFilterTypeIndirect: 0
|
||||
m_PVRFilterTypeAO: 0
|
||||
m_PVRFilteringMode: 1
|
||||
m_PVRCulling: 1
|
||||
m_PVRFilteringGaussRadiusDirect: 1
|
||||
m_PVRFilteringGaussRadiusIndirect: 5
|
||||
m_PVRFilteringGaussRadiusAO: 2
|
||||
m_PVRFilteringAtrousPositionSigmaDirect: 0.5
|
||||
m_PVRFilteringAtrousPositionSigmaIndirect: 2
|
||||
m_PVRFilteringAtrousPositionSigmaAO: 1
|
||||
m_ShowResolutionOverlay: 1
|
||||
m_LightingDataAsset: {fileID: 0}
|
||||
m_UseShadowmask: 1
|
||||
--- !u!196 &4
|
||||
NavMeshSettings:
|
||||
serializedVersion: 2
|
||||
m_ObjectHideFlags: 0
|
||||
m_BuildSettings:
|
||||
serializedVersion: 2
|
||||
agentTypeID: 0
|
||||
agentRadius: 0.5
|
||||
agentHeight: 2
|
||||
agentSlope: 45
|
||||
agentClimb: 0.4
|
||||
ledgeDropHeight: 0
|
||||
maxJumpAcrossDistance: 0
|
||||
minRegionArea: 2
|
||||
manualCellSize: 0
|
||||
cellSize: 0.16666667
|
||||
manualTileSize: 0
|
||||
tileSize: 256
|
||||
accuratePlacement: 0
|
||||
debug:
|
||||
m_Flags: 0
|
||||
m_NavMeshData: {fileID: 0}
|
||||
--- !u!1 &145633446
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInternal: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 145633447}
|
||||
- component: {fileID: 145633450}
|
||||
- component: {fileID: 145633449}
|
||||
- component: {fileID: 145633448}
|
||||
m_Layer: 5
|
||||
m_Name: HealthBar
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!224 &145633447
|
||||
RectTransform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInternal: {fileID: 0}
|
||||
m_GameObject: {fileID: 145633446}
|
||||
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
|
||||
m_LocalPosition: {x: 0, y: 0, z: 0}
|
||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||
m_Children: []
|
||||
m_Father: {fileID: 1244410474}
|
||||
m_RootOrder: 0
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
m_AnchorMin: {x: 0, y: 1}
|
||||
m_AnchorMax: {x: 0, y: 1}
|
||||
m_AnchoredPosition: {x: 60, y: -20}
|
||||
m_SizeDelta: {x: 100, y: 20}
|
||||
m_Pivot: {x: 0.5, y: 0.5}
|
||||
--- !u!114 &145633448
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInternal: {fileID: 0}
|
||||
m_GameObject: {fileID: 145633446}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: 735df585b0f8f48d1bac1ee2a282d5c1, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
MaxHealth: {fileID: 11400000, guid: 2f9770eeac092421e9baaf44c1855c4a, type: 2}
|
||||
--- !u!114 &145633449
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInternal: {fileID: 0}
|
||||
m_GameObject: {fileID: 145633446}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: -765806418, guid: f70555f144d8491a825f0804e09c671c, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
m_Material: {fileID: 0}
|
||||
m_Color: {r: 0.6132076, g: 0, b: 0, a: 1}
|
||||
m_RaycastTarget: 1
|
||||
m_OnCullStateChanged:
|
||||
m_PersistentCalls:
|
||||
m_Calls: []
|
||||
m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI,
|
||||
Version=1.0.0.0, Culture=neutral, PublicKeyToken=null
|
||||
m_Sprite: {fileID: 21300000, guid: ca71068637cec4e8fa7c6e9f8940c066, type: 3}
|
||||
m_Type: 3
|
||||
m_PreserveAspect: 0
|
||||
m_FillCenter: 1
|
||||
m_FillMethod: 0
|
||||
m_FillAmount: 1
|
||||
m_FillClockwise: 1
|
||||
m_FillOrigin: 0
|
||||
--- !u!222 &145633450
|
||||
CanvasRenderer:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInternal: {fileID: 0}
|
||||
m_GameObject: {fileID: 145633446}
|
||||
m_CullTransparentMesh: 0
|
||||
--- !u!1001 &346110327
|
||||
Prefab:
|
||||
m_ObjectHideFlags: 0
|
||||
serializedVersion: 2
|
||||
m_Modification:
|
||||
m_TransformParent: {fileID: 0}
|
||||
m_Modifications:
|
||||
- target: {fileID: 4325993638842916, guid: 3d318425ce2be41d0aafdee4b3520b8a, type: 2}
|
||||
propertyPath: m_LocalPosition.x
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 4325993638842916, guid: 3d318425ce2be41d0aafdee4b3520b8a, type: 2}
|
||||
propertyPath: m_LocalPosition.y
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 4325993638842916, guid: 3d318425ce2be41d0aafdee4b3520b8a, type: 2}
|
||||
propertyPath: m_LocalPosition.z
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 4325993638842916, guid: 3d318425ce2be41d0aafdee4b3520b8a, type: 2}
|
||||
propertyPath: m_LocalRotation.x
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 4325993638842916, guid: 3d318425ce2be41d0aafdee4b3520b8a, type: 2}
|
||||
propertyPath: m_LocalRotation.y
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 4325993638842916, guid: 3d318425ce2be41d0aafdee4b3520b8a, type: 2}
|
||||
propertyPath: m_LocalRotation.z
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 4325993638842916, guid: 3d318425ce2be41d0aafdee4b3520b8a, type: 2}
|
||||
propertyPath: m_LocalRotation.w
|
||||
value: 1
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 4325993638842916, guid: 3d318425ce2be41d0aafdee4b3520b8a, type: 2}
|
||||
propertyPath: m_RootOrder
|
||||
value: 5
|
||||
objectReference: {fileID: 0}
|
||||
m_RemovedComponents: []
|
||||
m_SourcePrefab: {fileID: 100100000, guid: 3d318425ce2be41d0aafdee4b3520b8a, type: 2}
|
||||
m_IsPrefabAsset: 0
|
||||
--- !u!1001 &475590110
|
||||
Prefab:
|
||||
m_ObjectHideFlags: 0
|
||||
serializedVersion: 2
|
||||
m_Modification:
|
||||
m_TransformParent: {fileID: 0}
|
||||
m_Modifications:
|
||||
- target: {fileID: 4748691630159618, guid: 9cab105cfb93a49c3ad899cee2e3dd5e, type: 2}
|
||||
propertyPath: m_LocalPosition.x
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 4748691630159618, guid: 9cab105cfb93a49c3ad899cee2e3dd5e, type: 2}
|
||||
propertyPath: m_LocalPosition.y
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 4748691630159618, guid: 9cab105cfb93a49c3ad899cee2e3dd5e, type: 2}
|
||||
propertyPath: m_LocalPosition.z
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 4748691630159618, guid: 9cab105cfb93a49c3ad899cee2e3dd5e, type: 2}
|
||||
propertyPath: m_LocalRotation.x
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 4748691630159618, guid: 9cab105cfb93a49c3ad899cee2e3dd5e, type: 2}
|
||||
propertyPath: m_LocalRotation.y
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 4748691630159618, guid: 9cab105cfb93a49c3ad899cee2e3dd5e, type: 2}
|
||||
propertyPath: m_LocalRotation.z
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 4748691630159618, guid: 9cab105cfb93a49c3ad899cee2e3dd5e, type: 2}
|
||||
propertyPath: m_LocalRotation.w
|
||||
value: 1
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 4748691630159618, guid: 9cab105cfb93a49c3ad899cee2e3dd5e, type: 2}
|
||||
propertyPath: m_RootOrder
|
||||
value: 4
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 114212381404589792, guid: 9cab105cfb93a49c3ad899cee2e3dd5e,
|
||||
type: 2}
|
||||
propertyPath: UnityEventResponse.m_PersistentCalls.m_Calls.Array.data[0].m_Target
|
||||
value:
|
||||
objectReference: {fileID: 145633448}
|
||||
m_RemovedComponents: []
|
||||
m_SourcePrefab: {fileID: 100100000, guid: 9cab105cfb93a49c3ad899cee2e3dd5e, type: 2}
|
||||
m_IsPrefabAsset: 0
|
||||
--- !u!1 &519420028
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInternal: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 519420032}
|
||||
- component: {fileID: 519420031}
|
||||
- component: {fileID: 519420029}
|
||||
m_Layer: 0
|
||||
m_Name: Main Camera
|
||||
m_TagString: MainCamera
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!81 &519420029
|
||||
AudioListener:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInternal: {fileID: 0}
|
||||
m_GameObject: {fileID: 519420028}
|
||||
m_Enabled: 1
|
||||
--- !u!20 &519420031
|
||||
Camera:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInternal: {fileID: 0}
|
||||
m_GameObject: {fileID: 519420028}
|
||||
m_Enabled: 1
|
||||
serializedVersion: 2
|
||||
m_ClearFlags: 2
|
||||
m_BackGroundColor: {r: 0.38625848, g: 0.5283019, b: 0.49624482, a: 0}
|
||||
m_projectionMatrixMode: 1
|
||||
m_SensorSize: {x: 36, y: 24}
|
||||
m_LensShift: {x: 0, y: 0}
|
||||
m_FocalLength: 50
|
||||
m_NormalizedViewPortRect:
|
||||
serializedVersion: 2
|
||||
x: 0
|
||||
y: 0
|
||||
width: 1
|
||||
height: 1
|
||||
near clip plane: 0.3
|
||||
far clip plane: 1000
|
||||
field of view: 60
|
||||
orthographic: 1
|
||||
orthographic size: 5
|
||||
m_Depth: -1
|
||||
m_CullingMask:
|
||||
serializedVersion: 2
|
||||
m_Bits: 4294967295
|
||||
m_RenderingPath: -1
|
||||
m_TargetTexture: {fileID: 0}
|
||||
m_TargetDisplay: 0
|
||||
m_TargetEye: 0
|
||||
m_HDR: 1
|
||||
m_AllowMSAA: 0
|
||||
m_AllowDynamicResolution: 0
|
||||
m_ForceIntoRT: 0
|
||||
m_OcclusionCulling: 0
|
||||
m_StereoConvergence: 10
|
||||
m_StereoSeparation: 0.022
|
||||
--- !u!4 &519420032
|
||||
Transform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInternal: {fileID: 0}
|
||||
m_GameObject: {fileID: 519420028}
|
||||
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
|
||||
m_LocalPosition: {x: 0, y: 0, z: -10}
|
||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||
m_Children: []
|
||||
m_Father: {fileID: 0}
|
||||
m_RootOrder: 0
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
--- !u!1 &854994178
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInternal: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 854994180}
|
||||
- component: {fileID: 854994181}
|
||||
- component: {fileID: 854994183}
|
||||
- component: {fileID: 854994182}
|
||||
- component: {fileID: 854994179}
|
||||
- component: {fileID: 854994184}
|
||||
m_Layer: 0
|
||||
m_Name: Player
|
||||
m_TagString: Player
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!114 &854994179
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInternal: {fileID: 0}
|
||||
m_GameObject: {fileID: 854994178}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: 66910caffeb0c4be695e51147ed1d9fa, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
Health: {fileID: 11400000, guid: ddc5fdadda50b4c0698b0ba7e9f9e746, type: 2}
|
||||
--- !u!4 &854994180
|
||||
Transform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInternal: {fileID: 0}
|
||||
m_GameObject: {fileID: 854994178}
|
||||
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
|
||||
m_LocalPosition: {x: 0, y: 0, z: 0}
|
||||
m_LocalScale: {x: 0.5, y: 0.5, z: 0.5}
|
||||
m_Children: []
|
||||
m_Father: {fileID: 0}
|
||||
m_RootOrder: 1
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
--- !u!212 &854994181
|
||||
SpriteRenderer:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInternal: {fileID: 0}
|
||||
m_GameObject: {fileID: 854994178}
|
||||
m_Enabled: 1
|
||||
m_CastShadows: 0
|
||||
m_ReceiveShadows: 0
|
||||
m_DynamicOccludee: 1
|
||||
m_MotionVectors: 1
|
||||
m_LightProbeUsage: 1
|
||||
m_ReflectionProbeUsage: 1
|
||||
m_RenderingLayerMask: 4294967295
|
||||
m_Materials:
|
||||
- {fileID: 10754, guid: 0000000000000000f000000000000000, type: 0}
|
||||
m_StaticBatchInfo:
|
||||
firstSubMesh: 0
|
||||
subMeshCount: 0
|
||||
m_StaticBatchRoot: {fileID: 0}
|
||||
m_ProbeAnchor: {fileID: 0}
|
||||
m_LightProbeVolumeOverride: {fileID: 0}
|
||||
m_ScaleInLightmap: 1
|
||||
m_PreserveUVs: 0
|
||||
m_IgnoreNormalsForChartDetection: 0
|
||||
m_ImportantGI: 0
|
||||
m_StitchLightmapSeams: 0
|
||||
m_SelectedEditorRenderState: 0
|
||||
m_MinimumChartSize: 4
|
||||
m_AutoUVMaxDistance: 0.5
|
||||
m_AutoUVMaxAngle: 89
|
||||
m_LightmapParameters: {fileID: 0}
|
||||
m_SortingLayerID: 0
|
||||
m_SortingLayer: 0
|
||||
m_SortingOrder: 0
|
||||
m_Sprite: {fileID: 21300000, guid: ca71068637cec4e8fa7c6e9f8940c066, type: 3}
|
||||
m_Color: {r: 1, g: 1, b: 1, a: 1}
|
||||
m_FlipX: 0
|
||||
m_FlipY: 0
|
||||
m_DrawMode: 0
|
||||
m_Size: {x: 1, y: 1}
|
||||
m_AdaptiveModeThreshold: 0.5
|
||||
m_SpriteTileMode: 0
|
||||
m_WasSpriteAssigned: 1
|
||||
m_MaskInteraction: 0
|
||||
m_SpriteSortPoint: 0
|
||||
--- !u!61 &854994182
|
||||
BoxCollider2D:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInternal: {fileID: 0}
|
||||
m_GameObject: {fileID: 854994178}
|
||||
m_Enabled: 1
|
||||
m_Density: 1
|
||||
m_Material: {fileID: 0}
|
||||
m_IsTrigger: 0
|
||||
m_UsedByEffector: 0
|
||||
m_UsedByComposite: 0
|
||||
m_Offset: {x: 0, y: 0}
|
||||
m_SpriteTilingProperty:
|
||||
border: {x: 0, y: 0, z: 0, w: 0}
|
||||
pivot: {x: 0.5, y: 0.5}
|
||||
oldSize: {x: 1, y: 1}
|
||||
newSize: {x: 1, y: 1}
|
||||
adaptiveTilingThreshold: 0.5
|
||||
drawMode: 0
|
||||
adaptiveTiling: 0
|
||||
m_AutoTiling: 0
|
||||
serializedVersion: 2
|
||||
m_Size: {x: 1, y: 1}
|
||||
m_EdgeRadius: 0
|
||||
--- !u!50 &854994183
|
||||
Rigidbody2D:
|
||||
serializedVersion: 4
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInternal: {fileID: 0}
|
||||
m_GameObject: {fileID: 854994178}
|
||||
m_BodyType: 1
|
||||
m_Simulated: 1
|
||||
m_UseFullKinematicContacts: 0
|
||||
m_UseAutoMass: 0
|
||||
m_Mass: 1
|
||||
m_LinearDrag: 0
|
||||
m_AngularDrag: 0.05
|
||||
m_GravityScale: 1
|
||||
m_Material: {fileID: 0}
|
||||
m_Interpolate: 0
|
||||
m_SleepingMode: 1
|
||||
m_CollisionDetection: 0
|
||||
m_Constraints: 0
|
||||
--- !u!114 &854994184
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInternal: {fileID: 0}
|
||||
m_GameObject: {fileID: 854994178}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: b994f74f11b564875b8eb8c828ed594e, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
--- !u!1 &1067648696
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInternal: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 1067648699}
|
||||
- component: {fileID: 1067648698}
|
||||
- component: {fileID: 1067648697}
|
||||
m_Layer: 0
|
||||
m_Name: EventSystem
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!114 &1067648697
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInternal: {fileID: 0}
|
||||
m_GameObject: {fileID: 1067648696}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 1077351063, guid: f70555f144d8491a825f0804e09c671c, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
m_HorizontalAxis: Horizontal
|
||||
m_VerticalAxis: Vertical
|
||||
m_SubmitButton: Submit
|
||||
m_CancelButton: Cancel
|
||||
m_InputActionsPerSecond: 10
|
||||
m_RepeatDelay: 0.5
|
||||
m_ForceModuleActive: 0
|
||||
--- !u!114 &1067648698
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInternal: {fileID: 0}
|
||||
m_GameObject: {fileID: 1067648696}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: -619905303, guid: f70555f144d8491a825f0804e09c671c, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
m_FirstSelected: {fileID: 0}
|
||||
m_sendNavigationEvents: 1
|
||||
m_DragThreshold: 10
|
||||
--- !u!4 &1067648699
|
||||
Transform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInternal: {fileID: 0}
|
||||
m_GameObject: {fileID: 1067648696}
|
||||
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
|
||||
m_LocalPosition: {x: 0, y: 0, z: 0}
|
||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||
m_Children: []
|
||||
m_Father: {fileID: 0}
|
||||
m_RootOrder: 3
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
--- !u!1 &1244410470
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInternal: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 1244410474}
|
||||
- component: {fileID: 1244410473}
|
||||
- component: {fileID: 1244410472}
|
||||
- component: {fileID: 1244410471}
|
||||
m_Layer: 5
|
||||
m_Name: Canvas
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!114 &1244410471
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInternal: {fileID: 0}
|
||||
m_GameObject: {fileID: 1244410470}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 1301386320, guid: f70555f144d8491a825f0804e09c671c, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
m_IgnoreReversedGraphics: 1
|
||||
m_BlockingObjects: 0
|
||||
m_BlockingMask:
|
||||
serializedVersion: 2
|
||||
m_Bits: 4294967295
|
||||
--- !u!114 &1244410472
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInternal: {fileID: 0}
|
||||
m_GameObject: {fileID: 1244410470}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 1980459831, guid: f70555f144d8491a825f0804e09c671c, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
m_UiScaleMode: 0
|
||||
m_ReferencePixelsPerUnit: 100
|
||||
m_ScaleFactor: 1
|
||||
m_ReferenceResolution: {x: 800, y: 600}
|
||||
m_ScreenMatchMode: 0
|
||||
m_MatchWidthOrHeight: 0
|
||||
m_PhysicalUnit: 3
|
||||
m_FallbackScreenDPI: 96
|
||||
m_DefaultSpriteDPI: 96
|
||||
m_DynamicPixelsPerUnit: 1
|
||||
--- !u!223 &1244410473
|
||||
Canvas:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInternal: {fileID: 0}
|
||||
m_GameObject: {fileID: 1244410470}
|
||||
m_Enabled: 1
|
||||
serializedVersion: 3
|
||||
m_RenderMode: 0
|
||||
m_Camera: {fileID: 0}
|
||||
m_PlaneDistance: 100
|
||||
m_PixelPerfect: 0
|
||||
m_ReceivesEvents: 1
|
||||
m_OverrideSorting: 0
|
||||
m_OverridePixelPerfect: 0
|
||||
m_SortingBucketNormalizedSize: 0
|
||||
m_AdditionalShaderChannelsFlag: 0
|
||||
m_SortingLayerID: 0
|
||||
m_SortingOrder: 0
|
||||
m_TargetDisplay: 0
|
||||
--- !u!224 &1244410474
|
||||
RectTransform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInternal: {fileID: 0}
|
||||
m_GameObject: {fileID: 1244410470}
|
||||
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
|
||||
m_LocalPosition: {x: 0, y: 0, z: 0}
|
||||
m_LocalScale: {x: 0, y: 0, z: 0}
|
||||
m_Children:
|
||||
- {fileID: 145633447}
|
||||
m_Father: {fileID: 0}
|
||||
m_RootOrder: 2
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
m_AnchorMin: {x: 0, y: 0}
|
||||
m_AnchorMax: {x: 0, y: 0}
|
||||
m_AnchoredPosition: {x: 0, y: 0}
|
||||
m_SizeDelta: {x: 0, y: 0}
|
||||
m_Pivot: {x: 0, y: 0}
|
||||
--- !u!1001 &1433015640
|
||||
Prefab:
|
||||
m_ObjectHideFlags: 0
|
||||
serializedVersion: 2
|
||||
m_Modification:
|
||||
m_TransformParent: {fileID: 0}
|
||||
m_Modifications:
|
||||
- target: {fileID: 4014875790597442, guid: d53b0d84c22b5424cae4a9b272042504, type: 2}
|
||||
propertyPath: m_LocalPosition.x
|
||||
value: 2.535
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 4014875790597442, guid: d53b0d84c22b5424cae4a9b272042504, type: 2}
|
||||
propertyPath: m_LocalPosition.y
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 4014875790597442, guid: d53b0d84c22b5424cae4a9b272042504, type: 2}
|
||||
propertyPath: m_LocalPosition.z
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 4014875790597442, guid: d53b0d84c22b5424cae4a9b272042504, type: 2}
|
||||
propertyPath: m_LocalRotation.x
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 4014875790597442, guid: d53b0d84c22b5424cae4a9b272042504, type: 2}
|
||||
propertyPath: m_LocalRotation.y
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 4014875790597442, guid: d53b0d84c22b5424cae4a9b272042504, type: 2}
|
||||
propertyPath: m_LocalRotation.z
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 4014875790597442, guid: d53b0d84c22b5424cae4a9b272042504, type: 2}
|
||||
propertyPath: m_LocalRotation.w
|
||||
value: 1
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 4014875790597442, guid: d53b0d84c22b5424cae4a9b272042504, type: 2}
|
||||
propertyPath: m_RootOrder
|
||||
value: 6
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 212802685174810290, guid: d53b0d84c22b5424cae4a9b272042504,
|
||||
type: 2}
|
||||
propertyPath: m_Color.r
|
||||
value: 1
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 212802685174810290, guid: d53b0d84c22b5424cae4a9b272042504,
|
||||
type: 2}
|
||||
propertyPath: m_Color.g
|
||||
value: 0.93066514
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 212802685174810290, guid: d53b0d84c22b5424cae4a9b272042504,
|
||||
type: 2}
|
||||
propertyPath: m_Color.b
|
||||
value: 0.5330188
|
||||
objectReference: {fileID: 0}
|
||||
m_RemovedComponents: []
|
||||
m_SourcePrefab: {fileID: 100100000, guid: d53b0d84c22b5424cae4a9b272042504, type: 2}
|
||||
m_IsPrefabAsset: 0
|
@ -1,17 +0,0 @@
|
||||
using UnityEngine;
|
||||
using UnityEngine.UI;
|
||||
using UnityAtoms;
|
||||
|
||||
namespace UnityAtoms.Examples
|
||||
{
|
||||
public class Harmful : MonoBehaviour
|
||||
{
|
||||
void OnTriggerEnter2D(Collider2D collider)
|
||||
{
|
||||
if (collider.tag == "Player")
|
||||
{
|
||||
collider.GetComponent<PlayerHealth>().Health.Value -= 10;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
@ -1,17 +0,0 @@
|
||||
using UnityEngine;
|
||||
using UnityEngine.UI;
|
||||
using UnityAtoms;
|
||||
|
||||
namespace UnityAtoms.Examples
|
||||
{
|
||||
public class HealthBar : MonoBehaviour
|
||||
{
|
||||
[SerializeField]
|
||||
private IntConstant MaxHealth;
|
||||
|
||||
public void HealthChanged(int health)
|
||||
{
|
||||
GetComponent<Image>().fillAmount = 1.0f * health / MaxHealth.Value;
|
||||
}
|
||||
}
|
||||
}
|
@ -1,8 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: ae80c11fe46534d49a5ade3f3223b22a
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
@ -1,8 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: b0a2bb436fed1413fbdffbbdf7714a72
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
@ -1,6 +0,0 @@
|
||||
using UnityEngine;
|
||||
|
||||
namespace UnityAtoms
|
||||
{
|
||||
public abstract class Collider2DGameObjectEventAction : GameAction<Collider2DEvent, GameObject> { }
|
||||
}
|
@ -1,8 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: e1c9856ef98eb420c9d483b73e3ec610
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
@ -1,10 +0,0 @@
|
||||
using UnityEngine;
|
||||
|
||||
namespace UnityAtoms
|
||||
{
|
||||
[CreateAssetMenu(menuName = "Unity Atoms/Game Actions/Set Variable Value/Bool",
|
||||
fileName = "SetBoolVariableValueAction", order = 2)]
|
||||
public class SetBoolVariableValue : SetVariableValue<bool, BoolVariable, BoolReference, BoolEvent, BoolBoolEvent>
|
||||
{
|
||||
}
|
||||
}
|
@ -1,10 +0,0 @@
|
||||
using UnityEngine;
|
||||
|
||||
namespace UnityAtoms
|
||||
{
|
||||
[CreateAssetMenu(menuName = "Unity Atoms/Game Actions/Set Variable Value/Color",
|
||||
fileName = "SetColorVariableValueAction", order = 3)]
|
||||
public class SetColorVariableValue : SetVariableValue<Color, ColorVariable, ColorReference, ColorEvent, ColorColorEvent>
|
||||
{
|
||||
}
|
||||
}
|
@ -1,10 +0,0 @@
|
||||
using UnityEngine;
|
||||
|
||||
namespace UnityAtoms
|
||||
{
|
||||
[CreateAssetMenu(menuName = "Unity Atoms/Game Actions/Set Variable Value/Float",
|
||||
fileName = "SetFloatVariableValueAction", order = 1)]
|
||||
public class SetFloatVariableValue : SetVariableValue<float, FloatVariable, FloatReference, FloatEvent, FloatFloatEvent>
|
||||
{
|
||||
}
|
||||
}
|
@ -1,11 +0,0 @@
|
||||
using UnityEngine;
|
||||
|
||||
namespace UnityAtoms
|
||||
{
|
||||
[CreateAssetMenu(menuName = "Unity Atoms/Game Actions/Set Variable Value/GameObject",
|
||||
fileName = "SetGameObjectVariableValueAction", order = 6)]
|
||||
public class SetGameObjectVariableValue : SetVariableValue<GameObject, GameObjectVariable, GameObjectReference,
|
||||
GameObjectEvent, GameObjectGameObjectEvent>
|
||||
{
|
||||
}
|
||||
}
|
@ -1,10 +0,0 @@
|
||||
using UnityEngine;
|
||||
|
||||
namespace UnityAtoms
|
||||
{
|
||||
[CreateAssetMenu(menuName = "Unity Atoms/Game Actions/Set Variable Value/Int",
|
||||
fileName = "SetIntVariableValueAction", order = 0)]
|
||||
public class SetIntVariableValue : SetVariableValue<int, IntVariable, IntReference, IntEvent, IntIntEvent>
|
||||
{
|
||||
}
|
||||
}
|
@ -1,11 +0,0 @@
|
||||
using UnityEngine;
|
||||
|
||||
namespace UnityAtoms
|
||||
{
|
||||
[CreateAssetMenu(menuName = "Unity Atoms/Game Actions/Set Variable Value/Vector3",
|
||||
fileName = "SetVector3VariableValueAction", order = 5)]
|
||||
public class SetVector3VariableValue : SetVariableValue<Vector3, Vector3Variable, Vector3Reference, Vector3Event,
|
||||
Vector3Vector3Event>
|
||||
{
|
||||
}
|
||||
}
|
@ -1,8 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: b6931a91a73da4b52a887f290260d402
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
@ -1,8 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: f81562da9bcee48729913ada71c0862a
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
@ -1,9 +0,0 @@
|
||||
using UnityEngine;
|
||||
|
||||
namespace UnityAtoms
|
||||
{
|
||||
[CreateAssetMenu(menuName = "Unity Atoms/Game Events/Bool Bool", fileName = "BoolBoolEvent", order = 5)]
|
||||
public class BoolBoolEvent : GameEvent<bool, bool>
|
||||
{
|
||||
}
|
||||
}
|
@ -1,9 +0,0 @@
|
||||
using UnityEngine;
|
||||
|
||||
namespace UnityAtoms
|
||||
{
|
||||
[CreateAssetMenu(menuName = "Unity Atoms/Game Events/Bool", fileName = "BoolEvent", order = 4)]
|
||||
public class BoolEvent : GameEvent<bool>
|
||||
{
|
||||
}
|
||||
}
|
@ -1,9 +0,0 @@
|
||||
using UnityEngine;
|
||||
|
||||
namespace UnityAtoms
|
||||
{
|
||||
[CreateAssetMenu(menuName = "Unity Atoms/Game Events/Collider2D", fileName = "Collider2DEvent", order = 12)]
|
||||
public class Collider2DEvent : GameEvent<Collider2D>
|
||||
{
|
||||
}
|
||||
}
|
@ -1,10 +0,0 @@
|
||||
using UnityEngine;
|
||||
|
||||
namespace UnityAtoms
|
||||
{
|
||||
[CreateAssetMenu(menuName = "Unity Atoms/Game Events/Collider2D GameObject", fileName = "Collider2DGameObjectEvent",
|
||||
order = 13)]
|
||||
public class Collider2DGameObjectEvent : GameEvent<Collider2D, GameObject>
|
||||
{
|
||||
}
|
||||
}
|
@ -1,9 +0,0 @@
|
||||
using UnityEngine;
|
||||
|
||||
namespace UnityAtoms
|
||||
{
|
||||
[CreateAssetMenu(menuName = "Unity Atoms/Game Events/Color Color", fileName = "ColorColorEvent", order = 7)]
|
||||
public class ColorColorEvent : GameEvent<Color, Color>
|
||||
{
|
||||
}
|
||||
}
|
@ -1,9 +0,0 @@
|
||||
using UnityEngine;
|
||||
|
||||
namespace UnityAtoms
|
||||
{
|
||||
[CreateAssetMenu(menuName = "Unity Atoms/Game Events/Color", fileName = "ColorEvent", order = 6)]
|
||||
public class ColorEvent : GameEvent<Color>
|
||||
{
|
||||
}
|
||||
}
|
@ -1,8 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 24d1bfb3b963c4391b650eded4dfb801
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
@ -1,19 +0,0 @@
|
||||
|
||||
using UnityEngine;
|
||||
|
||||
namespace UnityAtoms
|
||||
{
|
||||
// public class CreateEventOnAwake<T, E1, E2, L1, L2, GA1, GA2, UER1, UER2> : MonoBehaviour
|
||||
// where E1 : GameEvent<T> where E2 : GameEvent<T, GameObject>
|
||||
// where L1 : GameEventListener<T, GA1, E1, UER1> where L2 : GameEventListener<T, GameObject, GA2, E2, UER2>
|
||||
// where GA1 : GameAction<T> where GA2 : GameAction<T, GameObject>
|
||||
// where UER1 : UnityEvent<T> where UER2 : UnityEvent<T, GameObject>
|
||||
public class CreateCollider2DEventOnAwake : CreateEventOnAwake<
|
||||
Collider2D, Collider2DEvent, Collider2DGameObjectEvent,
|
||||
Collider2DListener, Collider2DGameObjectListener,
|
||||
Collider2DAction, Collider2DGameObjectAction,
|
||||
UnityCollider2DEvent, UnityCollider2DGameObjectEvent,
|
||||
Collider2DHook
|
||||
>
|
||||
{ }
|
||||
}
|
@ -1,9 +0,0 @@
|
||||
using UnityEngine;
|
||||
|
||||
namespace UnityAtoms
|
||||
{
|
||||
[CreateAssetMenu(menuName = "Unity Atoms/Game Events/Float", fileName = "FloatEvent", order = 2)]
|
||||
public class FloatEvent : GameEvent<float>
|
||||
{
|
||||
}
|
||||
}
|
@ -1,9 +0,0 @@
|
||||
using UnityEngine;
|
||||
|
||||
namespace UnityAtoms
|
||||
{
|
||||
[CreateAssetMenu(menuName = "Unity Atoms/Game Events/Float Float", fileName = "FloatFloatEvent", order = 3)]
|
||||
public class FloatFloatEvent : GameEvent<float, float>
|
||||
{
|
||||
}
|
||||
}
|
@ -1,10 +0,0 @@
|
||||
using UnityEngine;
|
||||
|
||||
namespace UnityAtoms
|
||||
{
|
||||
[CreateAssetMenu(menuName = "Unity Atoms/Game Events/GameObject Collider2D", fileName = "GameObjectCollider2DEvent",
|
||||
order = 15)]
|
||||
public class GameObjectCollider2DEvent : GameEvent<GameObject, Collider2D>
|
||||
{
|
||||
}
|
||||
}
|
@ -1,9 +0,0 @@
|
||||
using UnityEngine;
|
||||
|
||||
namespace UnityAtoms
|
||||
{
|
||||
[CreateAssetMenu(menuName = "Unity Atoms/Game Events/GameObject", fileName = "GameObjectEvent", order = 14)]
|
||||
public class GameObjectEvent : GameEvent<GameObject>
|
||||
{
|
||||
}
|
||||
}
|
@ -1,10 +0,0 @@
|
||||
using UnityEngine;
|
||||
|
||||
namespace UnityAtoms
|
||||
{
|
||||
[CreateAssetMenu(menuName = "Unity Atoms/Game Events/GameObject GameObject", fileName = "GameObjectGameObjectEvent",
|
||||
order = 16)]
|
||||
public class GameObjectGameObjectEvent : GameEvent<GameObject, GameObject>
|
||||
{
|
||||
}
|
||||
}
|
@ -1,9 +0,0 @@
|
||||
using UnityEngine;
|
||||
|
||||
namespace UnityAtoms
|
||||
{
|
||||
[CreateAssetMenu(menuName = "Unity Atoms/Game Events/Int", fileName = "IntEvent", order = 0)]
|
||||
public class IntEvent : GameEvent<int>
|
||||
{
|
||||
}
|
||||
}
|
@ -1,9 +0,0 @@
|
||||
using UnityEngine;
|
||||
|
||||
namespace UnityAtoms
|
||||
{
|
||||
[CreateAssetMenu(menuName = "Unity Atoms/Game Events/Int Int", fileName = "IntIntEvent", order = 1)]
|
||||
public class IntIntEvent : GameEvent<int, int>
|
||||
{
|
||||
}
|
||||
}
|
@ -1,9 +0,0 @@
|
||||
using UnityEngine;
|
||||
|
||||
namespace UnityAtoms
|
||||
{
|
||||
[CreateAssetMenu(menuName = "Unity Atoms/Game Events/Vector2", fileName = "Vector2Event", order = 8)]
|
||||
public class Vector2Event : GameEvent<Vector2>
|
||||
{
|
||||
}
|
||||
}
|
@ -1,9 +0,0 @@
|
||||
using UnityEngine;
|
||||
|
||||
namespace UnityAtoms
|
||||
{
|
||||
[CreateAssetMenu(menuName = "Unity Atoms/Game Events/Vector2 Vector2", fileName = "Vector2Vector2Event", order = 9)]
|
||||
public class Vector2Vector2Event : GameEvent<Vector2, Vector2>
|
||||
{
|
||||
}
|
||||
}
|
@ -1,9 +0,0 @@
|
||||
using UnityEngine;
|
||||
|
||||
namespace UnityAtoms
|
||||
{
|
||||
[CreateAssetMenu(menuName = "Unity Atoms/Game Events/Vector3", fileName = "Vector3Event", order = 10)]
|
||||
public class Vector3Event : GameEvent<Vector3>
|
||||
{
|
||||
}
|
||||
}
|
@ -1,10 +0,0 @@
|
||||
using UnityEngine;
|
||||
|
||||
namespace UnityAtoms
|
||||
{
|
||||
[CreateAssetMenu(menuName = "Unity Atoms/Game Events/Vector3 Vector3", fileName = "Vector3Vector3Event",
|
||||
order = 11)]
|
||||
public class Vector3Vector3Event : GameEvent<Vector3, Vector3>
|
||||
{
|
||||
}
|
||||
}
|
@ -1,10 +0,0 @@
|
||||
using UnityEngine;
|
||||
|
||||
namespace UnityAtoms
|
||||
{
|
||||
[CreateAssetMenu(menuName = "Unity Atoms/Game Events/Void GameObject", fileName = "VoidGameObjectEvent",
|
||||
order = 101)]
|
||||
public class VoidGameObjectEvent : GameEvent<Void, GameObject>
|
||||
{
|
||||
}
|
||||
}
|
@ -1,8 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 66a9ae44edb6e4513b0140745b09f0a2
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
@ -1,44 +0,0 @@
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
|
||||
namespace UnityAtoms
|
||||
{
|
||||
/* Gets an unused GameObject from the GameObjectList. If an GameObject is used or not is determined by IsUsed GameFunction.
|
||||
* If no unused GameObject is found a new one is instantiated and added to the GameObjectList.
|
||||
*/
|
||||
[CreateAssetMenu(menuName = "Unity Atoms/Game Functions/Get Unused GameObject")]
|
||||
public class GetUnusedGameObject : GameObjectVector3QuaternionFunction
|
||||
{
|
||||
[SerializeField]
|
||||
private GameObjectList List;
|
||||
|
||||
[SerializeField]
|
||||
private GameObject Prefab;
|
||||
|
||||
[SerializeField]
|
||||
private BoolGameObjectFunction IsUsed;
|
||||
|
||||
public override GameObject Call(Vector3 position, Quaternion quaternion)
|
||||
{
|
||||
if (IsUsed == null)
|
||||
{
|
||||
Debug.LogWarning("IsUsed must be defined!");
|
||||
}
|
||||
|
||||
for (int i = 0; i < List.Count; ++i)
|
||||
{
|
||||
if (!IsUsed.Call(List[i]))
|
||||
{
|
||||
List[i].transform.position = position;
|
||||
List[i].transform.rotation = quaternion;
|
||||
return List[i];
|
||||
}
|
||||
}
|
||||
|
||||
var newGameObject = Instantiate(Prefab, position, quaternion);
|
||||
List.Add(newGameObject);
|
||||
return newGameObject;
|
||||
}
|
||||
}
|
||||
}
|
@ -1,8 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 2e9e7b58ea92246bba58fc3707b36295
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
@ -1,9 +0,0 @@
|
||||
using UnityEngine;
|
||||
|
||||
namespace UnityAtoms
|
||||
{
|
||||
[CreateAssetMenu(menuName = "Unity Atoms/Lists/Bool", fileName = "BoolList", order = 2)]
|
||||
public class BoolList : ScriptableObjectList<bool, BoolEvent>
|
||||
{
|
||||
}
|
||||
}
|
@ -1,9 +0,0 @@
|
||||
using UnityEngine;
|
||||
|
||||
namespace UnityAtoms
|
||||
{
|
||||
[CreateAssetMenu(menuName = "Unity Atoms/Lists/Collider2D", fileName = "Collider2DList", order = 6)]
|
||||
public class Collider2DList : ScriptableObjectList<Collider2D, Collider2DEvent>
|
||||
{
|
||||
}
|
||||
}
|
@ -1,9 +0,0 @@
|
||||
using UnityEngine;
|
||||
|
||||
namespace UnityAtoms
|
||||
{
|
||||
[CreateAssetMenu(menuName = "Unity Atoms/Lists/Color", fileName = "ColorList", order = 3)]
|
||||
public class ColorList : ScriptableObjectList<Color, ColorEvent>
|
||||
{
|
||||
}
|
||||
}
|
@ -1,9 +0,0 @@
|
||||
using UnityEngine;
|
||||
|
||||
namespace UnityAtoms
|
||||
{
|
||||
[CreateAssetMenu(menuName = "Unity Atoms/Lists/Float", fileName = "FloatList", order = 1)]
|
||||
public class FloatList : ScriptableObjectList<float, FloatEvent>
|
||||
{
|
||||
}
|
||||
}
|
@ -1,10 +0,0 @@
|
||||
using System;
|
||||
using UnityEngine;
|
||||
|
||||
namespace UnityAtoms
|
||||
{
|
||||
[CreateAssetMenu(menuName = "Unity Atoms/Lists/GameObject", fileName = "GameObjectList", order = 7)]
|
||||
public class GameObjectList : ScriptableObjectList<GameObject, GameObjectEvent>
|
||||
{
|
||||
}
|
||||
}
|
@ -1,9 +0,0 @@
|
||||
using UnityEngine;
|
||||
|
||||
namespace UnityAtoms
|
||||
{
|
||||
[CreateAssetMenu(menuName = "Unity Atoms/Lists/Int", fileName = "IntList", order = 0)]
|
||||
public class IntList : ScriptableObjectList<int, IntEvent>
|
||||
{
|
||||
}
|
||||
}
|
@ -1,9 +0,0 @@
|
||||
using UnityEngine;
|
||||
|
||||
namespace UnityAtoms
|
||||
{
|
||||
[CreateAssetMenu(menuName = "Unity Atoms/Lists/Vector2", fileName = "Vector2List", order = 4)]
|
||||
public class Vector2List : ScriptableObjectList<Vector2, Vector2Event>
|
||||
{
|
||||
}
|
||||
}
|
@ -1,9 +0,0 @@
|
||||
using UnityEngine;
|
||||
|
||||
namespace UnityAtoms
|
||||
{
|
||||
[CreateAssetMenu(menuName = "Unity Atoms/Lists/Vector3", fileName = "Vector3List", order = 5)]
|
||||
public class Vector3List : ScriptableObjectList<Vector3, Vector3Event>
|
||||
{
|
||||
}
|
||||
}
|
@ -1,8 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 7542f0701f65b4ba4a712d2fe7a7d1b0
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
@ -1,8 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 465af7166dc584352abfbd4465361711
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
@ -1,8 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: ef08246e8e69e4bac85d0a3e5c564a98
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
@ -1,31 +0,0 @@
|
||||
using System;
|
||||
using UnityEngine.Events;
|
||||
using UnityEngine;
|
||||
|
||||
namespace UnityAtoms
|
||||
{
|
||||
[Serializable]
|
||||
public class UnityBoolEvent : UnityEvent<bool> { }
|
||||
[Serializable]
|
||||
public class UnityCollider2DEvent : UnityEvent<Collider2D> { }
|
||||
[Serializable]
|
||||
public class UnityColorEvent : UnityEvent<Color> { }
|
||||
[Serializable]
|
||||
public class UnityFloatEvent : UnityEvent<float> { }
|
||||
[Serializable]
|
||||
public class UnityGameObjectEvent : UnityEvent<GameObject> { }
|
||||
[Serializable]
|
||||
public class UnityIntEvent : UnityEvent<int> { }
|
||||
[Serializable]
|
||||
public class UnityVector2Event : UnityEvent<Vector2> { }
|
||||
[Serializable]
|
||||
public class UnityVector3Event : UnityEvent<Vector3> { }
|
||||
[Serializable]
|
||||
public class UnityVoidEvent : UnityEvent<Void> { }
|
||||
|
||||
|
||||
[Serializable]
|
||||
public class UnityCollider2DGameObjectEvent : UnityEvent<Collider2D, GameObject> { }
|
||||
[Serializable]
|
||||
public class UnityVoidGameObjectEvent : UnityEvent<Void, GameObject> { }
|
||||
}
|
@ -1,8 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 5b256372890954b0fa50606ced479496
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
@ -1,9 +0,0 @@
|
||||
using UnityEngine;
|
||||
|
||||
namespace UnityAtoms
|
||||
{
|
||||
[CreateAssetMenu(menuName = "Unity Atoms/Variables/Bool", fileName = "BoolVariable", order = 2)]
|
||||
public class BoolVariable : EquatableScriptableObjectVariable<bool, BoolEvent, BoolBoolEvent>
|
||||
{
|
||||
}
|
||||
}
|
@ -1,13 +0,0 @@
|
||||
using UnityEngine;
|
||||
|
||||
namespace UnityAtoms
|
||||
{
|
||||
[CreateAssetMenu(menuName = "Unity Atoms/Variables/GameObject", fileName = "GameObjectVariable", order = 6)]
|
||||
public class GameObjectVariable : ScriptableObjectVariable<GameObject, GameObjectEvent, GameObjectGameObjectEvent>
|
||||
{
|
||||
protected override bool AreEqual(GameObject first, GameObject second)
|
||||
{
|
||||
return first.GetInstanceID() == second.GetInstanceID();
|
||||
}
|
||||
}
|
||||
}
|
@ -1,17 +0,0 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
|
||||
namespace UnityAtoms
|
||||
{
|
||||
public abstract class ScriptableObjectVariableBase<T> : ScriptableObject, IWithValue<T>
|
||||
{
|
||||
[Multiline]
|
||||
public string DeveloperDescription = "";
|
||||
|
||||
public virtual T Value { get { return value; } set { } }
|
||||
|
||||
[SerializeField]
|
||||
protected T value;
|
||||
}
|
||||
}
|
@ -1,8 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 9693935f2160243b89477918a91c32d3
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
@ -1,15 +0,0 @@
|
||||
using UnityEngine;
|
||||
|
||||
namespace UnityAtoms
|
||||
{
|
||||
public static class VariableUtils
|
||||
{
|
||||
public static V CreateVariable<T, V, E1, E2>(bool createChangedEvent = true, bool createChangedWithHistoryEvent = false) where V : ScriptableObjectVariable<T, E1, E2> where E1 : GameEvent<T> where E2 : GameEvent<T, T>
|
||||
{
|
||||
var sov = ScriptableObject.CreateInstance<V>();
|
||||
sov.Changed = createChangedEvent ? ScriptableObject.CreateInstance<E1>() : null;
|
||||
sov.ChangedWithHistory = createChangedWithHistoryEvent ? ScriptableObject.CreateInstance<E2>() : null;
|
||||
return sov;
|
||||
}
|
||||
}
|
||||
}
|
@ -1,11 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: e5b3fa20aa7fc4601bd91447112f4454
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
7
LICENSE.meta
Normal file
7
LICENSE.meta
Normal file
@ -0,0 +1,7 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 9c9e51f1e8f7a41ef9d9c41983521433
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
@ -1,39 +0,0 @@
|
||||
{
|
||||
"dependencies": {
|
||||
"com.unity.ads": "2.0.8",
|
||||
"com.unity.analytics": "2.0.16",
|
||||
"com.unity.package-manager-ui": "1.9.11",
|
||||
"com.unity.purchasing": "2.0.3",
|
||||
"com.unity.textmeshpro": "1.2.4",
|
||||
"com.unity.modules.ai": "1.0.0",
|
||||
"com.unity.modules.animation": "1.0.0",
|
||||
"com.unity.modules.assetbundle": "1.0.0",
|
||||
"com.unity.modules.audio": "1.0.0",
|
||||
"com.unity.modules.cloth": "1.0.0",
|
||||
"com.unity.modules.director": "1.0.0",
|
||||
"com.unity.modules.imageconversion": "1.0.0",
|
||||
"com.unity.modules.imgui": "1.0.0",
|
||||
"com.unity.modules.jsonserialize": "1.0.0",
|
||||
"com.unity.modules.particlesystem": "1.0.0",
|
||||
"com.unity.modules.physics": "1.0.0",
|
||||
"com.unity.modules.physics2d": "1.0.0",
|
||||
"com.unity.modules.screencapture": "1.0.0",
|
||||
"com.unity.modules.terrain": "1.0.0",
|
||||
"com.unity.modules.terrainphysics": "1.0.0",
|
||||
"com.unity.modules.tilemap": "1.0.0",
|
||||
"com.unity.modules.ui": "1.0.0",
|
||||
"com.unity.modules.uielements": "1.0.0",
|
||||
"com.unity.modules.umbra": "1.0.0",
|
||||
"com.unity.modules.unityanalytics": "1.0.0",
|
||||
"com.unity.modules.unitywebrequest": "1.0.0",
|
||||
"com.unity.modules.unitywebrequestassetbundle": "1.0.0",
|
||||
"com.unity.modules.unitywebrequestaudio": "1.0.0",
|
||||
"com.unity.modules.unitywebrequesttexture": "1.0.0",
|
||||
"com.unity.modules.unitywebrequestwww": "1.0.0",
|
||||
"com.unity.modules.vehicles": "1.0.0",
|
||||
"com.unity.modules.video": "1.0.0",
|
||||
"com.unity.modules.vr": "1.0.0",
|
||||
"com.unity.modules.wind": "1.0.0",
|
||||
"com.unity.modules.xr": "1.0.0"
|
||||
}
|
||||
}
|
@ -1 +0,0 @@
|
||||
m_EditorVersion: 2018.2.14f1
|
13
README.md
13
README.md
@ -19,6 +19,17 @@ Unity Atoms is an open source library that aims to make your game code:
|
||||
## Introduction
|
||||
Before you start looking into this library you should watch the video above ☝️ and read [this](https://unity3d.com/how-to/architect-with-scriptable-objects) article on how to architect your game with Scriptable Objects.
|
||||
|
||||
## Installation 2018.3+
|
||||
Go to your projects `Packages/manifest.json` and add this:
|
||||
|
||||
"dependencies": {
|
||||
...
|
||||
"com.mambojambostudios.unity-atoms": "https://github.com/AdamRamberg/unity-atoms.git#v1.0.0",
|
||||
...
|
||||
}
|
||||
|
||||
This will make the Unity packagemager install it.
|
||||
|
||||
## Usage
|
||||
Unity Atoms is an event based system that encourages the game to be as data-driven as possible. The 4 most fundamental pieces (atoms) of Unity Atoms are:
|
||||
- Variables
|
||||
@ -72,4 +83,4 @@ When you start thinking about this pattern you will realize that everything can
|
||||
Examples will soon be added to this project.
|
||||
|
||||
## Contribution
|
||||
Would ❤️ if you would like to contribute to the project. Post me a message if you want to become a contributer.
|
||||
Would ❤️ if you would like to contribute to the project. Post me a message if you want to become a contributer.
|
||||
|
7
README.md.meta
Normal file
7
README.md.meta
Normal file
@ -0,0 +1,7 @@
|
||||
fileFormatVersion: 2
|
||||
guid: b4d690cccba4848f78a3f842bf611d1a
|
||||
TextScriptImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
@ -1,5 +1,5 @@
|
||||
fileFormatVersion: 2
|
||||
guid: efcad9197646b4edea139b64e41bad22
|
||||
guid: 801798f80823c4da4a3c7f50885855f2
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
@ -1,5 +1,5 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 5a005666929044374a4cce42e2137dc8
|
||||
guid: b728251faa7854a7f83e071244410591
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
175
Source/AtomicTags/AtomicTags.cs
Normal file
175
Source/AtomicTags/AtomicTags.cs
Normal file
@ -0,0 +1,175 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Reflection;
|
||||
#if UNITY_EDITOR
|
||||
using UnityEditor;
|
||||
#endif
|
||||
using UnityEngine;
|
||||
|
||||
namespace UnityAtoms
|
||||
{
|
||||
public class AtomicTags : MonoBehaviour, ISerializationCallbackReceiver
|
||||
{
|
||||
|
||||
public ReadOnlyList<StringConstant> Tags { get; private set; }
|
||||
private SortedList<string, StringConstant> sortedTags = new SortedList<string, StringConstant>();
|
||||
private static Dictionary<string, List<GameObject>> taggedGOs = new Dictionary<string, List<GameObject>>();
|
||||
private static Dictionary<GameObject, AtomicTags> instances = new Dictionary<GameObject, AtomicTags>();
|
||||
|
||||
#region Serialization
|
||||
public List<StringConstant> _tags = new List<StringConstant>();
|
||||
public void OnBeforeSerialize()
|
||||
{
|
||||
#if UNITY_EDITOR
|
||||
if(!EditorApplication.isPlaying
|
||||
&& !EditorApplication.isUpdating
|
||||
&& !EditorApplication.isCompiling) return;
|
||||
#endif
|
||||
_tags.Clear();
|
||||
foreach (var kvp in sortedTags)
|
||||
{
|
||||
_tags.Add(kvp.Value);
|
||||
}
|
||||
}
|
||||
|
||||
public void OnAfterDeserialize()
|
||||
{
|
||||
sortedTags = new SortedList<string, StringConstant>();
|
||||
|
||||
for (int i = 0; i != _tags.Count; i++)
|
||||
{
|
||||
if (_tags[i] == null || _tags[i].Value == null) continue;
|
||||
if (sortedTags.ContainsKey(_tags[i].Value)) continue;
|
||||
sortedTags.Add(_tags[i].Value, _tags[i]);
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
|
||||
private void OnValidate()
|
||||
{
|
||||
OnAfterDeserialize(); // removes double values and nulls
|
||||
_tags = sortedTags.Values.ToList();
|
||||
#if UNITY_EDITOR
|
||||
// this null value is just for easier editing and could also be archived with an custom inspector
|
||||
if(!EditorApplication.isPlaying){ _tags.Add(null); }
|
||||
#endif
|
||||
}
|
||||
|
||||
#region Lifecycle
|
||||
|
||||
private void Awake()
|
||||
{
|
||||
Tags = new ReadOnlyList<StringConstant>(sortedTags.Values);
|
||||
}
|
||||
|
||||
private void OnEnable()
|
||||
{
|
||||
if (!instances.ContainsKey(this.gameObject)) instances.Add(this.gameObject, this);
|
||||
foreach (var stringConstant in Tags)
|
||||
{
|
||||
if (stringConstant == null) continue;
|
||||
var tag = stringConstant.Value;
|
||||
if (!taggedGOs.ContainsKey(tag)) taggedGOs.Add(tag, new List<GameObject>());
|
||||
taggedGOs[tag].Add(this.gameObject);
|
||||
};
|
||||
}
|
||||
|
||||
private void OnDisable()
|
||||
{
|
||||
if (instances.ContainsKey(this.gameObject)) instances.Remove(this.gameObject);
|
||||
foreach (var stringConstant in Tags)
|
||||
{
|
||||
if (stringConstant == null) continue;
|
||||
var tag = stringConstant.Value;
|
||||
if (taggedGOs.ContainsKey(tag)) taggedGOs[tag].Remove(this.gameObject);
|
||||
};
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
public bool HasTag(string tag)
|
||||
{
|
||||
if (tag == null) return false;
|
||||
return sortedTags.ContainsKey(tag);
|
||||
}
|
||||
|
||||
public void AddTag(StringConstant tag)
|
||||
{
|
||||
if (tag == null || tag.Value == null) return;
|
||||
if (sortedTags.ContainsKey(tag.Value)) return;
|
||||
sortedTags.Add(tag.Value, tag);
|
||||
|
||||
Tags = new ReadOnlyList<StringConstant>(sortedTags.Values);
|
||||
|
||||
// Update static accessors:
|
||||
if (!taggedGOs.ContainsKey(tag.Value)) taggedGOs.Add(tag.Value, new List<GameObject>());
|
||||
taggedGOs[tag.Value].Add(this.gameObject);
|
||||
}
|
||||
|
||||
public void RemoveTag(string tag)
|
||||
{
|
||||
if (tag == null) return;
|
||||
if (sortedTags.ContainsKey(tag)) return;
|
||||
sortedTags.Remove(tag);
|
||||
|
||||
Tags = new ReadOnlyList<StringConstant>(sortedTags.Values);
|
||||
|
||||
// Update static accessors:
|
||||
if (!taggedGOs.ContainsKey(tag)) return; // this should never happen
|
||||
taggedGOs[tag].Remove(this.gameObject);
|
||||
}
|
||||
|
||||
public static GameObject FindByTag(string tag)
|
||||
{
|
||||
if (!taggedGOs.ContainsKey(tag)) return null;
|
||||
return taggedGOs[tag][0];
|
||||
}
|
||||
|
||||
public static GameObject[] FindAllByTag(string tag)
|
||||
{
|
||||
if (!taggedGOs.ContainsKey(tag)) return null;
|
||||
return taggedGOs[tag].ToArray();
|
||||
}
|
||||
|
||||
public static void FindAllByTagNoAlloc(string tag, List<GameObject> output)
|
||||
{
|
||||
output.Clear();
|
||||
if (!taggedGOs.ContainsKey(tag)) return;
|
||||
for (var i = 0; i < taggedGOs[tag].Count; ++i)
|
||||
{
|
||||
output.Add(taggedGOs[tag][i]);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Faster alternative to go.GetComponent<AtomicTags>() since they are already cached in a dictionary
|
||||
/// </summary>
|
||||
/// <returns>
|
||||
/// - null if the GameObject does not have AtomicTags or they (or the GO) are disabled
|
||||
/// - the AtomicTag component
|
||||
/// </returns>
|
||||
public static AtomicTags GetForGameObject(GameObject go)
|
||||
{
|
||||
if (!instances.ContainsKey(go)) return null;
|
||||
return instances[go];
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Retrieves all AtomicTags for a given GameObject
|
||||
/// </summary>
|
||||
/// <returns>
|
||||
/// - null if the GameObject does not have AtomicTags or they (or the GO) are disabled
|
||||
/// - an readonly list of strings containing the tags
|
||||
/// - should be faster than go.GetComponent<AtomicTags>().tags
|
||||
/// </returns>
|
||||
public static ReadOnlyList<StringConstant> GetAtomicTags(GameObject go)
|
||||
{
|
||||
if (!instances.ContainsKey(go)) return null;
|
||||
var atomicTags = instances[go];
|
||||
return atomicTags.Tags;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
3
Source/AtomicTags/AtomicTags.cs.meta
Normal file
3
Source/AtomicTags/AtomicTags.cs.meta
Normal file
@ -0,0 +1,3 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 3570dca9cf8f40ac9731ef4082c9a4ef
|
||||
timeCreated: 1551964650
|
36
Source/AtomicTags/ReadOnlyList.cs
Normal file
36
Source/AtomicTags/ReadOnlyList.cs
Normal file
@ -0,0 +1,36 @@
|
||||
using System;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace UnityAtoms {
|
||||
/// <summary>
|
||||
/// This is basically an IList without everything that could mutate the list
|
||||
/// </summary>
|
||||
public class ReadOnlyList<T> : IEnumerable, IEnumerable<T> {
|
||||
private readonly IList<T> referenceList;
|
||||
|
||||
public ReadOnlyList(IList<T> referenceList) { this.referenceList = referenceList; }
|
||||
|
||||
public IEnumerator<T> GetEnumerator() { return referenceList.GetEnumerator(); }
|
||||
|
||||
IEnumerator IEnumerable.GetEnumerator() { return GetEnumerator(); }
|
||||
|
||||
public bool Contains(T item) { return referenceList.Contains(item); }
|
||||
public int IndexOf(T item) { return referenceList.IndexOf(item); }
|
||||
|
||||
public void CopyTo(T[] array, int arrayIndex) { referenceList.CopyTo(array, arrayIndex); }
|
||||
|
||||
public int Count {
|
||||
get { return referenceList.Count; }
|
||||
}
|
||||
|
||||
public bool IsReadOnly {
|
||||
get { return true; }
|
||||
}
|
||||
|
||||
public T this[int index] {
|
||||
get { return referenceList[index]; }
|
||||
}
|
||||
}
|
||||
|
||||
}
|
3
Source/AtomicTags/ReadOnlyList.cs.meta
Normal file
3
Source/AtomicTags/ReadOnlyList.cs.meta
Normal file
@ -0,0 +1,3 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 2b6227512dd049558deecbd5b25077a2
|
||||
timeCreated: 1551963502
|
@ -1,5 +1,5 @@
|
||||
fileFormatVersion: 2
|
||||
guid: f7bf490017eec4167b9746660c081299
|
||||
guid: 4944b67afb22a4fd69f3d5af34cb6475
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
56
Source/AtomicUI/UIContainer.cs
Normal file
56
Source/AtomicUI/UIContainer.cs
Normal file
@ -0,0 +1,56 @@
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
|
||||
namespace UnityAtoms.UI
|
||||
{
|
||||
public class UIContainer : MonoBehaviour, IGameEventListener<string>
|
||||
{
|
||||
[SerializeField]
|
||||
private StringVariable UIStateVariable = null;
|
||||
[SerializeField]
|
||||
private List<StringConstant> VisibleForStates = null;
|
||||
|
||||
void Start()
|
||||
{
|
||||
StateNameChanged(UIStateVariable.Value);
|
||||
}
|
||||
|
||||
public void OnEventRaised(string stateName)
|
||||
{
|
||||
StateNameChanged(stateName);
|
||||
}
|
||||
|
||||
private void StateNameChanged(string stateName)
|
||||
{
|
||||
if (VisibleForStates.Exists((state) => state.Value == stateName))
|
||||
{
|
||||
GetComponent<CanvasGroup>().alpha = 1f;
|
||||
GetComponent<CanvasGroup>().blocksRaycasts = true;
|
||||
GetComponent<CanvasGroup>().interactable = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
GetComponent<CanvasGroup>().alpha = 0f;
|
||||
GetComponent<CanvasGroup>().blocksRaycasts = false;
|
||||
GetComponent<CanvasGroup>().interactable = false;
|
||||
}
|
||||
}
|
||||
|
||||
private void Awake()
|
||||
{
|
||||
if (UIStateVariable.Changed != null)
|
||||
{
|
||||
UIStateVariable.Changed.RegisterListener(this);
|
||||
}
|
||||
}
|
||||
|
||||
private void OnDestroy()
|
||||
{
|
||||
if (UIStateVariable.Changed != null)
|
||||
{
|
||||
UIStateVariable.Changed.UnregisterListener(this);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
@ -1,5 +1,5 @@
|
||||
fileFormatVersion: 2
|
||||
guid: b97da5e1105ef486696939996e891752
|
||||
guid: bced320f87ec14de98a51ee9c0ebb03e
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
@ -1,5 +1,5 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 233fa789c93e44857a7192edddaa550b
|
||||
guid: 53751a37e99fb4c01823ad15345cf19a
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
150
Source/Base/ConditionalGameActionHelper.cs
Normal file
150
Source/Base/ConditionalGameActionHelper.cs
Normal file
@ -0,0 +1,150 @@
|
||||
using System;
|
||||
using UnityEngine;
|
||||
|
||||
namespace UnityAtoms
|
||||
{
|
||||
public class ConditionalGameActionHelper<T1, GA, C> where GA : GameAction<T1> where C : GameFunction<bool, T1>
|
||||
{
|
||||
[SerializeField]
|
||||
private C Condition = null;
|
||||
[SerializeField]
|
||||
private GA Action = null;
|
||||
[SerializeField]
|
||||
private VoidAction VoidAction = null;
|
||||
|
||||
[SerializeField]
|
||||
private GA ElseAction = null;
|
||||
[SerializeField]
|
||||
private VoidAction ElseVoidAction = null;
|
||||
|
||||
public void Do(T1 t1)
|
||||
{
|
||||
if (Condition == null || Condition.Call(t1))
|
||||
{
|
||||
if (Action != null) { Action.Do(t1); }
|
||||
if (VoidAction != null) { VoidAction.Do(); }
|
||||
}
|
||||
else
|
||||
{
|
||||
if (ElseAction != null) { ElseAction.Do(t1); }
|
||||
if (ElseVoidAction != null) { ElseVoidAction.Do(); }
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public class ConditionalGameActionHelper<T1, T2, GA, C> where GA : GameAction<T1, T2> where C : GameFunction<bool, T1, T2>
|
||||
{
|
||||
[SerializeField]
|
||||
private C Condition = null;
|
||||
[SerializeField]
|
||||
private GA Action = null;
|
||||
[SerializeField]
|
||||
private VoidAction VoidAction = null;
|
||||
|
||||
[SerializeField]
|
||||
private GA ElseAction = null;
|
||||
[SerializeField]
|
||||
private VoidAction ElseVoidAction = null;
|
||||
|
||||
public void Do(T1 t1, T2 t2)
|
||||
{
|
||||
if (Condition == null || Condition.Call(t1, t2))
|
||||
{
|
||||
if (Action != null) { Action.Do(t1, t2); }
|
||||
if (VoidAction != null) { VoidAction.Do(); }
|
||||
}
|
||||
else
|
||||
{
|
||||
if (ElseAction != null) { ElseAction.Do(t1, t2); }
|
||||
if (ElseVoidAction != null) { ElseVoidAction.Do(); }
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public class ConditionalGameActionHelper<T1, T2, T3, GA, C> where GA : GameAction<T1, T2, T3> where C : GameFunction<bool, T1, T2, T3>
|
||||
{
|
||||
[SerializeField]
|
||||
private C Condition = null;
|
||||
[SerializeField]
|
||||
private GA Action = null;
|
||||
[SerializeField]
|
||||
private VoidAction VoidAction = null;
|
||||
|
||||
[SerializeField]
|
||||
private GA ElseAction = null;
|
||||
[SerializeField]
|
||||
private VoidAction ElseVoidAction = null;
|
||||
|
||||
public void Do(T1 t1, T2 t2, T3 t3)
|
||||
{
|
||||
if (Condition == null || Condition.Call(t1, t2, t3))
|
||||
{
|
||||
if (Action != null) { Action.Do(t1, t2, t3); }
|
||||
if (VoidAction != null) { VoidAction.Do(); }
|
||||
}
|
||||
else
|
||||
{
|
||||
if (ElseAction != null) { ElseAction.Do(t1, t2, t3); }
|
||||
if (ElseVoidAction != null) { ElseVoidAction.Do(); }
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public class ConditionalGameActionHelper<T1, T2, T3, T4, GA, C> where GA : GameAction<T1, T2, T3, T4> where C : GameFunction<bool, T1, T2, T3, T4>
|
||||
{
|
||||
[SerializeField]
|
||||
private C Condition = null;
|
||||
[SerializeField]
|
||||
private GA Action = null;
|
||||
[SerializeField]
|
||||
private VoidAction VoidAction = null;
|
||||
|
||||
[SerializeField]
|
||||
private GA ElseAction = null;
|
||||
[SerializeField]
|
||||
private VoidAction ElseVoidAction = null;
|
||||
|
||||
public void Do(T1 t1, T2 t2, T3 t3, T4 t4)
|
||||
{
|
||||
if (Condition == null || Condition.Call(t1, t2, t3, t4))
|
||||
{
|
||||
if (Action != null) { Action.Do(t1, t2, t3, t4); }
|
||||
if (VoidAction != null) { VoidAction.Do(); }
|
||||
}
|
||||
else
|
||||
{
|
||||
if (ElseAction != null) { ElseAction.Do(t1, t2, t3, t4); }
|
||||
if (ElseVoidAction != null) { ElseVoidAction.Do(); }
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public class ConditionalGameActionHelper<T1, T2, T3, T4, T5, GA, C> where GA : GameAction<T1, T2, T3, T4, T5> where C : GameFunction<bool, T1, T2, T3, T4, T5>
|
||||
{
|
||||
[SerializeField]
|
||||
private C Condition = null;
|
||||
[SerializeField]
|
||||
private GA Action = null;
|
||||
[SerializeField]
|
||||
private VoidAction VoidAction = null;
|
||||
|
||||
[SerializeField]
|
||||
private GA ElseAction = null;
|
||||
[SerializeField]
|
||||
private VoidAction ElseVoidAction = null;
|
||||
|
||||
public void Do(T1 t1, T2 t2, T3 t3, T4 t4, T5 t5)
|
||||
{
|
||||
if (Condition == null || Condition.Call(t1, t2, t3, t4, t5))
|
||||
{
|
||||
if (Action != null) { Action.Do(t1, t2, t3, t4, t5); }
|
||||
if (VoidAction != null) { VoidAction.Do(); }
|
||||
}
|
||||
else
|
||||
{
|
||||
if (ElseAction != null) { ElseAction.Do(t1, t2, t3, t4, t5); }
|
||||
if (ElseVoidAction != null) { ElseVoidAction.Do(); }
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
@ -1,5 +1,5 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 9b3c2d8fb96d74c1aaa60e68c552de82
|
||||
guid: d0684d90d32fd43bc8c9ee0cb3ad3b2e
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
@ -1,5 +1,5 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 055205c364e382049bcbe7b60bdada76
|
||||
guid: 9ba1098daa1e349bca3ab3caff9db210
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
@ -15,8 +15,8 @@ namespace UnityAtoms
|
||||
public bool CreateEventWithGameObject = false;
|
||||
|
||||
public List<MH> MonoHooks;
|
||||
public L1 Listener;
|
||||
public L2 ListenerWithGameObject;
|
||||
public L1 Listener = null;
|
||||
public L2 ListenerWithGameObject = null;
|
||||
|
||||
void Awake()
|
||||
{
|
||||
@ -49,4 +49,4 @@ namespace UnityAtoms
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
@ -1,5 +1,5 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 58caff4cec6bc4978863fcc5b9f857e4
|
||||
guid: 91a10c8e706c64681971121dd35a11ab
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
@ -21,16 +21,16 @@ namespace UnityAtoms
|
||||
private bool CreateClearedEvent = false;
|
||||
|
||||
[SerializeField]
|
||||
private TEL AddedListener;
|
||||
private TEL AddedListener = null;
|
||||
[SerializeField]
|
||||
private TEL RemovedListener;
|
||||
private TEL RemovedListener = null;
|
||||
[SerializeField]
|
||||
private VoidListener ClearedListener;
|
||||
private VoidListener ClearedListener = null;
|
||||
|
||||
[SerializeField]
|
||||
private GA1 OnListCreate;
|
||||
private GA1 OnListCreate = null;
|
||||
[SerializeField]
|
||||
private GA2 OnListCreateWithGO;
|
||||
private GA2 OnListCreateWithGO = null;
|
||||
|
||||
void Awake()
|
||||
{
|
||||
@ -65,4 +65,4 @@ namespace UnityAtoms
|
||||
if (OnListCreateWithGO != null) { OnListCreateWithGO.Do(list, gameObject); }
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
@ -1,5 +1,5 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 8221d8181949e42a39b92731d7ad8025
|
||||
guid: fe6b3aa24d97c499db1d8af50cdf5c80
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
@ -2,6 +2,7 @@
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
using UnityEngine.Events;
|
||||
using UnityAtoms.Utils;
|
||||
|
||||
namespace UnityAtoms
|
||||
{
|
||||
@ -18,18 +19,18 @@ namespace UnityAtoms
|
||||
private bool CreateChangedWithHistoryEvent = false;
|
||||
|
||||
[SerializeField]
|
||||
private L1 Listener;
|
||||
private L1 Listener = null;
|
||||
[SerializeField]
|
||||
private L2 ListenerWithHistory;
|
||||
private L2 ListenerWithHistory = null;
|
||||
|
||||
[SerializeField]
|
||||
private GA3 OnVariableCreate;
|
||||
private GA3 OnVariableCreate = null;
|
||||
[SerializeField]
|
||||
private GA4 OnVariableCreateWithGO;
|
||||
private GA4 OnVariableCreateWithGO = null;
|
||||
|
||||
void Awake()
|
||||
{
|
||||
var variable = VariableUtils.CreateVariable<T, V, E1, E2>(CreateChangedEvent, CreateChangedWithHistoryEvent);
|
||||
var variable = DynamicAtoms.CreateVariable<T, V, E1, E2>(CreateChangedEvent, CreateChangedWithHistoryEvent);
|
||||
|
||||
if (variable.Changed != null)
|
||||
{
|
||||
@ -51,4 +52,4 @@ namespace UnityAtoms
|
||||
if (OnVariableCreateWithGO != null) { OnVariableCreateWithGO.Do(variable, gameObject); }
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
@ -1,5 +1,5 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 9409dd866fe734c02aeb4bd09615b418
|
||||
guid: f3031e0f8e0434570aacbb29265f0ad8
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
@ -4,7 +4,6 @@ using UnityEngine;
|
||||
|
||||
namespace UnityAtoms
|
||||
{
|
||||
[Serializable]
|
||||
public abstract class GameEvent<T> : ScriptableObject, IGameEvent<T>
|
||||
{
|
||||
private readonly List<IGameEventListener<T>> eventListeners = new List<IGameEventListener<T>>();
|
||||
@ -28,7 +27,6 @@ namespace UnityAtoms
|
||||
}
|
||||
}
|
||||
|
||||
[Serializable]
|
||||
public abstract class GameEvent<T1, T2> : ScriptableObject, IGameEvent<T1, T2>
|
||||
{
|
||||
private readonly List<IGameEventListener<T1, T2>> eventListeners = new List<IGameEventListener<T1, T2>>();
|
||||
@ -51,4 +49,4 @@ namespace UnityAtoms
|
||||
eventListeners.Remove(listener);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
@ -1,5 +1,5 @@
|
||||
fileFormatVersion: 2
|
||||
guid: f64ad222c1e1b42f2bac1aff9fc2c23a
|
||||
guid: 190ded37f2e6348eeb660a9ce19704a9
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
@ -7,12 +7,12 @@ namespace UnityAtoms
|
||||
public abstract class GameEventListener<T, GA, E, UER> : MonoBehaviour, IGameEventListener<T> where GA : GameAction<T> where E : GameEvent<T> where UER : UnityEvent<T>
|
||||
{
|
||||
[SerializeField]
|
||||
private E Event;
|
||||
private E Event = null;
|
||||
|
||||
public E GameEvent { get { return Event; } set { Event = value; } }
|
||||
|
||||
[SerializeField]
|
||||
private UER UnityEventResponse;
|
||||
private UER UnityEventResponse = null;
|
||||
|
||||
[SerializeField]
|
||||
private List<GA> GameActionResponses = new List<GA>();
|
||||
@ -41,12 +41,12 @@ namespace UnityAtoms
|
||||
public abstract class GameEventListener<T1, T2, GA, E, UER> : MonoBehaviour, IGameEventListener<T1, T2> where GA : GameAction<T1, T2> where E : GameEvent<T1, T2> where UER : UnityEvent<T1, T2>
|
||||
{
|
||||
[SerializeField]
|
||||
private E Event;
|
||||
private E Event = null;
|
||||
|
||||
public E GameEvent { get { return Event; } set { Event = value; } }
|
||||
|
||||
[SerializeField]
|
||||
private UER UnityEventResponse;
|
||||
private UER UnityEventResponse = null;
|
||||
|
||||
[SerializeField]
|
||||
private List<GA> GameActionResponses = new List<GA>();
|
||||
@ -72,4 +72,4 @@ namespace UnityAtoms
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
@ -1,5 +1,5 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 000f07bf50da14864b79d6283216c146
|
||||
guid: 692bce22c22984a83966ed4ae5332340
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
@ -11,5 +11,7 @@ namespace UnityAtoms
|
||||
public interface IGameEvent<T1, T2>
|
||||
{
|
||||
void Raise(T1 newItem, T2 oldItem);
|
||||
void RegisterListener(IGameEventListener<T1, T2> listener);
|
||||
void UnregisterListener(IGameEventListener<T1, T2> listener);
|
||||
}
|
||||
}
|
||||
}
|
@ -1,5 +1,5 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 0a9aba6294e804634bb6530ddc71f5a3
|
||||
guid: 312891f88a60e4f43ac11385b45afbe1
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
@ -1,5 +1,5 @@
|
||||
fileFormatVersion: 2
|
||||
guid: ea2dd93fc28a54471be8efc91f5cd111
|
||||
guid: 4c55e35a7a69848bc95f9c296a808cc6
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
@ -4,11 +4,6 @@ using UnityEngine;
|
||||
|
||||
namespace UnityAtoms
|
||||
{
|
||||
public abstract class GameAction : ScriptableObject
|
||||
{
|
||||
public abstract void Do();
|
||||
}
|
||||
|
||||
public abstract class GameAction<T1> : ScriptableObject
|
||||
{
|
||||
public abstract void Do(T1 t1);
|
@ -1,5 +1,5 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 36ac910c3225e4df095bd8b94a9ea5b7
|
||||
guid: d07e5a9e49aea43f4818809f4048d7b5
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user