From 79bb1f854b828c8e9ad3a8270074ae304ff0ca16 Mon Sep 17 00:00:00 2001 From: Jesse Fish Date: Mon, 4 Jul 2016 23:48:03 -0700 Subject: [PATCH 1/9] Remove Trap from Example Database A trap from the InvasionDay namespace was added to the example project database I assume erroneously. This commit removes it. --- Example/ExampleDatabase/Example_Database.asset | 7 ------- 1 file changed, 7 deletions(-) diff --git a/Example/ExampleDatabase/Example_Database.asset b/Example/ExampleDatabase/Example_Database.asset index 83afabc9..f337a565 100644 --- a/Example/ExampleDatabase/Example_Database.asset +++ b/Example/ExampleDatabase/Example_Database.asset @@ -61,10 +61,3 @@ MonoBehaviour: _classRef: Lockstep.Stop, Assembly-CSharp _listenInputCode: _informationGather: 0 - - _name: Trap - _description: - _icon: {fileID: 0} - _script: - _classRef: InvasionDay.Trap, Assembly-CSharp - _listenInputCode: - _informationGather: 0 From 65a117b575068b4168ab0d3a369f0a87b51d3cc3 Mon Sep 17 00:00:00 2001 From: Jesse Fish Date: Tue, 5 Jul 2016 12:16:08 -0700 Subject: [PATCH 2/9] Change Vector2d GetStateHash to GetHashCode MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Vector2d’s GetStateHash function should be overriding object GetHashCode. This change fixes the issue and all references to Vector2d’s GetStateHash. --- Core/Game/Agents/AgentController.cs | 6 +++--- Core/Game/Agents/LSAgent.cs | 6 +++--- Core/Simulation/Math/Vector2d.cs | 2 +- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/Core/Game/Agents/AgentController.cs b/Core/Game/Agents/AgentController.cs index 749db71f..d09a6e14 100644 --- a/Core/Game/Agents/AgentController.cs +++ b/Core/Game/Agents/AgentController.cs @@ -216,7 +216,7 @@ public static int GetStateHash() if (GlobalAgentActive [i]) { LSAgent agent = GlobalAgents [i]; - int n1 = agent.Body._position.GetStateHash() + agent.Body._rotation.GetStateHash(); + int n1 = agent.Body._position.GetHashCode() + agent.Body._rotation.GetHashCode(); switch (operationToggle) { case 0: @@ -236,8 +236,8 @@ public static int GetStateHash() } if (agent.Body.IsNotNull()) { - hash ^= agent.Body._position.GetStateHash(); - hash ^= agent.Body._position.GetStateHash(); + hash ^= agent.Body._position.GetHashCode(); + hash ^= agent.Body._position.GetHashCode(); } } } diff --git a/Core/Game/Agents/LSAgent.cs b/Core/Game/Agents/LSAgent.cs index 2e4f03fe..6b23e18e 100644 --- a/Core/Game/Agents/LSAgent.cs +++ b/Core/Game/Agents/LSAgent.cs @@ -423,9 +423,9 @@ public long GetStateHash () { long hash = 3; hash ^= this.GlobalID; hash ^= this.LocalID; - hash ^= this.Body._position.GetStateHash (); - hash ^= this.Body._rotation.GetStateHash (); - hash ^= this.Body.Velocity.GetStateHash (); + hash ^= this.Body._position.GetHashCode (); + hash ^= this.Body._rotation.GetHashCode (); + hash ^= this.Body.Velocity.GetHashCode (); return hash; } diff --git a/Core/Simulation/Math/Vector2d.cs b/Core/Simulation/Math/Vector2d.cs index 0c495539..30933453 100644 --- a/Core/Simulation/Math/Vector2d.cs +++ b/Core/Simulation/Math/Vector2d.cs @@ -452,7 +452,7 @@ public long GetLongHashCode() return x * 31 + y * 7; } - public int GetStateHash() + public override int GetHashCode() { return (int)(GetLongHashCode() % int.MaxValue); } From 2bb4e102efbccb4c4b11c86fdfc08b5656f6797b Mon Sep 17 00:00:00 2001 From: SnpM Date: Wed, 6 Jul 2016 09:21:45 -0600 Subject: [PATCH 3/9] Update LS --- Core/Game.meta | 0 Core/Game/Abilities.meta | 0 Core/Game/Abilities/Ability.cs | 3 +- Core/Game/Abilities/Ability.cs.meta | 0 Core/Game/Abilities/AbilityManager.cs | 0 Core/Game/Abilities/AbilityManager.cs.meta | 0 Core/Game/Abilities/ActiveAbility.cs | 7 +- Core/Game/Abilities/ActiveAbility.cs.meta | 0 Core/Game/Abilities/BehaviourHelper.meta | 0 .../BehaviourHelper/BehaviourHelper.cs | 0 .../BehaviourHelper/BehaviourHelper.cs.meta | 0 .../BehaviourHelper/BehaviourHelperManager.cs | 0 .../BehaviourHelperManager.cs.meta | 0 .../BehaviourHelper/DefaultHelperSetup.cs | 0 .../DefaultHelperSetup.cs.meta | 0 .../BehaviourHelper/IBehaviourHelper.cs | 0 .../BehaviourHelper/IBehaviourHelper.cs.meta | 0 Core/Game/Abilities/Essential.meta | 0 Core/Game/Abilities/Essential/Health.cs | 36 +- Core/Game/Abilities/Essential/Health.cs.meta | 0 Core/Game/Abilities/Essential/HeightSet.cs | 8 +- .../Abilities/Essential/HeightSet.cs.meta | 0 Core/Game/Abilities/Essential/Move.cs | 44 +- Core/Game/Abilities/Essential/Move.cs.meta | 0 Core/Game/Abilities/Essential/Scan.cs | 1151 +++++++++-------- Core/Game/Abilities/Essential/Scan.cs.meta | 0 Core/Game/Abilities/Essential/Stats.cs | 7 +- Core/Game/Abilities/Essential/Stats.cs.meta | 0 Core/Game/Abilities/Essential/Stop.cs | 0 Core/Game/Abilities/Essential/Stop.cs.meta | 0 Core/Game/Abilities/Essential/Turn.cs | 0 Core/Game/Abilities/Essential/Turn.cs.meta | 0 Core/Game/Abilities/Extra.meta | 0 Core/Game/Abilities/Extra/SelectionRing.meta | 0 .../Extra/SelectionRing/SelectionRing.cs | 4 + .../Extra/SelectionRing/SelectionRing.cs.meta | 0 .../SelectionRing/SelectionRingController.cs | 8 + .../SelectionRingController.cs.meta | 0 .../SelectionRing/SelectionRingProto.prefab | 0 .../SelectionRingProto.prefab.meta | 0 .../Extra/SelectionRing/SelectionRingState.cs | 0 .../SelectionRing/SelectionRingState.cs.meta | 0 Core/Game/Agents.meta | 0 Core/Game/Agents/AgentController.cs | 91 +- Core/Game/Agents/AgentController.cs.meta | 0 Core/Game/Agents/AgentTag.cs | 0 Core/Game/Agents/AgentTag.cs.meta | 0 Core/Game/Agents/AgentType.cs | 0 Core/Game/Agents/AgentType.cs.meta | 0 Core/Game/Agents/LSAgent.cs | 713 +++++----- Core/Game/Agents/LSAgent.cs.meta | 0 Core/Game/Agents/LSAnimator.cs | 30 +- Core/Game/Agents/LSAnimator.cs.meta | 0 Core/Game/Agents/LSAnimatorBase.cs | 4 +- Core/Game/Agents/LSAnimatorBase.cs.meta | 0 Core/Game/Agents/LSBusStop.cs | 0 Core/Game/Agents/LSBusStop.cs.meta | 0 Core/Game/Agents/LSParticler.cs | 0 Core/Game/Agents/LSParticler.cs.meta | 0 Core/Game/Agents/Teams.meta | 0 Core/Game/Agents/Teams/Team.cs | 0 Core/Game/Agents/Teams/Team.cs.meta | 0 Core/Game/Agents/Teams/TeamManager.cs | 0 Core/Game/Agents/Teams/TeamManager.cs.meta | 0 Core/Game/Agents/Visuals.meta | 0 Core/Game/Agents/Visuals/ExampleGUIManager.cs | 0 .../Agents/Visuals/ExampleGUIManager.cs.meta | 0 Core/Game/Agents/Visuals/GUIManager.cs | 0 Core/Game/Agents/Visuals/GUIManager.cs.meta | 0 Core/Game/Agents/Visuals/InterfacerCode.cs | 0 .../Agents/Visuals/InterfacerCode.cs.meta | 0 Core/Game/Agents/Visuals/Materials.meta | 0 Core/Game/Agents/Visuals/Materials/Circle.mat | 0 .../Agents/Visuals/Materials/Circle.mat.meta | 0 Core/Game/Agents/Visuals/Materials/Hex.mat | 0 .../Agents/Visuals/Materials/Hex.mat.meta | 0 Core/Game/Agents/Visuals/Materials/Ring3.mat | 0 .../Agents/Visuals/Materials/Ring3.mat.meta | 0 Core/Game/Agents/Visuals/Materials/Ring4.mat | 0 .../Agents/Visuals/Materials/Ring4.mat.meta | 0 Core/Game/Agents/Visuals/Materials/Ring5.mat | 0 .../Agents/Visuals/Materials/Ring5.mat.meta | 0 Core/Game/Agents/Visuals/Materials/Ring6.mat | 0 .../Agents/Visuals/Materials/Ring6.mat.meta | 0 Core/Game/Agents/Visuals/Materials/Ring7.mat | 0 .../Agents/Visuals/Materials/Ring7.mat.meta | 0 Core/Game/Agents/Visuals/Materials/Ring8.mat | 0 .../Agents/Visuals/Materials/Ring8.mat.meta | 0 Core/Game/Agents/Visuals/Resources.meta | 0 .../Visuals/Resources/SelectionRing.prefab | 0 .../Resources/SelectionRing.prefab.meta | 0 Core/Game/Agents/Visuals/RotateRing.cs | 0 Core/Game/Agents/Visuals/RotateRing.cs.meta | 0 Core/Game/Agents/Visuals/Textures.meta | 0 .../Agents/Visuals/Textures/Circle.png.meta | 0 .../Visuals/Textures/Falloff 1.psd.meta | 0 .../Agents/Visuals/Textures/Field1.png.meta | 0 .../Agents/Visuals/Textures/Hex 1.png.meta | 0 .../Agents/Visuals/Textures/Hex 2.png.meta | 0 .../Agents/Visuals/Textures/Hex 3.png.meta | 0 .../Game/Agents/Visuals/Textures/Hex.png.meta | 0 .../Agents/Visuals/Textures/Ring1.png.meta | 0 .../Agents/Visuals/Textures/Ring10.png.meta | 0 .../Agents/Visuals/Textures/Ring11.png.meta | 0 .../Agents/Visuals/Textures/Ring12.png.meta | 0 .../Agents/Visuals/Textures/Ring13.png.meta | 0 .../Agents/Visuals/Textures/Ring14.png.meta | 0 .../Agents/Visuals/Textures/Ring15.png.meta | 0 .../Agents/Visuals/Textures/Ring16.png.meta | 0 .../Agents/Visuals/Textures/Ring17.png.meta | 0 .../Agents/Visuals/Textures/Ring3.png.meta | 0 .../Agents/Visuals/Textures/Ring4.png.meta | 0 .../Agents/Visuals/Textures/Ring5.png.meta | 0 .../Agents/Visuals/Textures/Ring6.png.meta | 0 .../Agents/Visuals/Textures/Ring7.png.meta | 0 .../Agents/Visuals/Textures/Ring8.png.meta | 0 .../Agents/Visuals/Textures/Ring9.png.meta | 0 Core/Game/Agents/Visuals/Textures/Square.png | Bin 4420 -> 0 bytes .../Agents/Visuals/Textures/Square.png.meta | 55 - Core/Game/Buffs.meta | 0 Core/Game/Buffs/Buff.cs | 1 + Core/Game/Buffs/Buff.cs.meta | 0 Core/Game/Determinism.meta | 0 Core/Game/Determinism/DeterminismTester.cs | 0 .../Determinism/DeterminismTester.cs.meta | 0 Core/Game/Determinism/LSVariable.cs | 0 Core/Game/Determinism/LSVariable.cs.meta | 0 Core/Game/Determinism/LSVariableContainer.cs | 0 .../Determinism/LSVariableContainer.cs.meta | 0 Core/Game/Determinism/LSVariableManager.cs | 0 .../Determinism/LSVariableManager.cs.meta | 0 Core/Game/Determinism/LockstepAttribute.cs | 27 +- .../Determinism/LockstepAttribute.cs.meta | 0 Core/Game/Effects.meta | 0 Core/Game/Effects/Defaults.meta | 0 Core/Game/Effects/Defaults/None.prefab | 0 Core/Game/Effects/Defaults/None.prefab.meta | 0 Core/Game/Effects/EffectDataItem.cs | 0 Core/Game/Effects/EffectDataItem.cs.meta | 0 Core/Game/Effects/EffectManager.cs | 20 +- Core/Game/Effects/EffectManager.cs.meta | 0 Core/Game/Effects/LSEffect.cs | 28 +- Core/Game/Effects/LSEffect.cs.meta | 0 Core/Game/Grouping.meta | 0 Core/Game/Grouping/MovementGroup.cs | 2 +- Core/Game/Grouping/MovementGroup.cs.meta | 0 Core/Game/Grouping/MovementGroupHelper.cs | 0 .../Game/Grouping/MovementGroupHelper.cs.meta | 0 Core/Game/Grouping/ScanGroupHelper.cs | 0 Core/Game/Grouping/ScanGroupHelper.cs.meta | 0 Core/Game/Managers.meta | 0 Core/Game/Managers/ClientManager.cs | 0 Core/Game/Managers/ClientManager.cs.meta | 0 Core/Game/Managers/FrameManager.cs | 5 +- Core/Game/Managers/FrameManager.cs.meta | 0 Core/Game/Managers/GameManager.meta | 0 Core/Game/Managers/GameManager/GameManager.cs | 0 .../Managers/GameManager/GameManager.cs.meta | 0 Core/Game/Managers/Input.meta | 0 Core/Game/Managers/Input/InputCodeManager.cs | 0 .../Managers/Input/InputCodeManager.cs.meta | 0 Core/Game/Managers/LSServer.cs | 0 Core/Game/Managers/LSServer.cs.meta | 0 Core/Game/Managers/LockstepManager.cs | 595 +++++---- Core/Game/Managers/LockstepManager.cs.meta | 0 Core/Game/Managers/MessageType.cs | 0 Core/Game/Managers/MessageType.cs.meta | 0 Core/Game/Managers/Network.meta | 0 Core/Game/Managers/Network/NetworkHelper.cs | 8 +- .../Managers/Network/NetworkHelper.cs.meta | 0 Core/Game/Managers/Replay.cs | 19 +- Core/Game/Managers/Replay.cs.meta | 0 Core/Game/Managers/ReplayManager.cs | 28 +- Core/Game/Managers/ReplayManager.cs.meta | 0 Core/Game/Managers/ServerSimulator.cs | 0 Core/Game/Managers/ServerSimulator.cs.meta | 0 Core/Game/Networking.meta | 0 Core/Game/Networking/NetworkHelperTester.cs | 0 .../Networking/NetworkHelperTester.cs.meta | 0 Core/Game/Player.meta | 0 Core/Game/Player/Commands.meta | 0 Core/Game/Player/Commands/Command.cs | 15 +- Core/Game/Player/Commands/Command.cs.meta | 0 Core/Game/Player/Commands/CommandManager.cs | 0 .../Player/Commands/CommandManager.cs.meta | 0 Core/Game/Player/Commands/Default.meta | 0 .../Commands/Default/BaseSerializableValue.cs | 0 .../Default/BaseSerializableValue.cs.meta | 0 .../Player/Commands/Default/DefaultData.cs | 0 .../Commands/Default/DefaultData.cs.meta | 0 .../Game/Player/Commands/Default/EmptyData.cs | 0 .../Player/Commands/Default/EmptyData.cs.meta | 0 .../Commands/Default/SerializableValue.cs | 0 .../Default/SerializableValue.cs.meta | 0 Core/Game/Player/Commands/ICommandData.cs | 0 .../Game/Player/Commands/ICommandData.cs.meta | 0 Core/Game/Player/OrderMarker.cs | 0 Core/Game/Player/OrderMarker.cs.meta | 0 Core/Game/Player/PlayerManager.cs | 0 Core/Game/Player/PlayerManager.cs.meta | 0 Core/Game/Player/RTSInterfacing.cs | 0 Core/Game/Player/RTSInterfacing.cs.meta | 0 Core/Game/Player/RTSInterfacingHelper.cs | 0 Core/Game/Player/RTSInterfacingHelper.cs.meta | 0 Core/Game/Player/SelectionManager.cs | 0 Core/Game/Player/SelectionManager.cs.meta | 0 Core/Game/Player/UI.meta | 0 Core/Game/Player/UI/BarElement.cs | 0 Core/Game/Player/UI/BarElement.cs.meta | 0 Core/Game/Player/UI/Icons/asset1.psd | Bin Core/Game/Player/UI/Icons/asset1.psd.meta | 0 Core/Game/Player/UI/StatsBar.cs | 0 Core/Game/Player/UI/StatsBar.cs.meta | 0 Core/Game/Player/Utility.meta | 0 Core/Game/Player/Utility/BoxedAgents.cs | 0 Core/Game/Player/Utility/BoxedAgents.cs.meta | 0 Core/Game/Player/Utility/IMousable.cs | 0 Core/Game/Player/Utility/IMousable.cs.meta | 0 Core/Game/Player/Utility/Selection.cs | 0 Core/Game/Player/Utility/Selection.cs.meta | 0 Core/Game/Player/Utility/Selector.cs | 0 Core/Game/Player/Utility/Selector.cs.meta | 0 Core/Game/Player/Visuals.meta | 0 Core/Game/Player/Visuals/BoxTexture.png | Bin Core/Game/Player/Visuals/BoxTexture.png.meta | 0 Core/Game/Player/Visuals/EmptyIcon.png | Bin Core/Game/Player/Visuals/EmptyIcon.png.meta | 0 Core/Game/Player/Visuals/RTS 3D Arrow.meta | 0 .../Player/Visuals/RTS 3D Arrow/Material.meta | 0 .../Visuals/RTS 3D Arrow/Material/Arrow.mat | 0 .../RTS 3D Arrow/Material/Arrow.mat.meta | 0 .../Visuals/RTS 3D Arrow/Material/Arrow.png | Bin .../RTS 3D Arrow/Material/Arrow.png.meta | 0 .../Visuals/RTS 3D Arrow/Material/Arrow.psd | Bin .../RTS 3D Arrow/Material/Arrow.psd.meta | 0 .../Player/Visuals/RTS 3D Arrow/Mesh.meta | 0 .../Visuals/RTS 3D Arrow/Mesh/Materials.meta | 0 .../RTS 3D Arrow/Mesh/Materials/Arrow.mat | 0 .../Mesh/Materials/Arrow.mat.meta | 0 .../RTS 3D Arrow/Mesh/ModifiedPlay.anim | 0 .../RTS 3D Arrow/Mesh/ModifiedPlay.anim.meta | 0 .../Visuals/RTS 3D Arrow/Mesh/RTS_Arrow.fbx | 0 .../RTS 3D Arrow/Mesh/RTS_Arrow.fbx.meta | 0 .../Visuals/RTS 3D Arrow/RTS_Arrow.prefab | 0 .../RTS 3D Arrow/RTS_Arrow.prefab.meta | 0 .../Player/Visuals/RTS 3D Arrow/Shader.meta | 0 .../RTS 3D Arrow/Shader/ArrowShader.shader | 0 .../Shader/ArrowShader.shader.meta | 0 Core/Game/Projectiles.meta | 0 Core/Game/Projectiles/DamageManager.cs | 0 Core/Game/Projectiles/DamageManager.cs.meta | 0 Core/Game/Projectiles/HitType.cs | 0 Core/Game/Projectiles/HitType.cs.meta | 0 Core/Game/Projectiles/LSProjectile.cs | 67 +- Core/Game/Projectiles/LSProjectile.cs.meta | 0 Core/Game/Projectiles/ProjectileDataItem.cs | 0 .../Projectiles/ProjectileDataItem.cs.meta | 0 Core/Game/Projectiles/ProjectileManager.cs | 54 +- .../Projectiles/ProjectileManager.cs.meta | 0 Core/Game/Projectiles/TargetingType.cs | 0 Core/Game/Projectiles/TargetingType.cs.meta | 0 Core/Simulation.meta | 0 Core/Simulation/Grid.meta | 0 Core/Simulation/Grid/Core.meta | 0 Core/Simulation/Grid/Core/GridClosedSet.cs | 0 .../Grid/Core/GridClosedSet.cs.meta | 0 Core/Simulation/Grid/Core/GridHeap.cs | 0 Core/Simulation/Grid/Core/GridHeap.cs.meta | 0 Core/Simulation/Grid/Core/GridManager.cs | 0 Core/Simulation/Grid/Core/GridManager.cs.meta | 0 Core/Simulation/Grid/Core/GridNode.cs | 0 Core/Simulation/Grid/Core/GridNode.cs.meta | 0 Core/Simulation/Grid/Core/ScanNode.cs | 0 Core/Simulation/Grid/Core/ScanNode.cs.meta | 0 Core/Simulation/Grid/Influence.meta | 0 Core/Simulation/Grid/Influence/DeltaCache.cs | 0 .../Grid/Influence/DeltaCache.cs.meta | 0 .../Grid/Influence/InfluenceManager.cs | 0 .../Grid/Influence/InfluenceManager.cs.meta | 0 .../Simulation/Grid/Influence/LSInfluencer.cs | 0 .../Grid/Influence/LSInfluencer.cs.meta | 0 Core/Simulation/Grid/Influence/Utility.meta | 0 .../Influence/Utility/DeltaCacheGenerator.cs | 0 .../Utility/DeltaCacheGenerator.cs.meta | 0 .../Utility/DeltaCountCacheGenerator.cs | 0 .../Utility/DeltaCountCacheGenerator.cs.meta | 0 Core/Simulation/Grid/Settings.meta | 0 Core/Simulation/Grid/Settings/GridSettings.cs | 0 .../Grid/Settings/GridSettings.cs.meta | 0 .../Grid/Settings/GridSettingsSaver.cs | 0 .../Grid/Settings/GridSettingsSaver.cs.meta | 0 Core/Simulation/Grid/Utility.meta | 0 Core/Simulation/Grid/Utility/Tools.meta | 0 .../Grid/Utility/Tools/Blocker.meta | 0 .../Grid/Utility/Tools/Blocker/Blocker.cs | 0 .../Utility/Tools/Blocker/Blocker.cs.meta | 0 .../Utility/Tools/Blocker/DynamicBlocker.cs | 0 .../Tools/Blocker/DynamicBlocker.cs.meta | 0 .../Grid/Utility/Tools/Blocker/Test.meta | 0 .../Tools/Blocker/Test/BlockerTestScene.unity | 0 .../Blocker/Test/BlockerTestScene.unity.meta | 0 Core/Simulation/Math.meta | 0 Core/Simulation/Math/Coordinate.cs | 0 Core/Simulation/Math/Coordinate.cs.meta | 0 Core/Simulation/Math/FixedMath.cs | 0 Core/Simulation/Math/FixedMath.cs.meta | 0 Core/Simulation/Math/Vector2d.cs.meta | 0 Core/Simulation/Math/Vector2dHeight.cs | 0 Core/Simulation/Math/Vector2dHeight.cs.meta | 0 Core/Simulation/Math/Vector3d.cs | 0 Core/Simulation/Math/Vector3d.cs.meta | 0 Core/Simulation/Pathfinding.meta | 0 Core/Simulation/Pathfinding/Pathfinder.cs | 0 .../Simulation/Pathfinding/Pathfinder.cs.meta | 0 Core/Simulation/Physics.meta | 0 Core/Simulation/Physics/Core.meta | 0 Core/Simulation/Physics/Core/CollisionPair.cs | 0 .../Physics/Core/CollisionPair.cs.meta | 0 Core/Simulation/Physics/Core/Editor.meta | 0 .../Physics/Core/Editor/EditorLSBody.cs | 0 .../Physics/Core/Editor/EditorLSBody.cs.meta | 0 Core/Simulation/Physics/Core/LSBody.cs | 11 +- Core/Simulation/Physics/Core/LSBody.cs.meta | 0 .../Physics/Core/LSBodyOverlapCheck.cs | 0 .../Physics/Core/LSBodyOverlapCheck.cs.meta | 0 Core/Simulation/Physics/Core/Partition.cs | 0 .../Simulation/Physics/Core/Partition.cs.meta | 0 Core/Simulation/Physics/Core/PartitionNode.cs | 0 .../Physics/Core/PartitionNode.cs.meta | 0 .../Simulation/Physics/Core/PhysicsManager.cs | 0 .../Physics/Core/PhysicsManager.cs.meta | 0 Core/Simulation/Physics/Core/Settings.meta | 0 .../Physics/Core/Settings/PhysicsSettings.cs | 0 .../Core/Settings/PhysicsSettings.cs.meta | 0 Core/Simulation/Physics/Raycast.meta | 0 Core/Simulation/Physics/Raycast/Raycaster.cs | 0 .../Physics/Raycast/Raycaster.cs.meta | 0 Core/Simulation/Physics/Raycast/Test.meta | 0 .../Physics/Raycast/Test/RaycastTestHelper.cs | 0 .../Raycast/Test/RaycastTestHelper.cs.meta | 0 .../Raycast/Test/RaycastTestScene.unity | 0 .../Raycast/Test/RaycastTestScene.unity.meta | 0 Core/UI.meta | 0 Core/UI/LSUIWindow.cs | 0 Core/UI/LSUIWindow.cs.meta | 0 Core/Utility.meta | 0 Core/Utility/Array2D.cs | 0 Core/Utility/Array2D.cs.meta | 0 Core/Utility/CodeHelper.cs | 0 Core/Utility/CodeHelper.cs.meta | 0 Core/Utility/CoroutineManager.cs | 0 Core/Utility/CoroutineManager.cs.meta | 0 Core/Utility/Distributor.cs | 0 Core/Utility/Distributor.cs.meta | 0 Core/Utility/Fast.meta | 0 Core/Utility/Fast/BiDictionary.cs | 0 Core/Utility/Fast/BiDictionary.cs.meta | 0 Core/Utility/Fast/FastBucket.cs | 0 Core/Utility/Fast/FastBucket.cs.meta | 0 Core/Utility/Fast/FastDictionary.cs | 0 Core/Utility/Fast/FastDictionary.cs.meta | 0 Core/Utility/Fast/FastHeap.cs | 0 Core/Utility/Fast/FastHeap.cs.meta | 0 Core/Utility/Fast/FastList.cs | 0 Core/Utility/Fast/FastList.cs.meta | 0 Core/Utility/Fast/FastQueue.cs | 0 Core/Utility/Fast/FastQueue.cs.meta | 0 Core/Utility/Fast/FastSorter.cs | 0 Core/Utility/Fast/FastSorter.cs.meta | 0 Core/Utility/Fast/FastStack.cs | 0 Core/Utility/Fast/FastStack.cs.meta | 0 Core/Utility/Fast/LSEnumerable.cs | 0 Core/Utility/Fast/LSEnumerable.cs.meta | 0 Core/Utility/Fast/Tests.meta | 0 Core/Utility/Fast/Tests/Array2DTester.cs | 0 Core/Utility/Fast/Tests/Array2DTester.cs.meta | 0 Core/Utility/LSUtility.cs | 0 Core/Utility/LSUtility.cs.meta | 0 Core/Utility/MessageSystem.meta | 0 .../MessageSystem/BaseMessageChannel.cs | 0 .../MessageSystem/BaseMessageChannel.cs.meta | 0 Core/Utility/MessageSystem/BaseMessageStop.cs | 0 .../MessageSystem/BaseMessageStop.cs.meta | 0 Core/Utility/MessageSystem/DefaultMessage.cs | 0 .../MessageSystem/DefaultMessage.cs.meta | 0 .../MessageSystem/DefaultMessageRaiser.cs | 0 .../DefaultMessageRaiser.cs.meta | 0 Core/Utility/MessageSystem/IMessage.cs | 0 Core/Utility/MessageSystem/IMessage.cs.meta | 0 Core/Utility/MessageSystem/MessageChannel.cs | 0 .../MessageSystem/MessageChannel.cs.meta | 0 Core/Utility/MessageSystem/MessageManager.cs | 0 .../MessageSystem/MessageManager.cs.meta | 0 Core/Utility/MessageSystem/MessageStop.cs | 0 .../Utility/MessageSystem/MessageStop.cs.meta | 0 Core/Utility/NDRaycast.meta | 0 Core/Utility/NDRaycast/NDRaycast.cs | 0 Core/Utility/NDRaycast/NDRaycast.cs.meta | 0 Core/Utility/NDRaycast/NDRaycastCollider.cs | 0 .../NDRaycast/NDRaycastCollider.cs.meta | 0 Core/Utility/PathObject.meta | 0 Core/Utility/PathObject/Core.meta | 0 Core/Utility/PathObject/Core/Editor.meta | 0 .../Core/Editor/EditorPathObject.cs | 0 .../Core/Editor/EditorPathObject.cs.meta | 0 .../Core/Editor/PathObjectUtility.cs | 0 .../Core/Editor/PathObjectUtility.cs.meta | 0 Core/Utility/PathObject/Core/PathObject.cs | 43 +- .../PathObject/Core/PathObject.cs.meta | 0 .../PathObject/Core/PathObjectAttribute.cs | 2 +- .../Core/PathObjectAttribute.cs.meta | 0 .../PathObject/Core/PathObjectFactory.cs | 60 +- .../PathObject/Core/PathObjectFactory.cs.meta | 0 Core/Utility/Serialization.meta | 0 Core/Utility/Serialization/CerealBehaviour.cs | 0 .../Serialization/CerealBehaviour.cs.meta | 0 Core/Utility/Serialization/Compressor.cs.meta | 0 Core/Utility/Serialization/Editor.meta | 0 Core/Utility/Serialization/Editor/Injector.cs | 0 .../Serialization/Editor/Injector.cs.meta | 0 Core/Utility/Serialization/FileManager.cs | 0 .../Utility/Serialization/FileManager.cs.meta | 0 Core/Utility/Serialization/Reader.cs | 8 + Core/Utility/Serialization/Reader.cs.meta | 0 Core/Utility/Serialization/Writer.cs | 4 + Core/Utility/Serialization/Writer.cs.meta | 0 Core/Utility/Triggers.meta | 0 Core/Utility/Triggers/Default.meta | 0 Core/Utility/Triggers/Default/Contact.meta | 0 .../Default/Contact/ContactMessage.cs | 0 .../Default/Contact/ContactMessage.cs.meta | 0 .../Default/Contact/ContactTrigger.cs | 0 .../Default/Contact/ContactTrigger.cs.meta | 0 Core/Utility/Triggers/LSTrigger.cs | 0 Core/Utility/Triggers/LSTrigger.cs.meta | 0 Core/Utility/Triggers/TriggerManager.cs | 0 Core/Utility/Triggers/TriggerManager.cs.meta | 0 Example/TestAgent.prefab | Bin 12486 -> 18920 bytes 438 files changed, 1801 insertions(+), 1357 deletions(-) mode change 100644 => 100755 Core/Game.meta mode change 100644 => 100755 Core/Game/Abilities.meta mode change 100644 => 100755 Core/Game/Abilities/Ability.cs mode change 100644 => 100755 Core/Game/Abilities/Ability.cs.meta mode change 100644 => 100755 Core/Game/Abilities/AbilityManager.cs mode change 100644 => 100755 Core/Game/Abilities/AbilityManager.cs.meta mode change 100644 => 100755 Core/Game/Abilities/ActiveAbility.cs mode change 100644 => 100755 Core/Game/Abilities/ActiveAbility.cs.meta mode change 100644 => 100755 Core/Game/Abilities/BehaviourHelper.meta mode change 100644 => 100755 Core/Game/Abilities/BehaviourHelper/BehaviourHelper.cs mode change 100644 => 100755 Core/Game/Abilities/BehaviourHelper/BehaviourHelper.cs.meta mode change 100644 => 100755 Core/Game/Abilities/BehaviourHelper/BehaviourHelperManager.cs mode change 100644 => 100755 Core/Game/Abilities/BehaviourHelper/BehaviourHelperManager.cs.meta mode change 100644 => 100755 Core/Game/Abilities/BehaviourHelper/DefaultHelperSetup.cs mode change 100644 => 100755 Core/Game/Abilities/BehaviourHelper/DefaultHelperSetup.cs.meta mode change 100644 => 100755 Core/Game/Abilities/BehaviourHelper/IBehaviourHelper.cs mode change 100644 => 100755 Core/Game/Abilities/BehaviourHelper/IBehaviourHelper.cs.meta mode change 100644 => 100755 Core/Game/Abilities/Essential.meta mode change 100644 => 100755 Core/Game/Abilities/Essential/Health.cs mode change 100644 => 100755 Core/Game/Abilities/Essential/Health.cs.meta mode change 100644 => 100755 Core/Game/Abilities/Essential/HeightSet.cs mode change 100644 => 100755 Core/Game/Abilities/Essential/HeightSet.cs.meta mode change 100644 => 100755 Core/Game/Abilities/Essential/Move.cs mode change 100644 => 100755 Core/Game/Abilities/Essential/Move.cs.meta mode change 100644 => 100755 Core/Game/Abilities/Essential/Scan.cs mode change 100644 => 100755 Core/Game/Abilities/Essential/Scan.cs.meta mode change 100644 => 100755 Core/Game/Abilities/Essential/Stats.cs mode change 100644 => 100755 Core/Game/Abilities/Essential/Stats.cs.meta mode change 100644 => 100755 Core/Game/Abilities/Essential/Stop.cs mode change 100644 => 100755 Core/Game/Abilities/Essential/Stop.cs.meta mode change 100644 => 100755 Core/Game/Abilities/Essential/Turn.cs mode change 100644 => 100755 Core/Game/Abilities/Essential/Turn.cs.meta mode change 100644 => 100755 Core/Game/Abilities/Extra.meta mode change 100644 => 100755 Core/Game/Abilities/Extra/SelectionRing.meta mode change 100644 => 100755 Core/Game/Abilities/Extra/SelectionRing/SelectionRing.cs mode change 100644 => 100755 Core/Game/Abilities/Extra/SelectionRing/SelectionRing.cs.meta mode change 100644 => 100755 Core/Game/Abilities/Extra/SelectionRing/SelectionRingController.cs mode change 100644 => 100755 Core/Game/Abilities/Extra/SelectionRing/SelectionRingController.cs.meta mode change 100644 => 100755 Core/Game/Abilities/Extra/SelectionRing/SelectionRingProto.prefab mode change 100644 => 100755 Core/Game/Abilities/Extra/SelectionRing/SelectionRingProto.prefab.meta mode change 100644 => 100755 Core/Game/Abilities/Extra/SelectionRing/SelectionRingState.cs mode change 100644 => 100755 Core/Game/Abilities/Extra/SelectionRing/SelectionRingState.cs.meta mode change 100644 => 100755 Core/Game/Agents.meta mode change 100644 => 100755 Core/Game/Agents/AgentController.cs mode change 100644 => 100755 Core/Game/Agents/AgentController.cs.meta mode change 100644 => 100755 Core/Game/Agents/AgentTag.cs mode change 100644 => 100755 Core/Game/Agents/AgentTag.cs.meta mode change 100644 => 100755 Core/Game/Agents/AgentType.cs mode change 100644 => 100755 Core/Game/Agents/AgentType.cs.meta mode change 100644 => 100755 Core/Game/Agents/LSAgent.cs mode change 100644 => 100755 Core/Game/Agents/LSAgent.cs.meta mode change 100644 => 100755 Core/Game/Agents/LSAnimator.cs mode change 100644 => 100755 Core/Game/Agents/LSAnimator.cs.meta mode change 100644 => 100755 Core/Game/Agents/LSAnimatorBase.cs mode change 100644 => 100755 Core/Game/Agents/LSAnimatorBase.cs.meta mode change 100644 => 100755 Core/Game/Agents/LSBusStop.cs mode change 100644 => 100755 Core/Game/Agents/LSBusStop.cs.meta mode change 100644 => 100755 Core/Game/Agents/LSParticler.cs mode change 100644 => 100755 Core/Game/Agents/LSParticler.cs.meta mode change 100644 => 100755 Core/Game/Agents/Teams.meta mode change 100644 => 100755 Core/Game/Agents/Teams/Team.cs mode change 100644 => 100755 Core/Game/Agents/Teams/Team.cs.meta mode change 100644 => 100755 Core/Game/Agents/Teams/TeamManager.cs mode change 100644 => 100755 Core/Game/Agents/Teams/TeamManager.cs.meta mode change 100644 => 100755 Core/Game/Agents/Visuals.meta mode change 100644 => 100755 Core/Game/Agents/Visuals/ExampleGUIManager.cs mode change 100644 => 100755 Core/Game/Agents/Visuals/ExampleGUIManager.cs.meta mode change 100644 => 100755 Core/Game/Agents/Visuals/GUIManager.cs mode change 100644 => 100755 Core/Game/Agents/Visuals/GUIManager.cs.meta mode change 100644 => 100755 Core/Game/Agents/Visuals/InterfacerCode.cs mode change 100644 => 100755 Core/Game/Agents/Visuals/InterfacerCode.cs.meta mode change 100644 => 100755 Core/Game/Agents/Visuals/Materials.meta mode change 100644 => 100755 Core/Game/Agents/Visuals/Materials/Circle.mat mode change 100644 => 100755 Core/Game/Agents/Visuals/Materials/Circle.mat.meta mode change 100644 => 100755 Core/Game/Agents/Visuals/Materials/Hex.mat mode change 100644 => 100755 Core/Game/Agents/Visuals/Materials/Hex.mat.meta mode change 100644 => 100755 Core/Game/Agents/Visuals/Materials/Ring3.mat mode change 100644 => 100755 Core/Game/Agents/Visuals/Materials/Ring3.mat.meta mode change 100644 => 100755 Core/Game/Agents/Visuals/Materials/Ring4.mat mode change 100644 => 100755 Core/Game/Agents/Visuals/Materials/Ring4.mat.meta mode change 100644 => 100755 Core/Game/Agents/Visuals/Materials/Ring5.mat mode change 100644 => 100755 Core/Game/Agents/Visuals/Materials/Ring5.mat.meta mode change 100644 => 100755 Core/Game/Agents/Visuals/Materials/Ring6.mat mode change 100644 => 100755 Core/Game/Agents/Visuals/Materials/Ring6.mat.meta mode change 100644 => 100755 Core/Game/Agents/Visuals/Materials/Ring7.mat mode change 100644 => 100755 Core/Game/Agents/Visuals/Materials/Ring7.mat.meta mode change 100644 => 100755 Core/Game/Agents/Visuals/Materials/Ring8.mat mode change 100644 => 100755 Core/Game/Agents/Visuals/Materials/Ring8.mat.meta mode change 100644 => 100755 Core/Game/Agents/Visuals/Resources.meta mode change 100644 => 100755 Core/Game/Agents/Visuals/Resources/SelectionRing.prefab mode change 100644 => 100755 Core/Game/Agents/Visuals/Resources/SelectionRing.prefab.meta mode change 100644 => 100755 Core/Game/Agents/Visuals/RotateRing.cs mode change 100644 => 100755 Core/Game/Agents/Visuals/RotateRing.cs.meta mode change 100644 => 100755 Core/Game/Agents/Visuals/Textures.meta mode change 100644 => 100755 Core/Game/Agents/Visuals/Textures/Circle.png.meta mode change 100644 => 100755 Core/Game/Agents/Visuals/Textures/Falloff 1.psd.meta mode change 100644 => 100755 Core/Game/Agents/Visuals/Textures/Field1.png.meta mode change 100644 => 100755 Core/Game/Agents/Visuals/Textures/Hex 1.png.meta mode change 100644 => 100755 Core/Game/Agents/Visuals/Textures/Hex 2.png.meta mode change 100644 => 100755 Core/Game/Agents/Visuals/Textures/Hex 3.png.meta mode change 100644 => 100755 Core/Game/Agents/Visuals/Textures/Hex.png.meta mode change 100644 => 100755 Core/Game/Agents/Visuals/Textures/Ring1.png.meta mode change 100644 => 100755 Core/Game/Agents/Visuals/Textures/Ring10.png.meta mode change 100644 => 100755 Core/Game/Agents/Visuals/Textures/Ring11.png.meta mode change 100644 => 100755 Core/Game/Agents/Visuals/Textures/Ring12.png.meta mode change 100644 => 100755 Core/Game/Agents/Visuals/Textures/Ring13.png.meta mode change 100644 => 100755 Core/Game/Agents/Visuals/Textures/Ring14.png.meta mode change 100644 => 100755 Core/Game/Agents/Visuals/Textures/Ring15.png.meta mode change 100644 => 100755 Core/Game/Agents/Visuals/Textures/Ring16.png.meta mode change 100644 => 100755 Core/Game/Agents/Visuals/Textures/Ring17.png.meta mode change 100644 => 100755 Core/Game/Agents/Visuals/Textures/Ring3.png.meta mode change 100644 => 100755 Core/Game/Agents/Visuals/Textures/Ring4.png.meta mode change 100644 => 100755 Core/Game/Agents/Visuals/Textures/Ring5.png.meta mode change 100644 => 100755 Core/Game/Agents/Visuals/Textures/Ring6.png.meta mode change 100644 => 100755 Core/Game/Agents/Visuals/Textures/Ring7.png.meta mode change 100644 => 100755 Core/Game/Agents/Visuals/Textures/Ring8.png.meta mode change 100644 => 100755 Core/Game/Agents/Visuals/Textures/Ring9.png.meta delete mode 100755 Core/Game/Agents/Visuals/Textures/Square.png delete mode 100644 Core/Game/Agents/Visuals/Textures/Square.png.meta mode change 100644 => 100755 Core/Game/Buffs.meta mode change 100644 => 100755 Core/Game/Buffs/Buff.cs mode change 100644 => 100755 Core/Game/Buffs/Buff.cs.meta mode change 100644 => 100755 Core/Game/Determinism.meta mode change 100644 => 100755 Core/Game/Determinism/DeterminismTester.cs mode change 100644 => 100755 Core/Game/Determinism/DeterminismTester.cs.meta mode change 100644 => 100755 Core/Game/Determinism/LSVariable.cs mode change 100644 => 100755 Core/Game/Determinism/LSVariable.cs.meta mode change 100644 => 100755 Core/Game/Determinism/LSVariableContainer.cs mode change 100644 => 100755 Core/Game/Determinism/LSVariableContainer.cs.meta mode change 100644 => 100755 Core/Game/Determinism/LSVariableManager.cs mode change 100644 => 100755 Core/Game/Determinism/LSVariableManager.cs.meta mode change 100644 => 100755 Core/Game/Determinism/LockstepAttribute.cs mode change 100644 => 100755 Core/Game/Determinism/LockstepAttribute.cs.meta mode change 100644 => 100755 Core/Game/Effects.meta mode change 100644 => 100755 Core/Game/Effects/Defaults.meta mode change 100644 => 100755 Core/Game/Effects/Defaults/None.prefab mode change 100644 => 100755 Core/Game/Effects/Defaults/None.prefab.meta mode change 100644 => 100755 Core/Game/Effects/EffectDataItem.cs mode change 100644 => 100755 Core/Game/Effects/EffectDataItem.cs.meta mode change 100644 => 100755 Core/Game/Effects/EffectManager.cs mode change 100644 => 100755 Core/Game/Effects/EffectManager.cs.meta mode change 100644 => 100755 Core/Game/Effects/LSEffect.cs mode change 100644 => 100755 Core/Game/Effects/LSEffect.cs.meta mode change 100644 => 100755 Core/Game/Grouping.meta mode change 100644 => 100755 Core/Game/Grouping/MovementGroup.cs mode change 100644 => 100755 Core/Game/Grouping/MovementGroup.cs.meta mode change 100644 => 100755 Core/Game/Grouping/MovementGroupHelper.cs mode change 100644 => 100755 Core/Game/Grouping/MovementGroupHelper.cs.meta mode change 100644 => 100755 Core/Game/Grouping/ScanGroupHelper.cs mode change 100644 => 100755 Core/Game/Grouping/ScanGroupHelper.cs.meta mode change 100644 => 100755 Core/Game/Managers.meta mode change 100644 => 100755 Core/Game/Managers/ClientManager.cs mode change 100644 => 100755 Core/Game/Managers/ClientManager.cs.meta mode change 100644 => 100755 Core/Game/Managers/FrameManager.cs mode change 100644 => 100755 Core/Game/Managers/FrameManager.cs.meta mode change 100644 => 100755 Core/Game/Managers/GameManager.meta mode change 100644 => 100755 Core/Game/Managers/GameManager/GameManager.cs mode change 100644 => 100755 Core/Game/Managers/GameManager/GameManager.cs.meta mode change 100644 => 100755 Core/Game/Managers/Input.meta mode change 100644 => 100755 Core/Game/Managers/Input/InputCodeManager.cs mode change 100644 => 100755 Core/Game/Managers/Input/InputCodeManager.cs.meta mode change 100644 => 100755 Core/Game/Managers/LSServer.cs mode change 100644 => 100755 Core/Game/Managers/LSServer.cs.meta mode change 100644 => 100755 Core/Game/Managers/LockstepManager.cs mode change 100644 => 100755 Core/Game/Managers/LockstepManager.cs.meta mode change 100644 => 100755 Core/Game/Managers/MessageType.cs mode change 100644 => 100755 Core/Game/Managers/MessageType.cs.meta mode change 100644 => 100755 Core/Game/Managers/Network.meta mode change 100644 => 100755 Core/Game/Managers/Network/NetworkHelper.cs mode change 100644 => 100755 Core/Game/Managers/Network/NetworkHelper.cs.meta mode change 100644 => 100755 Core/Game/Managers/Replay.cs mode change 100644 => 100755 Core/Game/Managers/Replay.cs.meta mode change 100644 => 100755 Core/Game/Managers/ReplayManager.cs mode change 100644 => 100755 Core/Game/Managers/ReplayManager.cs.meta mode change 100644 => 100755 Core/Game/Managers/ServerSimulator.cs mode change 100644 => 100755 Core/Game/Managers/ServerSimulator.cs.meta mode change 100644 => 100755 Core/Game/Networking.meta mode change 100644 => 100755 Core/Game/Networking/NetworkHelperTester.cs mode change 100644 => 100755 Core/Game/Networking/NetworkHelperTester.cs.meta mode change 100644 => 100755 Core/Game/Player.meta mode change 100644 => 100755 Core/Game/Player/Commands.meta mode change 100644 => 100755 Core/Game/Player/Commands/Command.cs mode change 100644 => 100755 Core/Game/Player/Commands/Command.cs.meta mode change 100644 => 100755 Core/Game/Player/Commands/CommandManager.cs mode change 100644 => 100755 Core/Game/Player/Commands/CommandManager.cs.meta mode change 100644 => 100755 Core/Game/Player/Commands/Default.meta mode change 100644 => 100755 Core/Game/Player/Commands/Default/BaseSerializableValue.cs mode change 100644 => 100755 Core/Game/Player/Commands/Default/BaseSerializableValue.cs.meta mode change 100644 => 100755 Core/Game/Player/Commands/Default/DefaultData.cs mode change 100644 => 100755 Core/Game/Player/Commands/Default/DefaultData.cs.meta mode change 100644 => 100755 Core/Game/Player/Commands/Default/EmptyData.cs mode change 100644 => 100755 Core/Game/Player/Commands/Default/EmptyData.cs.meta mode change 100644 => 100755 Core/Game/Player/Commands/Default/SerializableValue.cs mode change 100644 => 100755 Core/Game/Player/Commands/Default/SerializableValue.cs.meta mode change 100644 => 100755 Core/Game/Player/Commands/ICommandData.cs mode change 100644 => 100755 Core/Game/Player/Commands/ICommandData.cs.meta mode change 100644 => 100755 Core/Game/Player/OrderMarker.cs mode change 100644 => 100755 Core/Game/Player/OrderMarker.cs.meta mode change 100644 => 100755 Core/Game/Player/PlayerManager.cs mode change 100644 => 100755 Core/Game/Player/PlayerManager.cs.meta mode change 100644 => 100755 Core/Game/Player/RTSInterfacing.cs mode change 100644 => 100755 Core/Game/Player/RTSInterfacing.cs.meta mode change 100644 => 100755 Core/Game/Player/RTSInterfacingHelper.cs mode change 100644 => 100755 Core/Game/Player/RTSInterfacingHelper.cs.meta mode change 100644 => 100755 Core/Game/Player/SelectionManager.cs mode change 100644 => 100755 Core/Game/Player/SelectionManager.cs.meta mode change 100644 => 100755 Core/Game/Player/UI.meta mode change 100644 => 100755 Core/Game/Player/UI/BarElement.cs mode change 100644 => 100755 Core/Game/Player/UI/BarElement.cs.meta mode change 100644 => 100755 Core/Game/Player/UI/Icons/asset1.psd mode change 100644 => 100755 Core/Game/Player/UI/Icons/asset1.psd.meta mode change 100644 => 100755 Core/Game/Player/UI/StatsBar.cs mode change 100644 => 100755 Core/Game/Player/UI/StatsBar.cs.meta mode change 100644 => 100755 Core/Game/Player/Utility.meta mode change 100644 => 100755 Core/Game/Player/Utility/BoxedAgents.cs mode change 100644 => 100755 Core/Game/Player/Utility/BoxedAgents.cs.meta mode change 100644 => 100755 Core/Game/Player/Utility/IMousable.cs mode change 100644 => 100755 Core/Game/Player/Utility/IMousable.cs.meta mode change 100644 => 100755 Core/Game/Player/Utility/Selection.cs mode change 100644 => 100755 Core/Game/Player/Utility/Selection.cs.meta mode change 100644 => 100755 Core/Game/Player/Utility/Selector.cs mode change 100644 => 100755 Core/Game/Player/Utility/Selector.cs.meta mode change 100644 => 100755 Core/Game/Player/Visuals.meta mode change 100644 => 100755 Core/Game/Player/Visuals/BoxTexture.png mode change 100644 => 100755 Core/Game/Player/Visuals/BoxTexture.png.meta mode change 100644 => 100755 Core/Game/Player/Visuals/EmptyIcon.png mode change 100644 => 100755 Core/Game/Player/Visuals/EmptyIcon.png.meta mode change 100644 => 100755 Core/Game/Player/Visuals/RTS 3D Arrow.meta mode change 100644 => 100755 Core/Game/Player/Visuals/RTS 3D Arrow/Material.meta mode change 100644 => 100755 Core/Game/Player/Visuals/RTS 3D Arrow/Material/Arrow.mat mode change 100644 => 100755 Core/Game/Player/Visuals/RTS 3D Arrow/Material/Arrow.mat.meta mode change 100644 => 100755 Core/Game/Player/Visuals/RTS 3D Arrow/Material/Arrow.png mode change 100644 => 100755 Core/Game/Player/Visuals/RTS 3D Arrow/Material/Arrow.png.meta mode change 100644 => 100755 Core/Game/Player/Visuals/RTS 3D Arrow/Material/Arrow.psd mode change 100644 => 100755 Core/Game/Player/Visuals/RTS 3D Arrow/Material/Arrow.psd.meta mode change 100644 => 100755 Core/Game/Player/Visuals/RTS 3D Arrow/Mesh.meta mode change 100644 => 100755 Core/Game/Player/Visuals/RTS 3D Arrow/Mesh/Materials.meta mode change 100644 => 100755 Core/Game/Player/Visuals/RTS 3D Arrow/Mesh/Materials/Arrow.mat mode change 100644 => 100755 Core/Game/Player/Visuals/RTS 3D Arrow/Mesh/Materials/Arrow.mat.meta mode change 100644 => 100755 Core/Game/Player/Visuals/RTS 3D Arrow/Mesh/ModifiedPlay.anim mode change 100644 => 100755 Core/Game/Player/Visuals/RTS 3D Arrow/Mesh/ModifiedPlay.anim.meta mode change 100644 => 100755 Core/Game/Player/Visuals/RTS 3D Arrow/Mesh/RTS_Arrow.fbx mode change 100644 => 100755 Core/Game/Player/Visuals/RTS 3D Arrow/Mesh/RTS_Arrow.fbx.meta mode change 100644 => 100755 Core/Game/Player/Visuals/RTS 3D Arrow/RTS_Arrow.prefab mode change 100644 => 100755 Core/Game/Player/Visuals/RTS 3D Arrow/RTS_Arrow.prefab.meta mode change 100644 => 100755 Core/Game/Player/Visuals/RTS 3D Arrow/Shader.meta mode change 100644 => 100755 Core/Game/Player/Visuals/RTS 3D Arrow/Shader/ArrowShader.shader mode change 100644 => 100755 Core/Game/Player/Visuals/RTS 3D Arrow/Shader/ArrowShader.shader.meta mode change 100644 => 100755 Core/Game/Projectiles.meta mode change 100644 => 100755 Core/Game/Projectiles/DamageManager.cs mode change 100644 => 100755 Core/Game/Projectiles/DamageManager.cs.meta mode change 100644 => 100755 Core/Game/Projectiles/HitType.cs mode change 100644 => 100755 Core/Game/Projectiles/HitType.cs.meta mode change 100644 => 100755 Core/Game/Projectiles/LSProjectile.cs mode change 100644 => 100755 Core/Game/Projectiles/LSProjectile.cs.meta mode change 100644 => 100755 Core/Game/Projectiles/ProjectileDataItem.cs mode change 100644 => 100755 Core/Game/Projectiles/ProjectileDataItem.cs.meta mode change 100644 => 100755 Core/Game/Projectiles/ProjectileManager.cs mode change 100644 => 100755 Core/Game/Projectiles/ProjectileManager.cs.meta mode change 100644 => 100755 Core/Game/Projectiles/TargetingType.cs mode change 100644 => 100755 Core/Game/Projectiles/TargetingType.cs.meta mode change 100644 => 100755 Core/Simulation.meta mode change 100644 => 100755 Core/Simulation/Grid.meta mode change 100644 => 100755 Core/Simulation/Grid/Core.meta mode change 100644 => 100755 Core/Simulation/Grid/Core/GridClosedSet.cs mode change 100644 => 100755 Core/Simulation/Grid/Core/GridClosedSet.cs.meta mode change 100644 => 100755 Core/Simulation/Grid/Core/GridHeap.cs mode change 100644 => 100755 Core/Simulation/Grid/Core/GridHeap.cs.meta mode change 100644 => 100755 Core/Simulation/Grid/Core/GridManager.cs mode change 100644 => 100755 Core/Simulation/Grid/Core/GridManager.cs.meta mode change 100644 => 100755 Core/Simulation/Grid/Core/GridNode.cs mode change 100644 => 100755 Core/Simulation/Grid/Core/GridNode.cs.meta mode change 100644 => 100755 Core/Simulation/Grid/Core/ScanNode.cs mode change 100644 => 100755 Core/Simulation/Grid/Core/ScanNode.cs.meta mode change 100644 => 100755 Core/Simulation/Grid/Influence.meta mode change 100644 => 100755 Core/Simulation/Grid/Influence/DeltaCache.cs mode change 100644 => 100755 Core/Simulation/Grid/Influence/DeltaCache.cs.meta mode change 100644 => 100755 Core/Simulation/Grid/Influence/InfluenceManager.cs mode change 100644 => 100755 Core/Simulation/Grid/Influence/InfluenceManager.cs.meta mode change 100644 => 100755 Core/Simulation/Grid/Influence/LSInfluencer.cs mode change 100644 => 100755 Core/Simulation/Grid/Influence/LSInfluencer.cs.meta mode change 100644 => 100755 Core/Simulation/Grid/Influence/Utility.meta mode change 100644 => 100755 Core/Simulation/Grid/Influence/Utility/DeltaCacheGenerator.cs mode change 100644 => 100755 Core/Simulation/Grid/Influence/Utility/DeltaCacheGenerator.cs.meta mode change 100644 => 100755 Core/Simulation/Grid/Influence/Utility/DeltaCountCacheGenerator.cs mode change 100644 => 100755 Core/Simulation/Grid/Influence/Utility/DeltaCountCacheGenerator.cs.meta mode change 100644 => 100755 Core/Simulation/Grid/Settings.meta mode change 100644 => 100755 Core/Simulation/Grid/Settings/GridSettings.cs mode change 100644 => 100755 Core/Simulation/Grid/Settings/GridSettings.cs.meta mode change 100644 => 100755 Core/Simulation/Grid/Settings/GridSettingsSaver.cs mode change 100644 => 100755 Core/Simulation/Grid/Settings/GridSettingsSaver.cs.meta mode change 100644 => 100755 Core/Simulation/Grid/Utility.meta mode change 100644 => 100755 Core/Simulation/Grid/Utility/Tools.meta mode change 100644 => 100755 Core/Simulation/Grid/Utility/Tools/Blocker.meta mode change 100644 => 100755 Core/Simulation/Grid/Utility/Tools/Blocker/Blocker.cs mode change 100644 => 100755 Core/Simulation/Grid/Utility/Tools/Blocker/Blocker.cs.meta mode change 100644 => 100755 Core/Simulation/Grid/Utility/Tools/Blocker/DynamicBlocker.cs mode change 100644 => 100755 Core/Simulation/Grid/Utility/Tools/Blocker/DynamicBlocker.cs.meta mode change 100644 => 100755 Core/Simulation/Grid/Utility/Tools/Blocker/Test.meta mode change 100644 => 100755 Core/Simulation/Grid/Utility/Tools/Blocker/Test/BlockerTestScene.unity mode change 100644 => 100755 Core/Simulation/Grid/Utility/Tools/Blocker/Test/BlockerTestScene.unity.meta mode change 100644 => 100755 Core/Simulation/Math.meta mode change 100644 => 100755 Core/Simulation/Math/Coordinate.cs mode change 100644 => 100755 Core/Simulation/Math/Coordinate.cs.meta mode change 100644 => 100755 Core/Simulation/Math/FixedMath.cs mode change 100644 => 100755 Core/Simulation/Math/FixedMath.cs.meta mode change 100644 => 100755 Core/Simulation/Math/Vector2d.cs.meta mode change 100644 => 100755 Core/Simulation/Math/Vector2dHeight.cs mode change 100644 => 100755 Core/Simulation/Math/Vector2dHeight.cs.meta mode change 100644 => 100755 Core/Simulation/Math/Vector3d.cs mode change 100644 => 100755 Core/Simulation/Math/Vector3d.cs.meta mode change 100644 => 100755 Core/Simulation/Pathfinding.meta mode change 100644 => 100755 Core/Simulation/Pathfinding/Pathfinder.cs mode change 100644 => 100755 Core/Simulation/Pathfinding/Pathfinder.cs.meta mode change 100644 => 100755 Core/Simulation/Physics.meta mode change 100644 => 100755 Core/Simulation/Physics/Core.meta mode change 100644 => 100755 Core/Simulation/Physics/Core/CollisionPair.cs mode change 100644 => 100755 Core/Simulation/Physics/Core/CollisionPair.cs.meta mode change 100644 => 100755 Core/Simulation/Physics/Core/Editor.meta mode change 100644 => 100755 Core/Simulation/Physics/Core/Editor/EditorLSBody.cs mode change 100644 => 100755 Core/Simulation/Physics/Core/Editor/EditorLSBody.cs.meta mode change 100644 => 100755 Core/Simulation/Physics/Core/LSBody.cs mode change 100644 => 100755 Core/Simulation/Physics/Core/LSBody.cs.meta mode change 100644 => 100755 Core/Simulation/Physics/Core/LSBodyOverlapCheck.cs mode change 100644 => 100755 Core/Simulation/Physics/Core/LSBodyOverlapCheck.cs.meta mode change 100644 => 100755 Core/Simulation/Physics/Core/Partition.cs mode change 100644 => 100755 Core/Simulation/Physics/Core/Partition.cs.meta mode change 100644 => 100755 Core/Simulation/Physics/Core/PartitionNode.cs mode change 100644 => 100755 Core/Simulation/Physics/Core/PartitionNode.cs.meta mode change 100644 => 100755 Core/Simulation/Physics/Core/PhysicsManager.cs mode change 100644 => 100755 Core/Simulation/Physics/Core/PhysicsManager.cs.meta mode change 100644 => 100755 Core/Simulation/Physics/Core/Settings.meta mode change 100644 => 100755 Core/Simulation/Physics/Core/Settings/PhysicsSettings.cs mode change 100644 => 100755 Core/Simulation/Physics/Core/Settings/PhysicsSettings.cs.meta mode change 100644 => 100755 Core/Simulation/Physics/Raycast.meta mode change 100644 => 100755 Core/Simulation/Physics/Raycast/Raycaster.cs mode change 100644 => 100755 Core/Simulation/Physics/Raycast/Raycaster.cs.meta mode change 100644 => 100755 Core/Simulation/Physics/Raycast/Test.meta mode change 100644 => 100755 Core/Simulation/Physics/Raycast/Test/RaycastTestHelper.cs mode change 100644 => 100755 Core/Simulation/Physics/Raycast/Test/RaycastTestHelper.cs.meta mode change 100644 => 100755 Core/Simulation/Physics/Raycast/Test/RaycastTestScene.unity mode change 100644 => 100755 Core/Simulation/Physics/Raycast/Test/RaycastTestScene.unity.meta mode change 100644 => 100755 Core/UI.meta mode change 100644 => 100755 Core/UI/LSUIWindow.cs mode change 100644 => 100755 Core/UI/LSUIWindow.cs.meta mode change 100644 => 100755 Core/Utility.meta mode change 100644 => 100755 Core/Utility/Array2D.cs mode change 100644 => 100755 Core/Utility/Array2D.cs.meta mode change 100644 => 100755 Core/Utility/CodeHelper.cs mode change 100644 => 100755 Core/Utility/CodeHelper.cs.meta mode change 100644 => 100755 Core/Utility/CoroutineManager.cs mode change 100644 => 100755 Core/Utility/CoroutineManager.cs.meta mode change 100644 => 100755 Core/Utility/Distributor.cs mode change 100644 => 100755 Core/Utility/Distributor.cs.meta mode change 100644 => 100755 Core/Utility/Fast.meta mode change 100644 => 100755 Core/Utility/Fast/BiDictionary.cs mode change 100644 => 100755 Core/Utility/Fast/BiDictionary.cs.meta mode change 100644 => 100755 Core/Utility/Fast/FastBucket.cs mode change 100644 => 100755 Core/Utility/Fast/FastBucket.cs.meta mode change 100644 => 100755 Core/Utility/Fast/FastDictionary.cs mode change 100644 => 100755 Core/Utility/Fast/FastDictionary.cs.meta mode change 100644 => 100755 Core/Utility/Fast/FastHeap.cs mode change 100644 => 100755 Core/Utility/Fast/FastHeap.cs.meta mode change 100644 => 100755 Core/Utility/Fast/FastList.cs mode change 100644 => 100755 Core/Utility/Fast/FastList.cs.meta mode change 100644 => 100755 Core/Utility/Fast/FastQueue.cs mode change 100644 => 100755 Core/Utility/Fast/FastQueue.cs.meta mode change 100644 => 100755 Core/Utility/Fast/FastSorter.cs mode change 100644 => 100755 Core/Utility/Fast/FastSorter.cs.meta mode change 100644 => 100755 Core/Utility/Fast/FastStack.cs mode change 100644 => 100755 Core/Utility/Fast/FastStack.cs.meta mode change 100644 => 100755 Core/Utility/Fast/LSEnumerable.cs mode change 100644 => 100755 Core/Utility/Fast/LSEnumerable.cs.meta mode change 100644 => 100755 Core/Utility/Fast/Tests.meta mode change 100644 => 100755 Core/Utility/Fast/Tests/Array2DTester.cs mode change 100644 => 100755 Core/Utility/Fast/Tests/Array2DTester.cs.meta mode change 100644 => 100755 Core/Utility/LSUtility.cs mode change 100644 => 100755 Core/Utility/LSUtility.cs.meta mode change 100644 => 100755 Core/Utility/MessageSystem.meta mode change 100644 => 100755 Core/Utility/MessageSystem/BaseMessageChannel.cs mode change 100644 => 100755 Core/Utility/MessageSystem/BaseMessageChannel.cs.meta mode change 100644 => 100755 Core/Utility/MessageSystem/BaseMessageStop.cs mode change 100644 => 100755 Core/Utility/MessageSystem/BaseMessageStop.cs.meta mode change 100644 => 100755 Core/Utility/MessageSystem/DefaultMessage.cs mode change 100644 => 100755 Core/Utility/MessageSystem/DefaultMessage.cs.meta mode change 100644 => 100755 Core/Utility/MessageSystem/DefaultMessageRaiser.cs mode change 100644 => 100755 Core/Utility/MessageSystem/DefaultMessageRaiser.cs.meta mode change 100644 => 100755 Core/Utility/MessageSystem/IMessage.cs mode change 100644 => 100755 Core/Utility/MessageSystem/IMessage.cs.meta mode change 100644 => 100755 Core/Utility/MessageSystem/MessageChannel.cs mode change 100644 => 100755 Core/Utility/MessageSystem/MessageChannel.cs.meta mode change 100644 => 100755 Core/Utility/MessageSystem/MessageManager.cs mode change 100644 => 100755 Core/Utility/MessageSystem/MessageManager.cs.meta mode change 100644 => 100755 Core/Utility/MessageSystem/MessageStop.cs mode change 100644 => 100755 Core/Utility/MessageSystem/MessageStop.cs.meta mode change 100644 => 100755 Core/Utility/NDRaycast.meta mode change 100644 => 100755 Core/Utility/NDRaycast/NDRaycast.cs mode change 100644 => 100755 Core/Utility/NDRaycast/NDRaycast.cs.meta mode change 100644 => 100755 Core/Utility/NDRaycast/NDRaycastCollider.cs mode change 100644 => 100755 Core/Utility/NDRaycast/NDRaycastCollider.cs.meta mode change 100644 => 100755 Core/Utility/PathObject.meta mode change 100644 => 100755 Core/Utility/PathObject/Core.meta mode change 100644 => 100755 Core/Utility/PathObject/Core/Editor.meta mode change 100644 => 100755 Core/Utility/PathObject/Core/Editor/EditorPathObject.cs mode change 100644 => 100755 Core/Utility/PathObject/Core/Editor/EditorPathObject.cs.meta mode change 100644 => 100755 Core/Utility/PathObject/Core/Editor/PathObjectUtility.cs mode change 100644 => 100755 Core/Utility/PathObject/Core/Editor/PathObjectUtility.cs.meta mode change 100644 => 100755 Core/Utility/PathObject/Core/PathObject.cs mode change 100644 => 100755 Core/Utility/PathObject/Core/PathObject.cs.meta mode change 100644 => 100755 Core/Utility/PathObject/Core/PathObjectAttribute.cs mode change 100644 => 100755 Core/Utility/PathObject/Core/PathObjectAttribute.cs.meta mode change 100644 => 100755 Core/Utility/PathObject/Core/PathObjectFactory.cs mode change 100644 => 100755 Core/Utility/PathObject/Core/PathObjectFactory.cs.meta mode change 100644 => 100755 Core/Utility/Serialization.meta mode change 100644 => 100755 Core/Utility/Serialization/CerealBehaviour.cs mode change 100644 => 100755 Core/Utility/Serialization/CerealBehaviour.cs.meta mode change 100644 => 100755 Core/Utility/Serialization/Compressor.cs.meta mode change 100644 => 100755 Core/Utility/Serialization/Editor.meta mode change 100644 => 100755 Core/Utility/Serialization/Editor/Injector.cs mode change 100644 => 100755 Core/Utility/Serialization/Editor/Injector.cs.meta mode change 100644 => 100755 Core/Utility/Serialization/FileManager.cs mode change 100644 => 100755 Core/Utility/Serialization/FileManager.cs.meta mode change 100644 => 100755 Core/Utility/Serialization/Reader.cs mode change 100644 => 100755 Core/Utility/Serialization/Reader.cs.meta mode change 100644 => 100755 Core/Utility/Serialization/Writer.cs mode change 100644 => 100755 Core/Utility/Serialization/Writer.cs.meta mode change 100644 => 100755 Core/Utility/Triggers.meta mode change 100644 => 100755 Core/Utility/Triggers/Default.meta mode change 100644 => 100755 Core/Utility/Triggers/Default/Contact.meta mode change 100644 => 100755 Core/Utility/Triggers/Default/Contact/ContactMessage.cs mode change 100644 => 100755 Core/Utility/Triggers/Default/Contact/ContactMessage.cs.meta mode change 100644 => 100755 Core/Utility/Triggers/Default/Contact/ContactTrigger.cs mode change 100644 => 100755 Core/Utility/Triggers/Default/Contact/ContactTrigger.cs.meta mode change 100644 => 100755 Core/Utility/Triggers/LSTrigger.cs mode change 100644 => 100755 Core/Utility/Triggers/LSTrigger.cs.meta mode change 100644 => 100755 Core/Utility/Triggers/TriggerManager.cs mode change 100644 => 100755 Core/Utility/Triggers/TriggerManager.cs.meta diff --git a/Core/Game.meta b/Core/Game.meta old mode 100644 new mode 100755 diff --git a/Core/Game/Abilities.meta b/Core/Game/Abilities.meta old mode 100644 new mode 100755 diff --git a/Core/Game/Abilities/Ability.cs b/Core/Game/Abilities/Ability.cs old mode 100644 new mode 100755 index 89a2301f..90cd76f7 --- a/Core/Game/Abilities/Ability.cs +++ b/Core/Game/Abilities/Ability.cs @@ -70,7 +70,8 @@ internal void Setup(LSAgent agent, int id) System.Type mainType = this.GetType(); if (mainType.IsSubclassOf(typeof(ActiveAbility))) { - while ( mainType.BaseType != typeof(ActiveAbility)) + while ( mainType.BaseType != typeof(ActiveAbility) && + mainType.GetCustomAttributes(typeof (CustomActiveAbilityAttribute),false).Length == 0) { mainType = mainType.BaseType; } diff --git a/Core/Game/Abilities/Ability.cs.meta b/Core/Game/Abilities/Ability.cs.meta old mode 100644 new mode 100755 diff --git a/Core/Game/Abilities/AbilityManager.cs b/Core/Game/Abilities/AbilityManager.cs old mode 100644 new mode 100755 diff --git a/Core/Game/Abilities/AbilityManager.cs.meta b/Core/Game/Abilities/AbilityManager.cs.meta old mode 100644 new mode 100755 diff --git a/Core/Game/Abilities/ActiveAbility.cs b/Core/Game/Abilities/ActiveAbility.cs old mode 100644 new mode 100755 index 0fc54b1e..5e1aae88 --- a/Core/Game/Abilities/ActiveAbility.cs +++ b/Core/Game/Abilities/ActiveAbility.cs @@ -2,7 +2,7 @@ using Lockstep.Data; namespace Lockstep { public abstract class ActiveAbility : Ability { - + const bool UseCooldown = true; [SerializeField,FrameCount] protected int _cooldown; public int Cooldown {get {return _cooldown;}} @@ -17,9 +17,10 @@ protected sealed override void TemplateSetup () ListenInput = Data.ListenInputID; } - public void Execute(Command com) { + public void Execute(Command com) + { - if (Heat <= 0) { + if (Heat <= 0 || UseCooldown == false) { OnExecute(com); Heat = Cooldown; } diff --git a/Core/Game/Abilities/ActiveAbility.cs.meta b/Core/Game/Abilities/ActiveAbility.cs.meta old mode 100644 new mode 100755 diff --git a/Core/Game/Abilities/BehaviourHelper.meta b/Core/Game/Abilities/BehaviourHelper.meta old mode 100644 new mode 100755 diff --git a/Core/Game/Abilities/BehaviourHelper/BehaviourHelper.cs b/Core/Game/Abilities/BehaviourHelper/BehaviourHelper.cs old mode 100644 new mode 100755 diff --git a/Core/Game/Abilities/BehaviourHelper/BehaviourHelper.cs.meta b/Core/Game/Abilities/BehaviourHelper/BehaviourHelper.cs.meta old mode 100644 new mode 100755 diff --git a/Core/Game/Abilities/BehaviourHelper/BehaviourHelperManager.cs b/Core/Game/Abilities/BehaviourHelper/BehaviourHelperManager.cs old mode 100644 new mode 100755 diff --git a/Core/Game/Abilities/BehaviourHelper/BehaviourHelperManager.cs.meta b/Core/Game/Abilities/BehaviourHelper/BehaviourHelperManager.cs.meta old mode 100644 new mode 100755 diff --git a/Core/Game/Abilities/BehaviourHelper/DefaultHelperSetup.cs b/Core/Game/Abilities/BehaviourHelper/DefaultHelperSetup.cs old mode 100644 new mode 100755 diff --git a/Core/Game/Abilities/BehaviourHelper/DefaultHelperSetup.cs.meta b/Core/Game/Abilities/BehaviourHelper/DefaultHelperSetup.cs.meta old mode 100644 new mode 100755 diff --git a/Core/Game/Abilities/BehaviourHelper/IBehaviourHelper.cs b/Core/Game/Abilities/BehaviourHelper/IBehaviourHelper.cs old mode 100644 new mode 100755 diff --git a/Core/Game/Abilities/BehaviourHelper/IBehaviourHelper.cs.meta b/Core/Game/Abilities/BehaviourHelper/IBehaviourHelper.cs.meta old mode 100644 new mode 100755 diff --git a/Core/Game/Abilities/Essential.meta b/Core/Game/Abilities/Essential.meta old mode 100644 new mode 100755 diff --git a/Core/Game/Abilities/Essential/Health.cs b/Core/Game/Abilities/Essential/Health.cs old mode 100644 new mode 100755 index cb282bde..fab74cc3 --- a/Core/Game/Abilities/Essential/Health.cs +++ b/Core/Game/Abilities/Essential/Health.cs @@ -9,9 +9,28 @@ public class Health : Ability [SerializeField, FixedNumber] private long _maxHealth = FixedMath.One * 100; + public long BaseHealth {get {return _maxHealth;}} + public long MaxHealth { - get { return _maxHealth; } + get { return _maxHealth + MaxHealthModifier; } + } + + private long _maxHealthModifier; + [Lockstep (true)] + public long MaxHealthModifier { + get { + return _maxHealthModifier; + } + set { + if (value != _maxHealthModifier) { + long dif = _maxHealthModifier - value; + if (dif > 0) { + this.TakeDamage(-dif); + _maxHealthModifier = value; + } + } + } } public long DamageMultiplier @@ -20,7 +39,8 @@ public long DamageMultiplier set; } - public event Action onHealthChange; + public event Action onHealthChange ; + public event Action onHealthDelta; public bool CanLose { get { @@ -44,13 +64,18 @@ public long HealthAmount } set { + long delta = value - _currentHealth; _currentHealth = value; if (onHealthChange != null) onHealthChange(); + if (onHealthDelta != null) + onHealthDelta (delta); } } + public LSAgent LastDamageSource { get; set;} + protected override void OnSetup() { } @@ -59,6 +84,8 @@ protected override void OnInitialize() { HealthAmount = MaxHealth; OnTakeProjectile = null; + MaxHealthModifier = 0; + LastDamageSource = null; } public void TakeProjectile(LSProjectile projectile) @@ -72,13 +99,14 @@ public void TakeProjectile(LSProjectile projectile) TakeDamage(projectile.CheckExclusiveDamage(Agent.Tag)); } } - - public void TakeDamage(long damage) + public void TakeDamage(long damage, LSAgent source = null) { if (damage >= 0) { damage.Mul(DamageMultiplier); HealthAmount -= damage; + if (source != null) + LastDamageSource = source; // don't let the health go below zero if (HealthAmount <= 0) { diff --git a/Core/Game/Abilities/Essential/Health.cs.meta b/Core/Game/Abilities/Essential/Health.cs.meta old mode 100644 new mode 100755 diff --git a/Core/Game/Abilities/Essential/HeightSet.cs b/Core/Game/Abilities/Essential/HeightSet.cs old mode 100644 new mode 100755 index 7962bb93..493a7b26 --- a/Core/Game/Abilities/Essential/HeightSet.cs +++ b/Core/Game/Abilities/Essential/HeightSet.cs @@ -33,12 +33,16 @@ public long Offset public bool ForceUpdate { get; set; } + public void UpdateHeight () { + long height = HeightmapHelper.Instance.GetHeight(MapIndex, Agent.Body.Position) + _bonusHeight + Offset; + Agent.Body.HeightPos = height; + } + protected override void OnSimulate() { if (Agent.Body.PositionChanged || Agent.Body.PositionChangedBuffer || ForceUpdate) { - long height = HeightmapHelper.Instance.GetHeight(MapIndex, Agent.Body.Position) + _bonusHeight + Offset; - Agent.Body.HeightPos = height; + UpdateHeight (); } } } diff --git a/Core/Game/Abilities/Essential/HeightSet.cs.meta b/Core/Game/Abilities/Essential/HeightSet.cs.meta old mode 100644 new mode 100755 diff --git a/Core/Game/Abilities/Essential/Move.cs b/Core/Game/Abilities/Essential/Move.cs old mode 100644 new mode 100755 index 055f81fc..c6fa9302 --- a/Core/Game/Abilities/Essential/Move.cs +++ b/Core/Game/Abilities/Essential/Move.cs @@ -59,7 +59,6 @@ private int StraightRepathRate private bool forcePathfind { get; set; } - private Vector2d lastPosition; private bool collisionTicked; private int stuckTick; @@ -78,6 +77,8 @@ private int StraightRepathRate private LSBody cachedBody {get; set;} private Turn CachedTurn {get; set;} + public Vector2d LastPosition {get; set;} + public long timescaledSpeed { get @@ -92,8 +93,9 @@ public long timescaledSpeed private long collisionStopTreshold; private long timescaledAcceleration; + [Lockstep (true)] public long AdditiveSpeedModifier { get; set; } - + [Lockstep (true)] public long MultiplicativeSpeedModifier { get; set; } private Vector2d lastTargetPos; @@ -129,10 +131,7 @@ public bool CanMove { public virtual long Speed { - get { return _speed; } - //set { _speed = value; } - //This'll make Speed indeterministic across multiple sessions since the original value isn't stored and reset - //Underlying value can't be changed but we can make Speed virtual to return a modified value + get { return _speed ; } } @@ -184,12 +183,13 @@ protected override void OnInitialize() stuckTick = 0; forcePathfind = false; - lastPosition = Vector2d.zero; lastMovementDirection = Vector2d.up; Arrived = true; + LastPosition = Agent.Body.Position; } + public int StopTimer; protected override void OnSimulate() { @@ -318,8 +318,21 @@ protected override void OnSimulate() if (CanTurn) CachedTurn.StartTurnDirection(movementDirection); } + + long threshold = this.timescaledSpeed / 4; + + if ((Agent.Body.Position - this.LastPosition).FastMagnitude () < (threshold * threshold)) { + StopTimer++; + if (StopTimer >= LockstepManager.FrameRate) { + StopTimer = 0; + this.Arrive (); + } + } else { + StopTimer = 0; + } } else { + StopTimer = 0; if (distance < FixedMath.Mul(closingDistance, CollisionStopMultiplier)) { Arrive(); @@ -356,6 +369,8 @@ protected override void OnSimulate() } stopTime++; } + LastPosition = Agent.Body.Position; + } public Command LastCommand; @@ -389,13 +404,15 @@ public void RegisterGroup(bool moveOnProcessed = true) public void Arrive() { - if (onArrive.IsNotNull()) - { - onArrive(); - } - this.OnArrive(); - Arrived = true; + StopMove(); + + if (onArrive.IsNotNull()) + { + onArrive(); + } + this.OnArrive(); + Arrived = true; } protected virtual void OnArrive () { @@ -469,6 +486,7 @@ public void StartMove(Vector2d destination) forcePathfind = false; if (onStartMove != null) onStartMove (); + } } diff --git a/Core/Game/Abilities/Essential/Move.cs.meta b/Core/Game/Abilities/Essential/Move.cs.meta old mode 100644 new mode 100755 diff --git a/Core/Game/Abilities/Essential/Scan.cs b/Core/Game/Abilities/Essential/Scan.cs old mode 100644 new mode 100755 index 2ea84cd7..98c4f69d --- a/Core/Game/Abilities/Essential/Scan.cs +++ b/Core/Game/Abilities/Essential/Scan.cs @@ -4,570 +4,601 @@ namespace Lockstep { - [UnityEngine.DisallowMultipleComponent] - public class Scan : ActiveAbility - { - private const int SearchRate = (int)(LockstepManager.FrameRate / 2); - public const long MissModifier = FixedMath.One / 2; - - public virtual bool CanMove { get; private set; } - - protected bool CanTurn { get; private set; } - - public LSAgent Target { get; private set; } - - - - public bool HasTarget - { - get { return _hasTarget; } - set - { - if (_hasTarget != value) - { - _hasTarget = value; - if (CanMove) - { - if (_hasTarget) - { - cachedMove.CanCollisionStop = false; - } else - { - cachedMove.CanCollisionStop = true; - } - } - } - } - } - - public virtual string ProjCode { get { return _projectileCode; } } - - public virtual long Range { get { return _range; } } - //Range - - public virtual long Sight { get { return _sight; } } - //Approximate radius that's scanned for targets - - public virtual long Damage { get { return _damage; } } - //Damage of attack - - public virtual int AttackRate { get { return _attackRate; } } - //Frames between each attack - - public virtual bool TrackAttackAngle { get { return _trackAttackAngle; } } - //Whether or not to require the unit to face the target for attacking - - public long AttackAngle { get { return _attackAngle; } } - //The angle in front of the unit that the target must be located in - - protected virtual AllegianceType TargetAllegiance //Allegiance to the target - { - get { return this._targetAllegiance; } - } - - - public Vector3d ProjectileOffset { get { return _projectileOffset; } } - //Offset of projectile - - #region Serialized Values (Further description in properties) - - [SerializeField,DataCode("Projectiles")] - protected string _projectileCode; - [FixedNumber, SerializeField] - protected long _range = FixedMath.One * 6; - [FixedNumber, SerializeField] - protected long _sight = FixedMath.One * 10; - [FixedNumber, SerializeField] - protected long _damage = FixedMath.One; - [FrameCount, SerializeField] - protected int _attackRate = 1 * LockstepManager.FrameRate; - [SerializeField, EnumMask] - protected AllegianceType _targetAllegiance = AllegianceType.Enemy; - - [SerializeField] - protected bool _trackAttackAngle = true; - [FixedNumberAngle, SerializeField] - protected long _attackAngle = FixedMath.TenDegrees; - [SerializeField] - protected Vector3d _projectileOffset; - [SerializeField, FixedNumber] - protected long _energyCost; - [SerializeField,FrameCount] - protected int _windup; - - #endregion - - public int Windup { get { return _windup; } } - - [SerializeField] - protected bool _increasePriority = true; - - public virtual bool IncreasePriority { get { return _increasePriority; } } - - - //Stuff for the logic - private bool inRange; - private long fastRange; - private long fastRangeToTarget; - private Vector2d Destination; - private int attackFrameCount; - private Move cachedMove; - private Turn cachedTurn; - - protected LSBody cachedBody { get { return Agent.Body; } } - - private int basePriority; - private Health cachedTargetHealth; - private uint targetVersion; - private int searchCount; - private int attackCount; - private bool _hasTarget; - private bool isAttackMoving; - private bool isFocused; - - protected override void OnSetup() - { - cachedTurn = Agent.GetAbility(); - cachedMove = Agent.GetAbility(); - if (Sight < Range) - _sight = Range; - - fastRange = (Range * Range); - attackFrameCount = AttackRate; - basePriority = cachedBody.Priority; - CanMove = cachedMove.IsNotNull(); - if (CanMove) - { - cachedMove.onArrive += HandleOnArrive; - cachedMove.onGroupProcessed += _HandleMoveGroupProcessed; - } - - CanTurn = cachedTurn.IsNotNull(); - CachedOnHit = OnHit; - CachedAgentValid = this.AgentValid; - } - - private void HandleOnArrive() - { - if (this.isAttackMoving) - { - if (this.HasTarget == false) - isAttackMoving = false; - } - } - - protected override void OnInitialize() - { - cachedBody.Priority = basePriority; - searchCount = LSUtility.GetRandom(SearchRate) + 1; - attackCount = 0; - HasTarget = false; - Target = null; - isAttackMoving = false; - inRange = false; - isFocused = false; - - this.Destination = Vector2d.zero; - } - - protected override void OnSimulate() - { - - attackCount--; - if (HasTarget) - { - BehaveWithTarget(); - } else - { - BehaveWithNoTarget(); - } - } - - [Lockstep(true)] - public bool IsWindingUp { get; set; } - - int windupCount; - - void StartWindup() - { - windupCount = this.Windup; - IsWindingUp = true; - Agent.ApplyImpulse(AnimImpulse.Fire); - OnStartWindup (); - } - - protected virtual void OnStartWindup () { - - } - protected virtual AnimState EngagingAnimState { - get { return AnimState.Engaging;} - } - void BehaveWithTarget() - { - if (Target.IsActive == false || Target.SpawnVersion != targetVersion) - { - StopEngage(); - BehaveWithNoTarget(); - return; - } - if (IsWindingUp) - { - windupCount--; - if (windupCount < 0) - { - Fire(); - this.attackCount = this.attackFrameCount - this.Windup; - IsWindingUp = false; - } - } else - { - Vector2d targetDirection = Target.Body._position - cachedBody._position; - long fastMag = targetDirection.FastMagnitude(); - - if (fastMag <= fastRangeToTarget) - { - if (!inRange) - { - if (CanMove) - cachedMove.StopMove(); - } - Agent.SetState(EngagingAnimState); - long mag; - targetDirection.Normalize(out mag); - bool withinTurn = TrackAttackAngle == false || - (fastMag != 0 && - cachedBody.Forward.Dot(targetDirection.x, targetDirection.y) > 0 - && cachedBody.Forward.Cross(targetDirection.x, targetDirection.y).Abs() <= AttackAngle); - bool needTurn = mag != 0 && !withinTurn; - if (needTurn) - { - if (CanTurn) - { - cachedTurn.StartTurnDirection(targetDirection); - } else - { - - } - } else - { - if (attackCount <= 0) - { - StartWindup(); - } - } - - if (inRange == false) - { - inRange = true; - } - } else - { - if (CanMove) - { - if (cachedMove.IsMoving == false) - { - cachedMove.StartMove(Target.Body._position); - cachedBody.Priority = basePriority; - } else - { - if (Target.Body.PositionChanged || inRange) - { - cachedMove.Destination = Target.Body._position; - } - } - } + [UnityEngine.DisallowMultipleComponent] + public class Scan : ActiveAbility + { + private const int SearchRate = (int)(LockstepManager.FrameRate / 2); + public const long MissModifier = FixedMath.One / 2; + + public virtual bool CanMove { get; private set; } + + protected bool CanTurn { get; private set; } + + public LSAgent Target { get; private set; } + + + + public bool HasTarget { + get { return _hasTarget; } + set { + if (_hasTarget != value) { + _hasTarget = value; + if (CanMove) { + if (_hasTarget) { + cachedMove.CanCollisionStop = false; + } else { + cachedMove.CanCollisionStop = true; + } + } + } + } + } + + public virtual string ProjCode { get { return _projectileCode; } } + + public virtual long Range { get { return _range + RangeModifier; } } + + public long BaseRange { get { return _range; } } + //Range + + [Lockstep (true)] + public long RangeModifier { get; set; } + + public virtual long Sight { get { return _sight; } } + //Approximate radius that's scanned for targets + + public virtual long Damage { get { return _damage; } } + //Damage of attack + + public long BaseDamage { get { return _damage; } } + + + public virtual int AttackRate { get { return _attackRate; } } + //Frames between each attack + + public virtual bool TrackAttackAngle { get { return _trackAttackAngle; } } + //Whether or not to require the unit to face the target for attacking + + public long AttackAngle { get { return _attackAngle; } } + //The angle in front of the unit that the target must be located in + + protected virtual AllegianceType TargetAllegiance { //Allegiance to the target + get { return this._targetAllegiance; } + } + + + public virtual Vector3d ProjectileOffset { get { return _projectileOffset; } } + + private Vector3d[] cachedProjectileOffsets; + + public virtual Vector3d[] ProjectileOffsets { + get { + if (cachedProjectileOffsets == null) { + cachedProjectileOffsets = new Vector3d[this._secondaryProjectileOffsets.Length + 1]; + cachedProjectileOffsets [0] = this.ProjectileOffset; + for (int i = 0; i < this._secondaryProjectileOffsets.Length; i++) { + cachedProjectileOffsets [i + 1] = this._secondaryProjectileOffsets [i]; + } + } + return cachedProjectileOffsets; + } + } + public bool CycleProjectiles { get { return this._cycleProjectiles; } } + //Offset of projectile + + #region Serialized Values (Further description in properties) + + [SerializeField,DataCode ("Projectiles")] + protected string _projectileCode; + [FixedNumber, SerializeField] + protected long _range = FixedMath.One * 6; + [FixedNumber, SerializeField] + protected long _sight = FixedMath.One * 10; + [FixedNumber, SerializeField] + protected long _damage = FixedMath.One; + [FrameCount, SerializeField] + protected int _attackRate = 1 * LockstepManager.FrameRate; + [SerializeField, EnumMask] + protected AllegianceType _targetAllegiance = AllegianceType.Enemy; + + [SerializeField] + protected bool _trackAttackAngle = true; + [FixedNumberAngle, SerializeField] + protected long _attackAngle = FixedMath.TenDegrees; + [SerializeField] + protected Vector3d _projectileOffset; + [SerializeField] + protected Vector3d[] _secondaryProjectileOffsets; + [SerializeField] + private bool _cycleProjectiles; + [SerializeField,FrameCount] + protected int _windup; + + #endregion + + public int Windup { get { return _windup; } } + + [SerializeField] + protected bool _increasePriority = true; + + public virtual bool IncreasePriority { get { return _increasePriority; } } + + + //Stuff for the logic + private bool inRange; + private long fastRange; + private long fastRangeToTarget; + private Vector2d Destination; + private int attackFrameCount; + private Move cachedMove; + private Turn cachedTurn; + + protected LSBody cachedBody { get { return Agent.Body; } } + + private int basePriority; + private Health cachedTargetHealth; + private uint targetVersion; + private int searchCount; + private int attackCount; + private bool _hasTarget; + private bool isAttackMoving; + private bool isFocused; + + protected override void OnSetup () + { + cachedTurn = Agent.GetAbility (); + cachedMove = Agent.GetAbility (); + if (Sight < Range) + _sight = Range; + + fastRange = (Range * Range); + attackFrameCount = AttackRate; + basePriority = cachedBody.Priority; + CanMove = cachedMove.IsNotNull (); + if (CanMove) { + cachedMove.onArrive += HandleOnArrive; + cachedMove.onGroupProcessed += _HandleMoveGroupProcessed; + } + + CanTurn = cachedTurn.IsNotNull (); + CachedOnHit = OnHit; + CachedAgentValid = this.AgentValid; + } + + private void HandleOnArrive () + { + if (this.isAttackMoving) { + if (this.HasTarget == false) + isAttackMoving = false; + } + } + + protected override void OnInitialize () + { + cachedBody.Priority = basePriority; + searchCount = LSUtility.GetRandom (SearchRate) + 1; + attackCount = 0; + HasTarget = false; + Target = null; + isAttackMoving = false; + inRange = false; + isFocused = false; + CycleCount = 0; + + this.Destination = Vector2d.zero; + } + + protected override void OnSimulate () + { + + attackCount--; + if (HasTarget) { + BehaveWithTarget (); + } else { + BehaveWithNoTarget (); + } + } + + [Lockstep (true)] + public bool IsWindingUp { get; set; } + + int windupCount; + + void StartWindup () + { + windupCount = this.Windup; + IsWindingUp = true; + Agent.ApplyImpulse (this.FireAnimImpulse); + OnStartWindup (); + } + + protected virtual void OnStartWindup () + { + + } + + protected virtual AnimState EngagingAnimState { + get { return AnimState.Engaging; } + } + + protected virtual AnimImpulse FireAnimImpulse { + get { return AnimImpulse.Fire; } + } + + void BehaveWithTarget () + { + if (Target.IsActive == false || Target.SpawnVersion != targetVersion || + (this.TargetAllegiance & Agent.GetAllegiance(Target)) == 0) { + StopEngage (); + BehaveWithNoTarget (); + return; + } + if (IsWindingUp) { + windupCount--; + if (windupCount < 0) { + if (this.AgentConditional (Target)) { + Fire (); + this.attackCount = this.attackFrameCount - this.Windup; + IsWindingUp = false; + } else { + StopEngage (); + this.ScanAndEngage (); + } + } + } else { + Vector2d targetDirection = Target.Body._position - cachedBody._position; + long fastMag = targetDirection.FastMagnitude (); + + if (fastMag <= fastRangeToTarget) { + if (!inRange) { + if (CanMove) + cachedMove.StopMove (); + + } + Agent.SetState (EngagingAnimState); + + long mag; + targetDirection.Normalize (out mag); + bool withinTurn = TrackAttackAngle == false || + (fastMag != 0 && + cachedBody.Forward.Dot (targetDirection.x, targetDirection.y) > 0 + && cachedBody.Forward.Cross (targetDirection.x, targetDirection.y).Abs () <= AttackAngle); + bool needTurn = mag != 0 && !withinTurn; + if (needTurn) { + if (CanTurn) { + cachedTurn.StartTurnDirection (targetDirection); + } else { + + } + } else { + if (attackCount <= 0) { + StartWindup (); + } + } + + if (inRange == false) { + inRange = true; + } + } else { + if (CanMove) { + if (cachedMove.IsMoving == false) { + cachedMove.StartMove (Target.Body._position); + cachedBody.Priority = basePriority; + } else { + if (Target.Body.PositionChangedBuffer || inRange) { + cachedMove.Destination = Target.Body._position; + } + } + } - if (isAttackMoving || isFocused == false) - { - searchCount -= 1; - if (searchCount <= 0) - { - searchCount = SearchRate; - if (ScanAndEngage()) - { - } else - { - } - } - } - if (inRange == true) - { - inRange = false; - } + if (isAttackMoving || isFocused == false) { + searchCount -= 1; + if (searchCount <= 0) { + searchCount = SearchRate; + if (ScanAndEngage ()) { + } else { + } + } + } + if (inRange == true) { + inRange = false; + } - } - } - } - - void BehaveWithNoTarget() - { - if (isAttackMoving || Agent.IsCasting == false) - { - if (isAttackMoving) - { - { - searchCount -= 8; - } - } else - { - searchCount -= 2; - } - if (searchCount <= 0) - { - searchCount = SearchRate; - if (ScanAndEngage()) - { - } - } - } - } - - protected virtual void OnHit(LSAgent agent) - { - Health healther = agent.GetAbility(); - healther.TakeDamage(_damage); - } - - private Action CachedOnHit; - - public void Fire() - { - - if (CanMove) - { - cachedMove.StopMove(); - } - cachedBody.Priority = IncreasePriority ? basePriority + 1 : basePriority; - ; - OnFire(); - - } - - protected virtual void OnFire() - { - long appliedDamage = Damage; - - LSProjectile projectile = ProjectileManager.Create( - ProjCode, - this.Agent, - this.ProjectileOffset, - this.TargetAllegiance, - (other) => - { - Health healther = other.GetAbility(); - return healther.IsNotNull() && healther.HealthAmount > 0; - - }, - CachedOnHit); - - switch (projectile.TargetingBehavior) - { - case TargetingType.Homing: - projectile.InitializeHoming(this.Target); - break; - case TargetingType.Timed: - projectile.InitializeTimed(); - break; - case TargetingType.Positional: - projectile.InitializePositional(Target.Body.Position.ToVector3d(Target.Body.HeightPos)); - break; - case TargetingType.Free: + } + } + } + + void BehaveWithNoTarget () + { + if (isAttackMoving || Agent.IsCasting == false) { + if (isAttackMoving) { + { + searchCount -= 8; + } + } else { + searchCount -= 2; + } + if (searchCount <= 0) { + searchCount = SearchRate; + if (ScanAndEngage ()) { + } + } + } + } + + public event Action ExtraOnHit; + + protected virtual void OnHit (LSAgent agent) + { + Health healther = agent.GetAbility (); + healther.TakeDamage (Damage); + if (ExtraOnHit != null) + ExtraOnHit(agent); + } + + private Action CachedOnHit; + + public void Fire () + { + + if (CanMove) { + cachedMove.StopMove (); + } + cachedBody.Priority = IncreasePriority ? basePriority + 1 : basePriority; + + OnFire (Target); + ProjectileManager.Fire (CurrentProjectile); + + } + + /// + /// The projectile to be fired in OnFire. + /// + /// The current projectile. + public LSProjectile CurrentProjectile { get; private set; } + + public int CycleCount {get; private set;} + protected virtual void OnFire (LSAgent target) + { + if (this.CycleProjectiles) { + CycleCount++; + if (CycleCount >= ProjectileOffsets.Length) { + CycleCount = 0; + } + FireProjectile (ProjectileOffsets [CycleCount], target); + + } else { + for (int i = 0; i < ProjectileOffsets.Length; i++) { + FireProjectile (ProjectileOffsets [i], target); + } + } + } + protected void FireProjectile (Vector3d projOffset, LSAgent target) { + CurrentProjectile = ProjectileManager.Create ( + ProjCode, + this.Agent, + projOffset, + this.TargetAllegiance, + (other) => { + Health healther = other.GetAbility (); + return healther.IsNotNull () && healther.HealthAmount > 0; + + }, + CachedOnHit); + + switch (CurrentProjectile.TargetingBehavior) { + case TargetingType.Homing: + CurrentProjectile.InitializeHoming (target); + break; + case TargetingType.Timed: + CurrentProjectile.InitializeTimed (); + break; + case TargetingType.Positional: + CurrentProjectile.InitializePositional (target.Body.Position.ToVector3d (target.Body.HeightPos)); + break; + case TargetingType.Free: //TODO - throw new System.Exception("Not implemented yet."); - break; - } - ProjectileManager.Fire(projectile); - } - - public void Engage(LSAgent other) - { - if (other != Agent) - { - cachedTargetHealth = other.GetAbility(); - if (cachedTargetHealth.IsNotNull()) - { - Target = other; - - HasTarget = true; - targetVersion = Target.SpawnVersion; - IsCasting = true; - fastRangeToTarget = Range + (Target.Body.IsNotNull() ? Target.Body.Radius : 0); - fastRangeToTarget *= fastRangeToTarget; - } - } - } - - public void StopEngage(bool complete = false) - { - isFocused = false; - if (complete) - { - isAttackMoving = false; - } else - { - if (isAttackMoving) - { - if (ScanAndEngage() == false) - { - cachedMove.StartMove(this.Destination); - } else - { - } - } else - { - if (CanMove) - { - if (HasTarget && inRange == false) - { - cachedMove.StopMove(); - } - } - } - } - - HasTarget = false; - Target = null; - cachedBody.Priority = basePriority; - - IsCasting = false; - } - - protected override void OnDeactivate() - { - StopEngage(true); - } - - protected override void OnExecute(Command com) - { - Agent.StopCast(this.ID); - Vector2d pos; - DefaultData target; - if (com.TryGetData(out pos) && CanMove) - { - - if (HasTarget) - { - cachedMove.RegisterGroup(false); - } else - { - cachedMove.RegisterGroup(); - } - - isAttackMoving = true; - isFocused = false; - - } else if (com.TryGetData(out target) && target.Is(DataType.UShort)) - { - isFocused = true; - isAttackMoving = false; - LSAgent tempTarget; - DefaultData data; - ushort targetValue = (ushort)target.Value; - AgentController.TryGetAgentInstance(targetValue, out tempTarget); - Engage(tempTarget); - } + throw new System.Exception ("Not implemented yet."); + break; + } + } + public void FireProjectile(string projCode, Vector3d projOffset, Vector3d targetPos) + { + CurrentProjectile = ProjectileManager.Create( + projCode, + this.Agent, + projOffset, + this.TargetAllegiance, + (other) => + { + Health healther = other.GetAbility(); + return healther.IsNotNull() && healther.HealthAmount > 0; + + }, + CachedOnHit); + + switch (CurrentProjectile.TargetingBehavior) + { + case TargetingType.Timed: + CurrentProjectile.InitializeTimed(); + break; + case TargetingType.Positional: + CurrentProjectile.InitializePositional(targetPos); + break; + case TargetingType.Free: + //TODO + throw new System.Exception("Not implemented yet."); + break; + } + } + + public void Engage (LSAgent other) + { + if (other != Agent) { + cachedTargetHealth = other.GetAbility (); + if (cachedTargetHealth.IsNotNull ()) { + OnEngage(other); + + Target = other; + + HasTarget = true; + targetVersion = Target.SpawnVersion; + IsCasting = true; + fastRangeToTarget = Range + (Target.Body.IsNotNull () ? Target.Body.Radius : 0); + fastRangeToTarget *= fastRangeToTarget; + } + } + } + protected virtual void OnEngage(LSAgent target) + { + + } + + public void StopEngage (bool complete = false) + { + isFocused = false; + if (complete) { + isAttackMoving = false; + } else { + if (isAttackMoving) { + if (ScanAndEngage () == false) { + cachedMove.StartMove (this.Destination); + } else { + } + } else { + if (CanMove) { + if (HasTarget && inRange == false) { + cachedMove.StopMove (); + } + } + } + } + + HasTarget = false; + Target = null; + cachedBody.Priority = basePriority; + + IsCasting = false; + } + + protected override void OnDeactivate () + { + StopEngage (true); + } + + protected override void OnExecute (Command com) + { + Agent.StopCast (this.ID); + Vector2d pos; + DefaultData target; + if (com.TryGetData (out pos) && CanMove) { + + if (HasTarget) { + cachedMove.RegisterGroup (false); + } else { + cachedMove.RegisterGroup (); + } + + isAttackMoving = true; + isFocused = false; + + } else if (com.TryGetData (out target) && target.Is (DataType.UShort)) { + isFocused = true; + isAttackMoving = false; + LSAgent tempTarget; + DefaultData data; + ushort targetValue = (ushort)target.Value; + AgentController.TryGetAgentInstance (targetValue, out tempTarget); + Engage (tempTarget); + } - } - - protected sealed override void OnStopCast() - { - StopEngage(true); - } - - Action _handleMoveGroupProcessed; - - Action _HandleMoveGroupProcessed { get { return _handleMoveGroupProcessed ?? (_handleMoveGroupProcessed = HandleMoveGroupProcessed); } } - - void HandleMoveGroupProcessed() - { - this.Destination = cachedMove.Destination; - } - - private bool ScanAndEngage() - { - LSAgent agent = DoScan(); - if (agent == null || HasTarget && agent == Target) - { - return false; - } else - { - Engage(agent); - return true; - } - } - - protected virtual bool AgentValid(LSAgent agent) - { - return true; - } - private Func CachedAgentValid; - protected virtual LSAgent DoScan() - { + } + + protected sealed override void OnStopCast () + { + StopEngage (true); + } + + Action _handleMoveGroupProcessed; + + Action _HandleMoveGroupProcessed { get { return _handleMoveGroupProcessed ?? (_handleMoveGroupProcessed = HandleMoveGroupProcessed); } } + + void HandleMoveGroupProcessed () + { + this.Destination = cachedMove.Destination; + } + + private bool ScanAndEngage () + { + LSAgent agent = DoScan (); + if (agent == null || HasTarget && agent == Target) { + return false; + } else { + Engage (agent); + return true; + } + } + + protected virtual bool AgentValid (LSAgent agent) + { + return true; + } + + private Func CachedAgentValid; + + protected Func AgentConditional { + get { + Func agentConditional = null; + + if (this.Damage >= 0) { + agentConditional = (other) => { + Health health = other.GetAbility (); + return Agent.GlobalID != other.GlobalID && health != null && health.CanLose && CachedAgentValid (other); + }; + } else { + agentConditional = (other) => { + Health health = other.GetAbility (); + return Agent.GlobalID != other.GlobalID && health != null && health.CanGain && CachedAgentValid (other); + }; + } + return agentConditional; + } + } + + protected virtual LSAgent DoScan () + { - Func agentConditional = null; - if (this._damage >= 0) - { - agentConditional = (other) => - { - Health health = other.GetAbility(); - return Agent.GlobalID != other.GlobalID && health != null && health.CanLose && CachedAgentValid(other); - }; - } else - { - agentConditional = (other) => - { - Health health = other.GetAbility(); - return Agent.GlobalID != other.GlobalID && health != null && health.CanGain && CachedAgentValid(other); - }; - } - LSAgent agent = InfluenceManager.Scan( - this.cachedBody.Position, - this.Sight, - agentConditional, - (bite) => - { - return ((this.Agent.Controller.GetAllegiance(bite) & this.TargetAllegiance) != 0); - - } - ); - - return agent; - } - - public bool ScanWithinRangeAndEngage() - { - LSAgent agent = this.DoScan(); - if (agent == null) - { - return false; - } else - { - Engage(agent); - return true; - } - } - #if UNITY_EDITOR - [SerializeField, Visualize] - private Vector3 _projectileOrigin = Vector3.forward; - - /* - protected override void OnAfterSerialize() - { - if (transform.position != Vector3.zero) - { - Debug.LogWarning("Visual editting can only be used when transform is at origin."); - return; - } - Vector3 temp = (base.transform.InverseTransformPoint(_projectileOrigin)); - temp *= base.transform.localScale.x; - _projectileOffset = new Vector3d(temp); - }*/ - - void OnDrawGizmos() - { - Gizmos.DrawWireSphere(Application.isPlaying ? Agent.Body._visualPosition : this.transform.position, this.Range.ToFloat()); - } - #endif - } + Func agentConditional = AgentConditional; + LSAgent agent = InfluenceManager.Scan ( + this.cachedBody.Position, + this.Sight, + agentConditional, + (bite) => { + return ((this.Agent.Controller.GetAllegiance (bite) & this.TargetAllegiance) != 0); + + } + ); + + return agent; + } + + public bool ScanWithinRangeAndEngage () + { + LSAgent agent = this.DoScan (); + if (agent == null) { + return false; + } else { + Engage (agent); + return true; + } + } + + #if UNITY_EDITOR + void OnDrawGizmos () + { + Gizmos.DrawWireSphere (Application.isPlaying ? Agent.Body._visualPosition : this.transform.position, this.Range.ToFloat ()); + } + #endif + } } \ No newline at end of file diff --git a/Core/Game/Abilities/Essential/Scan.cs.meta b/Core/Game/Abilities/Essential/Scan.cs.meta old mode 100644 new mode 100755 diff --git a/Core/Game/Abilities/Essential/Stats.cs b/Core/Game/Abilities/Essential/Stats.cs old mode 100644 new mode 100755 index 83ebb76e..e686b980 --- a/Core/Game/Abilities/Essential/Stats.cs +++ b/Core/Game/Abilities/Essential/Stats.cs @@ -4,10 +4,9 @@ namespace Lockstep { public class Stats : Ability { - - Move cachedMove; - Scan cachedScan; - Health cachedHealth; + protected Move cachedMove; + protected Scan cachedScan; + protected Health cachedHealth; protected override void OnLateSetup() { cachedMove = Agent.GetAbility (); diff --git a/Core/Game/Abilities/Essential/Stats.cs.meta b/Core/Game/Abilities/Essential/Stats.cs.meta old mode 100644 new mode 100755 diff --git a/Core/Game/Abilities/Essential/Stop.cs b/Core/Game/Abilities/Essential/Stop.cs old mode 100644 new mode 100755 diff --git a/Core/Game/Abilities/Essential/Stop.cs.meta b/Core/Game/Abilities/Essential/Stop.cs.meta old mode 100644 new mode 100755 diff --git a/Core/Game/Abilities/Essential/Turn.cs b/Core/Game/Abilities/Essential/Turn.cs old mode 100644 new mode 100755 diff --git a/Core/Game/Abilities/Essential/Turn.cs.meta b/Core/Game/Abilities/Essential/Turn.cs.meta old mode 100644 new mode 100755 diff --git a/Core/Game/Abilities/Extra.meta b/Core/Game/Abilities/Extra.meta old mode 100644 new mode 100755 diff --git a/Core/Game/Abilities/Extra/SelectionRing.meta b/Core/Game/Abilities/Extra/SelectionRing.meta old mode 100644 new mode 100755 diff --git a/Core/Game/Abilities/Extra/SelectionRing/SelectionRing.cs b/Core/Game/Abilities/Extra/SelectionRing/SelectionRing.cs old mode 100644 new mode 100755 index 6323f1c3..0ef435a7 --- a/Core/Game/Abilities/Extra/SelectionRing/SelectionRing.cs +++ b/Core/Game/Abilities/Extra/SelectionRing/SelectionRing.cs @@ -67,6 +67,10 @@ public virtual void SetColor (Color color) { } public virtual void SetSize (float size) { + float _size = size; + if (size <= 0.0f) { + size = 1.0f; + } transform.localScale = Vector3.one * size; } diff --git a/Core/Game/Abilities/Extra/SelectionRing/SelectionRing.cs.meta b/Core/Game/Abilities/Extra/SelectionRing/SelectionRing.cs.meta old mode 100644 new mode 100755 diff --git a/Core/Game/Abilities/Extra/SelectionRing/SelectionRingController.cs b/Core/Game/Abilities/Extra/SelectionRing/SelectionRingController.cs old mode 100644 new mode 100755 index 01f531b5..6c982c39 --- a/Core/Game/Abilities/Extra/SelectionRing/SelectionRingController.cs +++ b/Core/Game/Abilities/Extra/SelectionRing/SelectionRingController.cs @@ -31,6 +31,10 @@ protected override void OnSetup() public void HandleSelectedChange() { + if (ReplayManager.IsPlayingBack) { + return; + } + if (!Agent.IsSelected) { if (Agent.IsHighlighted) @@ -49,6 +53,10 @@ public void HandleSelectedChange() public void HandleHighlightedChange() { + if (ReplayManager.IsPlayingBack) { + return; + } + if (Agent.IsHighlighted) { if (Agent.IsSelected) { diff --git a/Core/Game/Abilities/Extra/SelectionRing/SelectionRingController.cs.meta b/Core/Game/Abilities/Extra/SelectionRing/SelectionRingController.cs.meta old mode 100644 new mode 100755 diff --git a/Core/Game/Abilities/Extra/SelectionRing/SelectionRingProto.prefab b/Core/Game/Abilities/Extra/SelectionRing/SelectionRingProto.prefab old mode 100644 new mode 100755 diff --git a/Core/Game/Abilities/Extra/SelectionRing/SelectionRingProto.prefab.meta b/Core/Game/Abilities/Extra/SelectionRing/SelectionRingProto.prefab.meta old mode 100644 new mode 100755 diff --git a/Core/Game/Abilities/Extra/SelectionRing/SelectionRingState.cs b/Core/Game/Abilities/Extra/SelectionRing/SelectionRingState.cs old mode 100644 new mode 100755 diff --git a/Core/Game/Abilities/Extra/SelectionRing/SelectionRingState.cs.meta b/Core/Game/Abilities/Extra/SelectionRing/SelectionRingState.cs.meta old mode 100644 new mode 100755 diff --git a/Core/Game/Agents.meta b/Core/Game/Agents.meta old mode 100644 new mode 100755 diff --git a/Core/Game/Agents/AgentController.cs b/Core/Game/Agents/AgentController.cs old mode 100644 new mode 100755 index 749db71f..11e4010d --- a/Core/Game/Agents/AgentController.cs +++ b/Core/Game/Agents/AgentController.cs @@ -103,6 +103,7 @@ public static void Deactivate() DestroyAgent(GlobalAgents [i], true); } } + CheckDestroyAgent(); } private static ushort GenerateGlobalID() @@ -136,6 +137,7 @@ public static void Simulate() GlobalAgents [iterator].Simulate(); } } + } public static void LateSimulate() @@ -145,8 +147,19 @@ public static void LateSimulate() if (GlobalAgentActive [i]) GlobalAgents [i].LateSimulate(); } - } + CheckDestroyAgent(); + + + } + static void CheckDestroyAgent() + { + for (int i = 0; i < DeactivationBuffer.Count; i++) + { + DestroyAgentBuffer(DeactivationBuffer[i]); + } + DeactivationBuffer.FastClear(); + } public static void Visualize() { for (int iterator = 0; iterator < PeakGlobalID; iterator++) @@ -157,33 +170,61 @@ public static void Visualize() } } } + public static void ClearAgents() + { + for (int i = GlobalAgents.Length - 1; i >= 0; i--) + { + if (GlobalAgentActive[i]) + { + LSAgent agent = GlobalAgents[i]; + AgentController.DestroyAgent(agent); + } + } + } public static void ChangeController (LSAgent agent, AgentController newCont) { - AgentController leController = agent.Controller; - leController.LocalAgentActive [agent.LocalID] = false; - GlobalAgentActive[agent.GlobalID] = false; - leController.OpenLocalIDs.Add(agent.LocalID); - OpenGlobalIDs.Add(agent.GlobalID); - - if (newCont == null) { - agent.InitializeController(null,0,0); - } - else { - agent.Influencer.Deactivate(); - - newCont.AddAgent(agent); - agent.Influencer.Initialize(); - - } - - - } - public static void DestroyAgent(LSAgent agent, bool Immediate = false) - { - - - agent.Deactivate(Immediate); + if (leController != null) { + leController.LocalAgentActive[agent.LocalID] = false; + GlobalAgentActive[agent.GlobalID] = false; + leController.OpenLocalIDs.Add(agent.LocalID); + OpenGlobalIDs.Add(agent.GlobalID); + + if (newCont == null) { + agent.InitializeController(null, 0, 0); + } + else { + agent.Influencer.Deactivate(); + + newCont.AddAgent(agent); + agent.Influencer.Initialize(); + + } + } + } + public struct DeactivationData + { + public LSAgent Agent; + public bool Immediate; + + public DeactivationData(LSAgent agent, bool immediate) + { + Agent = agent; + Immediate = immediate; + } + } + static FastList DeactivationBuffer = new FastList(); + public static void DestroyAgent(LSAgent agent, bool immediate = false) + { + DeactivationBuffer.Add(new DeactivationData(agent, immediate)); + + } + private static void DestroyAgentBuffer (DeactivationData data) + { + LSAgent agent = data.Agent; + bool immediate = data.Immediate; + + agent.Deactivate(immediate); ushort agentCodeID = AgentController.GetAgentCodeIndex (agent.MyAgentCode); diff --git a/Core/Game/Agents/AgentController.cs.meta b/Core/Game/Agents/AgentController.cs.meta old mode 100644 new mode 100755 diff --git a/Core/Game/Agents/AgentTag.cs b/Core/Game/Agents/AgentTag.cs old mode 100644 new mode 100755 diff --git a/Core/Game/Agents/AgentTag.cs.meta b/Core/Game/Agents/AgentTag.cs.meta old mode 100644 new mode 100755 diff --git a/Core/Game/Agents/AgentType.cs b/Core/Game/Agents/AgentType.cs old mode 100644 new mode 100755 diff --git a/Core/Game/Agents/AgentType.cs.meta b/Core/Game/Agents/AgentType.cs.meta old mode 100644 new mode 100755 diff --git a/Core/Game/Agents/LSAgent.cs b/Core/Game/Agents/LSAgent.cs old mode 100644 new mode 100755 index 2e4f03fe..d7462c1f --- a/Core/Game/Agents/LSAgent.cs +++ b/Core/Game/Agents/LSAgent.cs @@ -14,439 +14,539 @@ using UnityEditor; #endif -namespace Lockstep { - [RequireComponent (typeof (LSBody))] - /// - /// LSAgents manage abilities and interpret commands. - /// - public class LSAgent : MonoBehaviour, IMousable { - - Vector3 IMousable.WorldPosition { - get {return this.Body._visualPosition;} - } - float IMousable.MousableRadius { - get {return this.SelectionRadius;} - } +namespace Lockstep +{ + [RequireComponent(typeof(LSBody))] + /// + /// LSAgents manage abilities and interpret commands. + /// + public class LSAgent : MonoBehaviour, IMousable + { + + Vector3 IMousable.WorldPosition + { + get { return this.Body._visualPosition; } + } + float IMousable.MousableRadius + { + get { return this.SelectionRadius; } + } static FastList setupAbilitys = new FastList(); [SerializeField, FrameCount] - private int _deathTime = LockstepManager.FrameRate * 2; + private int _deathTime = LockstepManager.FrameRate * 2; //[SerializeField, DataCode ("Agents")] private string _myAgentCode; public string MyAgentCode { - get { + get + { return _myAgentCode; } - private set { + private set + { _myAgentCode = value; } } - [SerializeField, HideInInspector] - private AgentType _agentType; - public AgentType MyAgentType { - get { - return _agentType; - } - } + [SerializeField, HideInInspector] + private AgentType _agentType; + public AgentType MyAgentType + { + get + { + return _agentType; + } + } + + private LSBusStop _busStop; + public LSBusStop BusStop + { + get { return _busStop ?? (_busStop = new LSBusStop()); } + } - private LSBusStop _busStop; - public LSBusStop BusStop { - get {return _busStop ?? (_busStop = new LSBusStop());} - } - - [SerializeField] - private int _globalID; - public ushort GlobalID { get {return(ushort) _globalID;} private set {_globalID = (int)value;} } + [SerializeField] + private int _globalID; + public ushort GlobalID { get { return (ushort)_globalID; } private set { _globalID = (int)value; } } - public ushort LocalID { get; private set;} - public uint BoxVersion { get; set; } + public ushort LocalID { get; private set; } + public uint BoxVersion { get; set; } [SerializeField] private int _boxPriority = 0; - public int BoxPriority {get {return _boxPriority;}} + public int BoxPriority { get { return _boxPriority; } } + + [SerializeField] private int _selectionPriority; - public int SelectionPriority {get {return _selectionPriority;}} + public int SelectionPriority { get { return _selectionPriority; } } - public bool Selectable {get; set;} - public bool CanSelect {get {return Selectable && IsVisible;}} + [SerializeField] + private bool _selectable = true; + public bool Selectable { get { return _selectable; } } + public bool CanSelect { get { return Selectable && IsVisible; } } - public ushort TypeIndex; + public ushort TypeIndex; - public Vector2 Position2 {get{return new Vector2(CachedTransform.position.x, CachedTransform.position.z);}} - public FastList Interfacers {get {return abilityManager.Interfacers;}} + public Vector2 Position2 { get { return new Vector2(CachedTransform.position.x, CachedTransform.position.z); } } + public FastList Interfacers { get { return abilityManager.Interfacers; } } - #region Pre-runtime generated (maybe not) + #region Pre-runtime generated (maybe not) //[SerializeField] private Ability[] _attachedAbilities; - public Ability[] AttachedAbilities {get {return _attachedAbilities;}} + public Ability[] AttachedAbilities { get { return _attachedAbilities; } } //[SerializeField] private LSBody _body; - public LSBody Body { get {return _body;} } - //[SerializeField] - private LSTrigger[] _triggers; - public LSTrigger[] Triggers {get {return _triggers;}} + public LSBody Body { get { return _body; } } + //[SerializeField] + private LSTrigger[] _triggers; + public LSTrigger[] Triggers { get { return _triggers; } } //[SerializeField] private LSAnimatorBase _animator; - public LSAnimatorBase Animator { get {return _animator;} } + public LSAnimatorBase Animator { get { return _animator; } } //[SerializeField] private Transform _cachedTransform; - public Transform CachedTransform {get{return _cachedTransform;}} + public Transform CachedTransform { get { return _cachedTransform; } } //[SerializeField] private GameObject _cachedGameObject; - public GameObject CachedGameObject {get {return _cachedGameObject;}} + public GameObject CachedGameObject { get { return _cachedGameObject; } } #endregion - //TODO: Put all this stuff in an extendible class - public LSInfluencer Influencer { get; private set; } + //TODO: Put all this stuff in an extendible class + public LSInfluencer Influencer { get; private set; } - public bool IsActive { get; private set;} + public bool IsActive { get; private set; } - public event Action onDeactivate; + public event Action onDeactivate; public AgentTag Tag; - public bool CheckCasting { get; set; } - public bool IsCasting { - get { - if (Stunned) - return true; - return abilityManager.CheckCasting(); - } - } - private bool _stunned; - public bool Stunned { - get { - return _stunned; - } - set { - if (value != _stunned) { - _stunned = value; - if (_stunned) { - this.StopCast(); - } - } - } - } - - - public uint SpawnVersion { get; private set; } - public AgentController Controller { get; private set; } - - public bool Controllable { - get { - return PlayerManager.ContainsController (Controller); + public bool CheckCasting { get; set; } + public bool IsCasting + { + get + { + if (Stunned) + return true; + return abilityManager.CheckCasting(); } } + private bool _stunned; + public bool Stunned + { + get + { + return _stunned; + } + set + { + if (value != _stunned) + { + _stunned = value; + if (_stunned) + { + this.StopCast(); + } + } + } + } + + + public uint SpawnVersion { get; private set; } + public AgentController Controller { get; private set; } - public event Action onSelectedChange; - public bool IsSelected { - get { return isSelected; } - set { - if (isSelected != value) { - isSelected = value; - if (onSelectedChange != null) - onSelectedChange(); - } - } - } - - public event Action onHighlightedChange; - public bool IsHighlighted { - get { return isHighlighted; } - set { - if (IsHighlighted != value) { - isHighlighted = value; - if (onHighlightedChange != null) - onHighlightedChange (); - } - } - } - - public bool IsVisible { - //get { return cachedRenderer == null || (cachedRenderer.enabled && cachedRenderer.isVisible); } + public bool Controllable + { + get + { + return PlayerManager.ContainsController(Controller); + } + } + + public event Action onSelectedChange; + public bool IsSelected + { + get { return isSelected; } + set + { + if (isSelected != value) + { + isSelected = value; + if (onSelectedChange != null) + onSelectedChange(); + } + } + } + + public event Action onHighlightedChange; + public bool IsHighlighted + { + get { return isHighlighted; } + set + { + if (IsHighlighted != value) + { + isHighlighted = value; + if (onHighlightedChange != null) + onHighlightedChange(); + } + } + } + + public bool IsVisible + { + //get { return cachedRenderer == null || (cachedRenderer.enabled && cachedRenderer.isVisible); } get { return true; } //TODO: Return true only if viable GladFox: seen for what kind of camera? :) - } + } - public AllegianceType GetAllegiance(LSAgent other) { - return Controller.GetAllegiance(other.Controller); - } + public AllegianceType GetAllegiance(LSAgent other) + { + return Controller.GetAllegiance(other.Controller); + } - private bool isHighlighted; - private bool isSelected; + private bool isHighlighted; + private bool isSelected; public readonly AbilityManager abilityManager = new AbilityManager(); [SerializeField] - private float _selectionRadius = -1f; - public float SelectionRadius {get {return _selectionRadius <= 0 ? this.Body.Radius.ToFloat() + 2f : _selectionRadius;}} + private float _selectionRadius = -1f; + public float SelectionRadius { get { return _selectionRadius <= 0 ? this.Body.Radius.ToFloat() + 1f : _selectionRadius; } } [SerializeField] private Transform _visualCenter; - public Transform VisualCenter {get {return _visualCenter;}} - public float SelectionRadiusSquared {get; private set;} + public Transform VisualCenter { get { return _visualCenter; } } + public float SelectionRadiusSquared { get; private set; } - public FastBucket Buffs = new FastBucket(); + public FastBucket Buffs = new FastBucket(); - internal void AddBuff (Buff buff) { - buff.ID = Buffs.Add(buff); - } - internal void RemoveBuff (Buff buff) { - Buffs.RemoveAt(buff.ID); - } + internal void AddBuff(Buff buff) + { + buff.ID = Buffs.Add(buff); + } + internal void RemoveBuff(Buff buff) + { + Buffs.RemoveAt(buff.ID); + } + + public void DeactivateBuff(Buff buff) + { + buff.Deactivate(); + } + + public bool ContainsBuff() + { + for (int i = 0; i < Buffs.PeakCount; i++) + { + if (Buffs.arrayAllocation[i]) + { + if (Buffs[i] is T) + return true; + } + } + return false; + } - public IAgentData Data {get; private set;} - private readonly FastList TrackedLockstepTickets = new FastList(); - void Awake () { - gameObject.SetActive(false); + public IAgentData Data { get; private set; } + private readonly FastList TrackedLockstepTickets = new FastList(); + void Awake() + { + gameObject.SetActive(false); - } - public void Setup(IAgentData interfacer) { - gameObject.SetActive(true); - LoadComponents (); + } + public void Setup(IAgentData interfacer) + { + gameObject.SetActive(true); + LoadComponents(); GameObject.DontDestroyOnLoad(gameObject); setupAbilitys.FastClear(); - - MyAgentCode = interfacer.Name; - Data = interfacer; - SpawnVersion = 1; - CheckCasting = true; - Influencer = new LSInfluencer(); + MyAgentCode = interfacer.Name; + Data = interfacer; + SpawnVersion = 1; + CheckCasting = true; + + Influencer = new LSInfluencer(); if (_visualCenter == null) _visualCenter = CachedTransform; - if (Animator .IsNotNull ()) { - Animator.Setup(); - } + if (Animator.IsNotNull()) + { + Animator.Setup(); + } abilityManager.Setup(this); - - Influencer.Setup(this); - Body.Setup(this); + + Influencer.Setup(this); + Body.Setup(this); SelectionRadiusSquared = SelectionRadius * SelectionRadius; - this.RegisterLockstep(); - - - } - private void RegisterLockstep () { - TrackedLockstepTickets.Add (LSVariableManager.Register(this.Body)); - foreach (Ability abil in this.abilityManager.Abilitys) { - TrackedLockstepTickets.Add(LSVariableManager.Register(abil)); - } - } - public IEnumerable GetDesyncs (int[] compare) { - int position = 0; - foreach (int ticket in this.TrackedLockstepTickets) { - LSVariableContainer container = LSVariableManager.GetContainer(ticket); - int[] hashes = container.GetCompareHashes(); - for (int i = 0; i < hashes.Length; i++) { - if (compare[i] != hashes[position]) { - yield return container.Variables[i]; - } - position++; - } - - - } - } - - public void SessionReset () { + this.RegisterLockstep(); + + + } + private void RegisterLockstep() + { + TrackedLockstepTickets.Add(LSVariableManager.Register(this.Body)); + foreach (Ability abil in this.abilityManager.Abilitys) + { + TrackedLockstepTickets.Add(LSVariableManager.Register(abil)); + } + } + public IEnumerable GetDesyncs(int[] compare) + { + int position = 0; + foreach (int ticket in this.TrackedLockstepTickets) + { + LSVariableContainer container = LSVariableManager.GetContainer(ticket); + int[] hashes = container.GetCompareHashes(); + for (int i = 0; i < hashes.Length; i++) + { + if (compare[i] != hashes[position]) + { + yield return container.Variables[i]; + } + position++; + } + + + } + } + + public void SessionReset() + { this.BoxVersion = 0; this.SpawnVersion = 0; } - internal void InitializeController (AgentController controller, ushort localID, ushort globalID) { - this.Controller = controller; - this.LocalID = localID; - this.GlobalID = globalID; - } + internal void InitializeController(AgentController controller, ushort localID, ushort globalID) + { + this.Controller = controller; + this.LocalID = localID; + this.GlobalID = globalID; + } - public void Initialize( - Vector2d position = default (Vector2d), - Vector2d rotation = default (Vector2d)) { + public void Initialize( + Vector2d position = default(Vector2d), + Vector2d rotation = default(Vector2d)) + { IsActive = true; CheckCasting = true; - Selectable = true; - CachedGameObject.SetActiveIfNot (true); - if (Body .IsNotNull ()) { - Body.Initialize(new Vector2dHeight(position), rotation); - } + CachedGameObject.SetActiveIfNot(true); + if (Body.IsNotNull()) + { + Body.Initialize(new Vector2dHeight(position), rotation); + } - if (Triggers.IsNotNull()) { - foreach (LSTrigger trigger in Triggers) { - trigger.Initialize(); - } - } + if (Triggers.IsNotNull()) + { + foreach (LSTrigger trigger in Triggers) + { + trigger.Initialize(); + } + } - if (Influencer .IsNotNull ()) { - Influencer.Initialize(); - } + if (Influencer.IsNotNull()) + { + Influencer.Initialize(); + } - abilityManager.Initialize(); - if (Animator .IsNotNull ()) { - Animator.Initialize(); - } - } + abilityManager.Initialize(); + if (Animator.IsNotNull()) + { + Animator.Initialize(); + } + } - public void Simulate() { + public void Simulate() + { - if (Influencer .IsNotNull ()) { - Influencer.Simulate(); - } + if (Influencer.IsNotNull()) + { + Influencer.Simulate(); + } - abilityManager.Simulate(); + abilityManager.Simulate(); - if (IsCasting == false) { - SetState (AnimState.Idling); + if (IsCasting == false) + { + SetState(AnimState.Idling); } - - } - public void LateSimulate () { - abilityManager.LateSimulate (); - for (int i = 0; i < this.Buffs.PeakCount; i++) { - if (this.Buffs.arrayAllocation[i]) { - this.Buffs[i].Simulate(); - } - } + + } + public void LateSimulate() + { + abilityManager.LateSimulate(); + for (int i = 0; i < this.Buffs.PeakCount; i++) + { + if (this.Buffs.arrayAllocation[i]) + { + this.Buffs[i].Simulate(); + } + } } [HideInInspector] public bool VisualPositionChanged; Vector3 lastVisualPosition; - public void Visualize() { + public void Visualize() + { VisualPositionChanged = CachedTransform.hasChanged && lastVisualPosition != (lastVisualPosition = CachedTransform.position); - if (VisualPositionChanged) { + if (VisualPositionChanged) + { lastVisualPosition = CachedTransform.position; } - abilityManager.Visualize(); - if (Animator .IsNotNull ()) { - Animator.Visualize(); - } + abilityManager.Visualize(); + if (Animator.IsNotNull()) + { + Animator.Visualize(); + } - } + } - public void Execute(Command com) { - abilityManager.Execute(com); - } + public void Execute(Command com) + { + abilityManager.Execute(com); + } - public void StopCast(int exceptionID = -1) { - abilityManager.StopCast(exceptionID); - } + public void StopCast(int exceptionID = -1) + { + abilityManager.StopCast(exceptionID); + } - - public void Die (bool immediate = false) { + + public void Die(bool immediate = false) + { AgentController.DestroyAgent(this, immediate); - if (Animator .IsNotNull ()) + if (Animator.IsNotNull()) { - SetState (AnimState.Dying); + SetState(AnimState.Dying); - Animator.Visualize (); + Animator.Visualize(); } } - public void Deactivate(bool Immediate = false) { - if (onDeactivate != null) - this.onDeactivate(this); - _Deactivate (); - if (Immediate == false) { - CoroutineManager.StartCoroutine(PoolDelayer()); - } else { - Pool(); - } - } - private void _Deactivate () { - IsActive = false; - - IsSelected = false; + internal void Deactivate(bool Immediate = false) + { + if (onDeactivate != null) + this.onDeactivate(this); + _Deactivate(); + + + if (Immediate == false) + { + if (Animator.IsNotNull()) + Animator.Play(AnimState.Dying); + + CoroutineManager.StartCoroutine(PoolDelayer()); + } + else { + Pool(); + } + } + private void _Deactivate() + { + this.StopCast(); + IsActive = false; + + IsSelected = false; SpawnVersion++; - + abilityManager.Deactivate(); - - Body.Deactivate(); - if (Influencer .IsNotNull ()) { + + Body.Deactivate(); + if (Influencer.IsNotNull()) + { Influencer.Deactivate(); } } - private IEnumerator PoolDelayer() { - yield return _deathTime; - Pool(); - } + private IEnumerator PoolDelayer() + { + yield return _deathTime; + Pool(); + } - private void Pool() { - AgentController.CacheAgent(this); + private void Pool() + { + AgentController.CacheAgent(this); if (CachedGameObject != null) - CachedGameObject.SetActive (false); - } - - public void SetState (AnimState animState) { - if (Animator .IsNotNull ()) { - Animator.CurrentAnimState = animState; - } - } - - public void ApplyImpulse(AnimImpulse animImpulse, int rate = 0) { - if (Animator .IsNotNull ()) { - Animator.ApplyImpulse(animImpulse, rate); - } - } - - public T GetAbility() where T : Ability{ - return abilityManager.GetAbility(); - } - public Ability GetAbility (string name) { - return abilityManager.GetAbility (name); - } - - public long GetStateHash () { - long hash = 3; - hash ^= this.GlobalID; - hash ^= this.LocalID; - hash ^= this.Body._position.GetStateHash (); - hash ^= this.Body._rotation.GetStateHash (); - hash ^= this.Body.Velocity.GetStateHash (); - return hash; - } - - - private void LoadComponents () { - _cachedTransform = base.transform; - _cachedGameObject = base.gameObject; - _body = GetComponent (); - _animator = GetComponent (); - _attachedAbilities = GetComponents (); - _triggers = GetComponents (); - } + CachedGameObject.SetActive(false); + } + + public void SetState(AnimState animState) + { + if (Animator.IsNotNull()) + { + Animator.CurrentAnimState = animState; + } + } + + public void ApplyImpulse(AnimImpulse animImpulse, int rate = 0) + { + if (Animator.IsNotNull()) + { + Animator.ApplyImpulse(animImpulse, rate); + } + } + + public T GetAbility() where T : Ability + { + return abilityManager.GetAbility(); + } + public Ability GetAbility(string name) + { + return abilityManager.GetAbility(name); + } + + public long GetStateHash() + { + long hash = 3; + hash ^= this.GlobalID; + hash ^= this.LocalID; + hash ^= this.Body._position.GetStateHash(); + hash ^= this.Body._rotation.GetStateHash(); + hash ^= this.Body.Velocity.GetStateHash(); + return hash; + } + + + private void LoadComponents() + { + _cachedTransform = base.transform; + _cachedGameObject = base.gameObject; + _body = GetComponent(); + _animator = GetComponent(); + _attachedAbilities = GetComponents(); + _triggers = GetComponents(); + } #if UNITY_EDITOR - public void RefreshComponents () { - LoadComponents (); - SerializedObject so = new SerializedObject (this); - so.Update (); - so.ApplyModifiedProperties (); + public void RefreshComponents() + { + LoadComponents(); + SerializedObject so = new SerializedObject(this); + so.Update(); + so.ApplyModifiedProperties(); } - /*public override bool GetSerializedFieldNames(List output) + /*public override bool GetSerializedFieldNames(List output) { return false; base.GetSerializedFieldNames(output); @@ -471,12 +571,13 @@ public void RefreshComponents () { RefreshComponents (); return true; }*/ - void Reset () { + void Reset() + { _selectionRadius = -1f; _visualCenter = transform; } #endif - } + } } \ No newline at end of file diff --git a/Core/Game/Agents/LSAgent.cs.meta b/Core/Game/Agents/LSAgent.cs.meta old mode 100644 new mode 100755 diff --git a/Core/Game/Agents/LSAnimator.cs b/Core/Game/Agents/LSAnimator.cs old mode 100644 new mode 100755 index 9c1c8ed7..338b3259 --- a/Core/Game/Agents/LSAnimator.cs +++ b/Core/Game/Agents/LSAnimator.cs @@ -26,7 +26,14 @@ public class LSAnimator : LSAnimatorBase private string fire = "fire"; [SerializeField] - private string specialAttack = "specialAttack"; + private string specialFire = "specialFire"; + + [SerializeField] + private string specialAttack = "specialAttack"; + + [SerializeField] + private string extra = "extra"; + private AnimationClip idlingClip; private AnimationClip movingClip; @@ -35,7 +42,10 @@ public class LSAnimator : LSAnimatorBase private AnimationClip specialEngagingClip; private AnimationClip fireClip; - private AnimationClip specialAttackClip; + private AnimationClip specialFireClip; + + private AnimationClip specialAttackClip; + private AnimationClip extraClip; private Animation animator; @@ -61,7 +71,9 @@ public override void Initialize() specialEngagingClip = animator.GetClip(this.specialEngaging); //Impulses fireClip = animator.GetClip(fire); - specialAttackClip = animator.GetClip(specialAttack); + specialFireClip = animator.GetClip(specialFire); + specialAttackClip = animator.GetClip(specialAttack); + extraClip = animator.GetClip(extra); } Play(AnimState.Idling); } @@ -136,8 +148,12 @@ public string GetImpulseName(AnimImpulse impulse) { case AnimImpulse.Fire: return fire; + case AnimImpulse.SpecialFire: + return specialFire; case AnimImpulse.SpecialAttack: - return specialAttack; + return specialAttack; + case AnimImpulse.Extra: + return extra; } return idling; } @@ -148,8 +164,12 @@ private AnimationClip GetImpulseClip(AnimImpulse impulse) { case AnimImpulse.Fire: return fireClip; + case AnimImpulse.SpecialFire: + return specialFireClip; case AnimImpulse.SpecialAttack: - return specialAttackClip; + return specialAttackClip; + case AnimImpulse.Extra: + return extraClip; } return idlingClip; } diff --git a/Core/Game/Agents/LSAnimator.cs.meta b/Core/Game/Agents/LSAnimator.cs.meta old mode 100644 new mode 100755 diff --git a/Core/Game/Agents/LSAnimatorBase.cs b/Core/Game/Agents/LSAnimatorBase.cs old mode 100644 new mode 100755 index 94c4a26e..4b40583d --- a/Core/Game/Agents/LSAnimatorBase.cs +++ b/Core/Game/Agents/LSAnimatorBase.cs @@ -88,6 +88,8 @@ public enum AnimState public enum AnimImpulse { Fire, - SpecialAttack + SpecialFire, + SpecialAttack, + Extra } } \ No newline at end of file diff --git a/Core/Game/Agents/LSAnimatorBase.cs.meta b/Core/Game/Agents/LSAnimatorBase.cs.meta old mode 100644 new mode 100755 diff --git a/Core/Game/Agents/LSBusStop.cs b/Core/Game/Agents/LSBusStop.cs old mode 100644 new mode 100755 diff --git a/Core/Game/Agents/LSBusStop.cs.meta b/Core/Game/Agents/LSBusStop.cs.meta old mode 100644 new mode 100755 diff --git a/Core/Game/Agents/LSParticler.cs b/Core/Game/Agents/LSParticler.cs old mode 100644 new mode 100755 diff --git a/Core/Game/Agents/LSParticler.cs.meta b/Core/Game/Agents/LSParticler.cs.meta old mode 100644 new mode 100755 diff --git a/Core/Game/Agents/Teams.meta b/Core/Game/Agents/Teams.meta old mode 100644 new mode 100755 diff --git a/Core/Game/Agents/Teams/Team.cs b/Core/Game/Agents/Teams/Team.cs old mode 100644 new mode 100755 diff --git a/Core/Game/Agents/Teams/Team.cs.meta b/Core/Game/Agents/Teams/Team.cs.meta old mode 100644 new mode 100755 diff --git a/Core/Game/Agents/Teams/TeamManager.cs b/Core/Game/Agents/Teams/TeamManager.cs old mode 100644 new mode 100755 diff --git a/Core/Game/Agents/Teams/TeamManager.cs.meta b/Core/Game/Agents/Teams/TeamManager.cs.meta old mode 100644 new mode 100755 diff --git a/Core/Game/Agents/Visuals.meta b/Core/Game/Agents/Visuals.meta old mode 100644 new mode 100755 diff --git a/Core/Game/Agents/Visuals/ExampleGUIManager.cs b/Core/Game/Agents/Visuals/ExampleGUIManager.cs old mode 100644 new mode 100755 diff --git a/Core/Game/Agents/Visuals/ExampleGUIManager.cs.meta b/Core/Game/Agents/Visuals/ExampleGUIManager.cs.meta old mode 100644 new mode 100755 diff --git a/Core/Game/Agents/Visuals/GUIManager.cs b/Core/Game/Agents/Visuals/GUIManager.cs old mode 100644 new mode 100755 diff --git a/Core/Game/Agents/Visuals/GUIManager.cs.meta b/Core/Game/Agents/Visuals/GUIManager.cs.meta old mode 100644 new mode 100755 diff --git a/Core/Game/Agents/Visuals/InterfacerCode.cs b/Core/Game/Agents/Visuals/InterfacerCode.cs old mode 100644 new mode 100755 diff --git a/Core/Game/Agents/Visuals/InterfacerCode.cs.meta b/Core/Game/Agents/Visuals/InterfacerCode.cs.meta old mode 100644 new mode 100755 diff --git a/Core/Game/Agents/Visuals/Materials.meta b/Core/Game/Agents/Visuals/Materials.meta old mode 100644 new mode 100755 diff --git a/Core/Game/Agents/Visuals/Materials/Circle.mat b/Core/Game/Agents/Visuals/Materials/Circle.mat old mode 100644 new mode 100755 diff --git a/Core/Game/Agents/Visuals/Materials/Circle.mat.meta b/Core/Game/Agents/Visuals/Materials/Circle.mat.meta old mode 100644 new mode 100755 diff --git a/Core/Game/Agents/Visuals/Materials/Hex.mat b/Core/Game/Agents/Visuals/Materials/Hex.mat old mode 100644 new mode 100755 diff --git a/Core/Game/Agents/Visuals/Materials/Hex.mat.meta b/Core/Game/Agents/Visuals/Materials/Hex.mat.meta old mode 100644 new mode 100755 diff --git a/Core/Game/Agents/Visuals/Materials/Ring3.mat b/Core/Game/Agents/Visuals/Materials/Ring3.mat old mode 100644 new mode 100755 diff --git a/Core/Game/Agents/Visuals/Materials/Ring3.mat.meta b/Core/Game/Agents/Visuals/Materials/Ring3.mat.meta old mode 100644 new mode 100755 diff --git a/Core/Game/Agents/Visuals/Materials/Ring4.mat b/Core/Game/Agents/Visuals/Materials/Ring4.mat old mode 100644 new mode 100755 diff --git a/Core/Game/Agents/Visuals/Materials/Ring4.mat.meta b/Core/Game/Agents/Visuals/Materials/Ring4.mat.meta old mode 100644 new mode 100755 diff --git a/Core/Game/Agents/Visuals/Materials/Ring5.mat b/Core/Game/Agents/Visuals/Materials/Ring5.mat old mode 100644 new mode 100755 diff --git a/Core/Game/Agents/Visuals/Materials/Ring5.mat.meta b/Core/Game/Agents/Visuals/Materials/Ring5.mat.meta old mode 100644 new mode 100755 diff --git a/Core/Game/Agents/Visuals/Materials/Ring6.mat b/Core/Game/Agents/Visuals/Materials/Ring6.mat old mode 100644 new mode 100755 diff --git a/Core/Game/Agents/Visuals/Materials/Ring6.mat.meta b/Core/Game/Agents/Visuals/Materials/Ring6.mat.meta old mode 100644 new mode 100755 diff --git a/Core/Game/Agents/Visuals/Materials/Ring7.mat b/Core/Game/Agents/Visuals/Materials/Ring7.mat old mode 100644 new mode 100755 diff --git a/Core/Game/Agents/Visuals/Materials/Ring7.mat.meta b/Core/Game/Agents/Visuals/Materials/Ring7.mat.meta old mode 100644 new mode 100755 diff --git a/Core/Game/Agents/Visuals/Materials/Ring8.mat b/Core/Game/Agents/Visuals/Materials/Ring8.mat old mode 100644 new mode 100755 diff --git a/Core/Game/Agents/Visuals/Materials/Ring8.mat.meta b/Core/Game/Agents/Visuals/Materials/Ring8.mat.meta old mode 100644 new mode 100755 diff --git a/Core/Game/Agents/Visuals/Resources.meta b/Core/Game/Agents/Visuals/Resources.meta old mode 100644 new mode 100755 diff --git a/Core/Game/Agents/Visuals/Resources/SelectionRing.prefab b/Core/Game/Agents/Visuals/Resources/SelectionRing.prefab old mode 100644 new mode 100755 diff --git a/Core/Game/Agents/Visuals/Resources/SelectionRing.prefab.meta b/Core/Game/Agents/Visuals/Resources/SelectionRing.prefab.meta old mode 100644 new mode 100755 diff --git a/Core/Game/Agents/Visuals/RotateRing.cs b/Core/Game/Agents/Visuals/RotateRing.cs old mode 100644 new mode 100755 diff --git a/Core/Game/Agents/Visuals/RotateRing.cs.meta b/Core/Game/Agents/Visuals/RotateRing.cs.meta old mode 100644 new mode 100755 diff --git a/Core/Game/Agents/Visuals/Textures.meta b/Core/Game/Agents/Visuals/Textures.meta old mode 100644 new mode 100755 diff --git a/Core/Game/Agents/Visuals/Textures/Circle.png.meta b/Core/Game/Agents/Visuals/Textures/Circle.png.meta old mode 100644 new mode 100755 diff --git a/Core/Game/Agents/Visuals/Textures/Falloff 1.psd.meta b/Core/Game/Agents/Visuals/Textures/Falloff 1.psd.meta old mode 100644 new mode 100755 diff --git a/Core/Game/Agents/Visuals/Textures/Field1.png.meta b/Core/Game/Agents/Visuals/Textures/Field1.png.meta old mode 100644 new mode 100755 diff --git a/Core/Game/Agents/Visuals/Textures/Hex 1.png.meta b/Core/Game/Agents/Visuals/Textures/Hex 1.png.meta old mode 100644 new mode 100755 diff --git a/Core/Game/Agents/Visuals/Textures/Hex 2.png.meta b/Core/Game/Agents/Visuals/Textures/Hex 2.png.meta old mode 100644 new mode 100755 diff --git a/Core/Game/Agents/Visuals/Textures/Hex 3.png.meta b/Core/Game/Agents/Visuals/Textures/Hex 3.png.meta old mode 100644 new mode 100755 diff --git a/Core/Game/Agents/Visuals/Textures/Hex.png.meta b/Core/Game/Agents/Visuals/Textures/Hex.png.meta old mode 100644 new mode 100755 diff --git a/Core/Game/Agents/Visuals/Textures/Ring1.png.meta b/Core/Game/Agents/Visuals/Textures/Ring1.png.meta old mode 100644 new mode 100755 diff --git a/Core/Game/Agents/Visuals/Textures/Ring10.png.meta b/Core/Game/Agents/Visuals/Textures/Ring10.png.meta old mode 100644 new mode 100755 diff --git a/Core/Game/Agents/Visuals/Textures/Ring11.png.meta b/Core/Game/Agents/Visuals/Textures/Ring11.png.meta old mode 100644 new mode 100755 diff --git a/Core/Game/Agents/Visuals/Textures/Ring12.png.meta b/Core/Game/Agents/Visuals/Textures/Ring12.png.meta old mode 100644 new mode 100755 diff --git a/Core/Game/Agents/Visuals/Textures/Ring13.png.meta b/Core/Game/Agents/Visuals/Textures/Ring13.png.meta old mode 100644 new mode 100755 diff --git a/Core/Game/Agents/Visuals/Textures/Ring14.png.meta b/Core/Game/Agents/Visuals/Textures/Ring14.png.meta old mode 100644 new mode 100755 diff --git a/Core/Game/Agents/Visuals/Textures/Ring15.png.meta b/Core/Game/Agents/Visuals/Textures/Ring15.png.meta old mode 100644 new mode 100755 diff --git a/Core/Game/Agents/Visuals/Textures/Ring16.png.meta b/Core/Game/Agents/Visuals/Textures/Ring16.png.meta old mode 100644 new mode 100755 diff --git a/Core/Game/Agents/Visuals/Textures/Ring17.png.meta b/Core/Game/Agents/Visuals/Textures/Ring17.png.meta old mode 100644 new mode 100755 diff --git a/Core/Game/Agents/Visuals/Textures/Ring3.png.meta b/Core/Game/Agents/Visuals/Textures/Ring3.png.meta old mode 100644 new mode 100755 diff --git a/Core/Game/Agents/Visuals/Textures/Ring4.png.meta b/Core/Game/Agents/Visuals/Textures/Ring4.png.meta old mode 100644 new mode 100755 diff --git a/Core/Game/Agents/Visuals/Textures/Ring5.png.meta b/Core/Game/Agents/Visuals/Textures/Ring5.png.meta old mode 100644 new mode 100755 diff --git a/Core/Game/Agents/Visuals/Textures/Ring6.png.meta b/Core/Game/Agents/Visuals/Textures/Ring6.png.meta old mode 100644 new mode 100755 diff --git a/Core/Game/Agents/Visuals/Textures/Ring7.png.meta b/Core/Game/Agents/Visuals/Textures/Ring7.png.meta old mode 100644 new mode 100755 diff --git a/Core/Game/Agents/Visuals/Textures/Ring8.png.meta b/Core/Game/Agents/Visuals/Textures/Ring8.png.meta old mode 100644 new mode 100755 diff --git a/Core/Game/Agents/Visuals/Textures/Ring9.png.meta b/Core/Game/Agents/Visuals/Textures/Ring9.png.meta old mode 100644 new mode 100755 diff --git a/Core/Game/Agents/Visuals/Textures/Square.png b/Core/Game/Agents/Visuals/Textures/Square.png deleted file mode 100755 index 89178412a6aae6df015470b637182db26e88098f..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 4420 zcmXw5cQ_Sb`+kqTNw&xe$)4eu$DRo}R<=XpP$c^(yE3w!h-8n9>~(A*$4K_x31vj) z@AUn?@42q$eg1jIec#vhT<;To&p?xsjD-vUK&h>zb{`i}|D1#f_jW4U4d4Q)rYGp(_k_@16_N8~M})>B*rDgK>C1K{~rWb^_q}bfz)F#CVHA;duT~ zRW}Niq>H>yPr`9u^%aUPfmeW<w3tGiQq4sQsF{Ist26b`*YWEb2AAksw73*(C8Q z=ZDyrxlu9wXG;OOZr_`a*S}uYOek)Y9%NQyi7_M;DOwUnQYeZdRrYI(FMGRsmR5z8 zL&rPQ> zz(pREVjsk)1Gp%lbJp#W1(QNRRNKs13slqr%n%KE6(FGiqDE2Sw*f%_uoQNMxOJ!|!O3FB;GtgL4eVReF#Fl{IL-4q@~d;UF|ICc`v$lG-HH*d zSFBpb>jUvTu4vV_x4UnRUO6r=2%h09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uq1d%b%H7#JBL3^ftk8QpqpVm*s@sRUV9w(a7v2_SGNMmxKwHM#fE zN}w!?OIZu3;teY*YKVFy!A;s+n#Q#R~LHaJo2}#sZzkCSziO%h=o&ckBYS=1X^6}0D?>#N>L5-mA zRO(-Djx4IMp5#B!k~ZZ zn|M(4{o}7gqHOdZfWO=sInF)}QYl-b;(;0|4$2+urCCYI4IBX;(2YVm{Fg~QsAA4J z|1=wf`UC6i_bG3d4&QR>ia1Ly?(Wiv% zr1z0;U!hJC-%eRs*~c+g!GY!9E4|=Km=~2$Sy{OfNqv(yS*J4OD)`y%?3B2a)HuFX zDt@WFe+C+DNyQHBL(3p51YZ$TvxC>GHjYjbvsHq8bYwx#PkwPqNl6jlL1?21c6N3K zvDjlgGxE8$qwNWcA8~yVl&oZ#m&N({>-{GucaM&annSL#{{HpDwe_;Dn`S!5i3i|x zdU~3Oh?w{{lzOH%9gSWYOqbBp*AJqmz#qdHTAWrna97Z8PS&_hyhqMAYrDG(;pD=N zY;0GHx>^ j= 0) if (Timer > Duration) { Deactivate (); } diff --git a/Core/Game/Buffs/Buff.cs.meta b/Core/Game/Buffs/Buff.cs.meta old mode 100644 new mode 100755 diff --git a/Core/Game/Determinism.meta b/Core/Game/Determinism.meta old mode 100644 new mode 100755 diff --git a/Core/Game/Determinism/DeterminismTester.cs b/Core/Game/Determinism/DeterminismTester.cs old mode 100644 new mode 100755 diff --git a/Core/Game/Determinism/DeterminismTester.cs.meta b/Core/Game/Determinism/DeterminismTester.cs.meta old mode 100644 new mode 100755 diff --git a/Core/Game/Determinism/LSVariable.cs b/Core/Game/Determinism/LSVariable.cs old mode 100644 new mode 100755 diff --git a/Core/Game/Determinism/LSVariable.cs.meta b/Core/Game/Determinism/LSVariable.cs.meta old mode 100644 new mode 100755 diff --git a/Core/Game/Determinism/LSVariableContainer.cs b/Core/Game/Determinism/LSVariableContainer.cs old mode 100644 new mode 100755 diff --git a/Core/Game/Determinism/LSVariableContainer.cs.meta b/Core/Game/Determinism/LSVariableContainer.cs.meta old mode 100644 new mode 100755 diff --git a/Core/Game/Determinism/LSVariableManager.cs b/Core/Game/Determinism/LSVariableManager.cs old mode 100644 new mode 100755 diff --git a/Core/Game/Determinism/LSVariableManager.cs.meta b/Core/Game/Determinism/LSVariableManager.cs.meta old mode 100644 new mode 100755 diff --git a/Core/Game/Determinism/LockstepAttribute.cs b/Core/Game/Determinism/LockstepAttribute.cs old mode 100644 new mode 100755 index baea90a2..07ef587c --- a/Core/Game/Determinism/LockstepAttribute.cs +++ b/Core/Game/Determinism/LockstepAttribute.cs @@ -1,14 +1,21 @@ using UnityEngine; using System.Collections; using System; -[AttributeUsage (AttributeTargets.Property)] -public sealed class LockstepAttribute : Attribute { - public bool DoReset {get; private set;} - public LockstepAttribute () { - this.DoReset = false; - } - public LockstepAttribute (bool doReset) { - DoReset = doReset; - } -} +namespace Lockstep +{ + [AttributeUsage(AttributeTargets.Property)] + public sealed class LockstepAttribute : Attribute + { + public bool DoReset { get; private set; } + public LockstepAttribute() + { + this.DoReset = false; + } + + public LockstepAttribute(bool doReset) + { + DoReset = doReset; + } + } +} \ No newline at end of file diff --git a/Core/Game/Determinism/LockstepAttribute.cs.meta b/Core/Game/Determinism/LockstepAttribute.cs.meta old mode 100644 new mode 100755 diff --git a/Core/Game/Effects.meta b/Core/Game/Effects.meta old mode 100644 new mode 100755 diff --git a/Core/Game/Effects/Defaults.meta b/Core/Game/Effects/Defaults.meta old mode 100644 new mode 100755 diff --git a/Core/Game/Effects/Defaults/None.prefab b/Core/Game/Effects/Defaults/None.prefab old mode 100644 new mode 100755 diff --git a/Core/Game/Effects/Defaults/None.prefab.meta b/Core/Game/Effects/Defaults/None.prefab.meta old mode 100644 new mode 100755 diff --git a/Core/Game/Effects/EffectDataItem.cs b/Core/Game/Effects/EffectDataItem.cs old mode 100644 new mode 100755 diff --git a/Core/Game/Effects/EffectDataItem.cs.meta b/Core/Game/Effects/EffectDataItem.cs.meta old mode 100644 new mode 100755 diff --git a/Core/Game/Effects/EffectManager.cs b/Core/Game/Effects/EffectManager.cs old mode 100644 new mode 100755 index 1b56ff1c..7ce0a04f --- a/Core/Game/Effects/EffectManager.cs +++ b/Core/Game/Effects/EffectManager.cs @@ -56,35 +56,40 @@ public static void Deactivate() public static bool IsValid(string effectCode) { - return !string.IsNullOrEmpty(effectCode) && effectCode != "None"; + return !string.IsNullOrEmpty (effectCode) && effectCode != "None" && CodeDataMap.ContainsKey (effectCode); } - public static void LazyCreateEffect(string effectCode, Vector3 position) + public static LSEffect LazyCreateEffect(string effectCode, Vector3 position) { if (!IsValid(effectCode)) - return; + return null; LSEffect effect = CreateEffect(effectCode); effect.CachedTransform.position = position; Fire (effect); + return effect; } - public static void LazyCreateEffect(string effectCode, Vector3 position, Quaternion rotation) + public static LSEffect LazyCreateEffect(string effectCode, Vector3 position, Quaternion rotation) { if (!IsValid(effectCode)) - return; + return null; LSEffect effect = CreateEffect(effectCode); effect.CachedTransform.position = position; effect.CachedTransform.rotation = rotation; Fire (effect); + return effect; + } - public static void LazyCreateEffect(string effectCode, Transform spawnParent) + public static LSEffect LazyCreateEffect(string effectCode, Transform spawnParent) { if (!IsValid(effectCode)) - return; + return null; LSEffect effect = CreateEffect(effectCode); effect.CachedTransform.parent = spawnParent; Fire (effect); + return effect; + } public static LSEffect CreateEffect(string effectCode) @@ -122,7 +127,6 @@ private static LSEffect GenEffect(string effectCode, int id = -1) FastStack pool; if (!EffectPool.TryGetValue(effectCode, out pool)) { - Debug.LogError(string.Format("Effect not found with code {0} in pool. Did you remember to add it to the Lockstep Database?", effectCode)); return null; } LSEffect effect = null; diff --git a/Core/Game/Effects/EffectManager.cs.meta b/Core/Game/Effects/EffectManager.cs.meta old mode 100644 new mode 100755 diff --git a/Core/Game/Effects/LSEffect.cs b/Core/Game/Effects/LSEffect.cs old mode 100644 new mode 100755 index 5a5c5221..a5550eb6 --- a/Core/Game/Effects/LSEffect.cs +++ b/Core/Game/Effects/LSEffect.cs @@ -16,13 +16,17 @@ public class LSEffect : MonoBehaviour #region Default Values Vector3 defaultScale; [SerializeField] - private float - defaultDuration; + private float defaultDuration; + #endregion public string MyEffectCode { get; private set; } public Transform CachedTransform {get; private set;} public GameObject CachedGameObject {get; private set;} + public Vector3 StartPos {get; set;} + public Vector3 EndPos {get; set;} + public Transform Target { get; set;} + public ParticleSystem CachedShuriken {get; private set;} private float StartSpeed { @@ -45,6 +49,7 @@ public float Size { public event Action OnSetup; public event Action OnInitialize; + public event Action OnLateInitialize; public event Action OnVisualize; public event Action OnDeactivate; /// @@ -93,7 +98,6 @@ internal bool Create (int id) /// internal void Initialize () { - CachedGameObject.SetActive (true); StartCoroutine (LifeTimer ()); if (OnInitialize .IsNotNull ()) @@ -104,13 +108,21 @@ internal void Initialize () CachedShuriken.startSize = StartSize; CachedShuriken.Play(); } + + lateInitialized = false; } + bool lateInitialized = false; /// /// Called every Update frame. /// internal void Visualize () { + if (lateInitialized == false) { + lateInitialized = true; + if (OnLateInitialize != null) + OnLateInitialize (); + } if (OnVisualize .IsNotNull ()) OnVisualize (); } @@ -123,8 +135,14 @@ internal void Deactivate () if (CachedShuriken != null) { CachedShuriken.Stop(); } - CachedTransform.SetParent (null); - CachedGameObject.SetActive (false); + if (CachedTransform != null) { + CachedTransform.SetParent(null); + } + + if (CachedGameObject != null) { + CachedGameObject.SetActive(false); + } + if (OnDeactivate .IsNotNull ()) OnDeactivate (); } diff --git a/Core/Game/Effects/LSEffect.cs.meta b/Core/Game/Effects/LSEffect.cs.meta old mode 100644 new mode 100755 diff --git a/Core/Game/Grouping.meta b/Core/Game/Grouping.meta old mode 100644 new mode 100755 diff --git a/Core/Game/Grouping/MovementGroup.cs b/Core/Game/Grouping/MovementGroup.cs old mode 100644 new mode 100755 index aa4a19b8..cf71ba19 --- a/Core/Game/Grouping/MovementGroup.cs +++ b/Core/Game/Grouping/MovementGroup.cs @@ -2,7 +2,7 @@ namespace Lockstep { public class MovementGroup { - const int MinGroupSize = 3; + const int MinGroupSize = 2; public Vector2d Destination { get; private set; } diff --git a/Core/Game/Grouping/MovementGroup.cs.meta b/Core/Game/Grouping/MovementGroup.cs.meta old mode 100644 new mode 100755 diff --git a/Core/Game/Grouping/MovementGroupHelper.cs b/Core/Game/Grouping/MovementGroupHelper.cs old mode 100644 new mode 100755 diff --git a/Core/Game/Grouping/MovementGroupHelper.cs.meta b/Core/Game/Grouping/MovementGroupHelper.cs.meta old mode 100644 new mode 100755 diff --git a/Core/Game/Grouping/ScanGroupHelper.cs b/Core/Game/Grouping/ScanGroupHelper.cs old mode 100644 new mode 100755 diff --git a/Core/Game/Grouping/ScanGroupHelper.cs.meta b/Core/Game/Grouping/ScanGroupHelper.cs.meta old mode 100644 new mode 100755 diff --git a/Core/Game/Managers.meta b/Core/Game/Managers.meta old mode 100644 new mode 100755 diff --git a/Core/Game/Managers/ClientManager.cs b/Core/Game/Managers/ClientManager.cs old mode 100644 new mode 100755 diff --git a/Core/Game/Managers/ClientManager.cs.meta b/Core/Game/Managers/ClientManager.cs.meta old mode 100644 new mode 100755 diff --git a/Core/Game/Managers/FrameManager.cs b/Core/Game/Managers/FrameManager.cs old mode 100644 new mode 100755 index 1b614f34..1f5da40f --- a/Core/Game/Managers/FrameManager.cs +++ b/Core/Game/Managers/FrameManager.cs @@ -11,11 +11,11 @@ public static class FrameManager public static Frame[] Frames {get {return frames;}} private static int capacity = StartCapacity; private static int _foreSight; - + public static int LoadedFrames { get; private set;} public static int ForeSight { get { return _foreSight;} - set + private set { _foreSight = value; @@ -100,6 +100,7 @@ public static void AddFrame(int frameCount, Frame frame) { ForeSight++; nextFrame++; + LoadedFrames++; } } diff --git a/Core/Game/Managers/FrameManager.cs.meta b/Core/Game/Managers/FrameManager.cs.meta old mode 100644 new mode 100755 diff --git a/Core/Game/Managers/GameManager.meta b/Core/Game/Managers/GameManager.meta old mode 100644 new mode 100755 diff --git a/Core/Game/Managers/GameManager/GameManager.cs b/Core/Game/Managers/GameManager/GameManager.cs old mode 100644 new mode 100755 diff --git a/Core/Game/Managers/GameManager/GameManager.cs.meta b/Core/Game/Managers/GameManager/GameManager.cs.meta old mode 100644 new mode 100755 diff --git a/Core/Game/Managers/Input.meta b/Core/Game/Managers/Input.meta old mode 100644 new mode 100755 diff --git a/Core/Game/Managers/Input/InputCodeManager.cs b/Core/Game/Managers/Input/InputCodeManager.cs old mode 100644 new mode 100755 diff --git a/Core/Game/Managers/Input/InputCodeManager.cs.meta b/Core/Game/Managers/Input/InputCodeManager.cs.meta old mode 100644 new mode 100755 diff --git a/Core/Game/Managers/LSServer.cs b/Core/Game/Managers/LSServer.cs old mode 100644 new mode 100755 diff --git a/Core/Game/Managers/LSServer.cs.meta b/Core/Game/Managers/LSServer.cs.meta old mode 100644 new mode 100755 diff --git a/Core/Game/Managers/LockstepManager.cs b/Core/Game/Managers/LockstepManager.cs old mode 100644 new mode 100755 index 69423802..6c95b0a6 --- a/Core/Game/Managers/LockstepManager.cs +++ b/Core/Game/Managers/LockstepManager.cs @@ -30,298 +30,341 @@ namespace Lockstep { - //TODO: Set up default functions to implement LSManager - public static class LockstepManager - { - public static readonly System.Diagnostics.Stopwatch SimulationTimer = new System.Diagnostics.Stopwatch(); + //TODO: Set up default functions to implement LSManager + public static class LockstepManager + { + public static readonly System.Diagnostics.Stopwatch SimulationTimer = new System.Diagnostics.Stopwatch (); - /// - /// Seconds since start if the last session. - /// - /// The seconds. - public static double Seconds { get { return SimulationTimer.ElapsedTicks / (double)System.TimeSpan.TicksPerSecond; } } + /// + /// Seconds since start if the last session. + /// + /// The seconds. + public static double Seconds { get { return SimulationTimer.ElapsedTicks / (double)System.TimeSpan.TicksPerSecond; } } - public static MonoBehaviour UnityInstance { get; private set; } + public static MonoBehaviour UnityInstance { get; private set; } - public const int FrameRate = 32; - public const int InfluenceResolution = 2; - public const float BaseDeltaTime = (float)(1d / FrameRate); + public const int FrameRate = 32; + public const int InfluenceResolution = 2; + public const float BaseDeltaTime = (float)(1d / FrameRate); - private static int InfluenceCount; + private static int InfluenceCount; - public static int InfluenceFrameCount { get; private set; } + public static int InfluenceFrameCount { get; private set; } - public static int FrameCount { get; private set; } + public static int FrameCount { get; private set; } - public static bool GameStarted { get; private set; } + public static bool GameStarted { get; private set; } - public static bool Loaded { get; private set; } + public static bool Loaded { get; private set; } - private static GameManager _mainGameManager; + private static GameManager _mainGameManager; - public static event Action onSetup; - public static event Action onInitialize; + public static event Action onSetup; + public static event Action onInitialize; - public static GameManager MainGameManager - { - get - { - if (_mainGameManager == null) - throw new System.Exception("MainGameManager has exploded!"); - return _mainGameManager; - } - private set - { - _mainGameManager = value; - } - } + public static GameManager MainGameManager { + get { + if (_mainGameManager == null) + throw new System.Exception ("MainGameManager has exploded!"); + return _mainGameManager; + } + private set { + _mainGameManager = value; + } + } - public static void Reset () { - LockstepManager.Deactivate(); - GameObject copy = GameObject.Instantiate(MainGameManager.gameObject); - GameObject.Destroy(MainGameManager.gameObject); - } + public static int PauseCount { get; private set; } - internal static void Setup() - { - DefaultMessageRaiser.EarlySetup(); + public static bool IsPaused { get { return PauseCount > 0; } } - LSDatabaseManager.Setup(); + public static void Pause () + { + PauseCount++; + } + + public static void Unpause () + { + PauseCount--; + } + + public static void Reset () + { + LockstepManager.Deactivate (); + GameObject copy = GameObject.Instantiate (MainGameManager.gameObject); + + } + + internal static void Setup () + { + DefaultMessageRaiser.EarlySetup (); + + LSDatabaseManager.Setup (); Command.Setup (); - UnityInstance = GameObject.CreatePrimitive(PrimitiveType.Quad).AddComponent(); - GameObject.Destroy(UnityInstance.GetComponent()); - UnityInstance.GetComponent().enabled = false; - GameObject.DontDestroyOnLoad(UnityInstance.gameObject); + UnityInstance = GameObject.CreatePrimitive (PrimitiveType.Quad).AddComponent (); + GameObject.Destroy (UnityInstance.GetComponent ()); + UnityInstance.GetComponent ().enabled = false; + GameObject.DontDestroyOnLoad (UnityInstance.gameObject); - GridManager.Setup(); - AbilityDataItem.Setup(); + GridManager.Setup (); + AbilityDataItem.Setup (); - AgentController.Setup(); - TeamManager.Setup(); - - ProjectileManager.Setup(); - EffectManager.Setup(); - - PhysicsManager.Setup(); - ClientManager.Setup(); - - Time.fixedDeltaTime = BaseDeltaTime; - Time.maximumDeltaTime = Time.fixedDeltaTime * 2; - InputCodeManager.Setup(); - - - DefaultMessageRaiser.LateSetup(); - if (onSetup != null) - onSetup (); - } - - internal static void Initialize(GameManager gameManager) - { - MainGameManager = gameManager; - - if (!Loaded) - { - Setup(); - Loaded = true; - } - - InitializeHelpers(); - - - DefaultMessageRaiser.EarlyInitialize(); - SimulationTimer.Stop(); - SimulationTimer.Reset(); - SimulationTimer.Start(); - LSDatabaseManager.Initialize(); - LSUtility.Initialize(1); - InfluenceCount = 0; - Time.timeScale = 1f; - Stalled = true; - - FrameCount = 0; - InfluenceFrameCount = 0; - - ClientManager.Initialize(MainGameManager.MainNetworkHelper); - - TriggerManager.Initialize(); - - GridManager.Initialize(); - - TeamManager.Initialize(); - - CoroutineManager.Initialize(); - FrameManager.Initialize(); - - CommandManager.Initialize(); - - AgentController.Initialize(); - TeamManager.LateInitialize(); - - PhysicsManager.Initialize(); - PlayerManager.Initialize(); - SelectionManager.Initialize(); - InfluenceManager.Initialize(); - ProjectileManager.Initialize(); - - DefaultMessageRaiser.LateInitialize(); - - BehaviourHelperManager.LateInitialize(); - if (onInitialize != null) - onInitialize (); - } - - static void InitializeHelpers() - { - FastList helpers = new FastList(); - MainGameManager.GetBehaviourHelpers(helpers); - BehaviourHelperManager.Initialize(helpers.ToArray()); - } - - static bool Stalled; - - internal static void Simulate() - { - MainGameManager.MainNetworkHelper.Simulate(); - DefaultMessageRaiser.EarlySimulate(); - if (InfluenceCount == 0) - { - InfluenceSimulate(); - InfluenceCount = InfluenceResolution - 1; - if (FrameManager.CanAdvanceFrame == false) - { - Stalled = true; - return; - } - Stalled = false; - if (InfluenceFrameCount == 0) - { - GameStart (); - } - FrameManager.Simulate(); - InfluenceFrameCount++; - } else - { - InfluenceCount--; - } - if (Stalled) - { - return; - } - - - BehaviourHelperManager.Simulate(); - AgentController.Simulate(); - PhysicsManager.Simulate(); - CoroutineManager.Simulate(); - InfluenceManager.Simulate(); - ProjectileManager.Simulate(); - TeamManager.Simulate(); - - TriggerManager.Simulate(); - - LateSimulate(); - FrameCount++; - - } - - private static void GameStart() - { - BehaviourHelperManager.GameStart(); - GameStarted = true; - - } - - private static void LateSimulate() - { - BehaviourHelperManager.LateSimulate(); - AgentController.LateSimulate(); - PhysicsManager.LateSimulate(); - DefaultMessageRaiser.LateSimulate(); - } - - internal static void InfluenceSimulate() - { - PlayerManager.Simulate(); - CommandManager.Simulate(); - ClientManager.Simulate(); - } - - internal static void Execute(Command com) - { - if (!GameStarted) - { - Debug.LogError("BOOM"); - return; - } - AgentController cont = AgentController.InstanceManagers [com.ControllerID]; - cont.Execute(com); - - - DefaultMessageRaiser.Execute(com); - - } - - internal static void Visualize() - { - if (!GameStarted) return; - DefaultMessageRaiser.EarlyVisualize(); - PlayerManager.Visualize(); - BehaviourHelperManager.Visualize(); - PhysicsManager.Visualize(); - AgentController.Visualize(); - ProjectileManager.Visualize(); - EffectManager.Visualize(); - - TeamManager.Visualize(); - } - - internal static void LateVisualize() - { - DefaultMessageRaiser.LateVisualize(); - - } - - internal static void DrawGUI() - { - - } - - internal static void Deactivate() - { - DefaultMessageRaiser.EarlyDeactivate(); - - if (GameStarted == false) - return; - Selector.Clear(); - AgentController.Deactivate(); - BehaviourHelperManager.Deactivate(); - ProjectileManager.Deactivate(); - EffectManager.Deactivate(); - ClientManager.Deactivate(); - - TeamManager.Deactivate(); - ClientManager.Quit(); - PhysicsManager.Deactivate(); - GameStarted = false; - LSServer.Deactivate(); - DefaultMessageRaiser.LateDeactivate(); - } - - public static void Quit() - { - ClientManager.Quit(); - } - - public static int GetStateHash() - { - int hash = LSUtility.PeekRandom(int.MaxValue); - hash += 1; - hash ^= AgentController.GetStateHash(); - hash += 1; - hash ^= ProjectileManager.GetStateHash(); - hash += 1; - return hash; - } - } + AgentController.Setup (); + TeamManager.Setup (); + + ProjectileManager.Setup (); + EffectManager.Setup (); + + PhysicsManager.Setup (); + ClientManager.Setup (); + + Time.fixedDeltaTime = BaseDeltaTime; + Time.maximumDeltaTime = Time.fixedDeltaTime * 2; + InputCodeManager.Setup (); + + + DefaultMessageRaiser.LateSetup (); + if (onSetup != null) + onSetup (); + + + } + + private static long _playRate = FixedMath.One; + public static long PlayRate + { + get + { + return _playRate; + } + set + { + if (value != _playRate) + { + _playRate = value; + Time.timeScale = PlayRate.ToFloat(); + //Time.fixedDeltaTime = BaseDeltaTime / _playRate.ToFloat(); + } + } + } + + public static float FloatPlayRate + { + get { return _playRate.ToFloat(); } + set + { + PlayRate = FixedMath.Create(value); + } + } + + internal static void Initialize (GameManager gameManager) + { + PlayRate = FixedMath.One; + //PauseCount = 0; + MainGameManager = gameManager; + + if (!Loaded) { + Setup (); + Loaded = true; + } + + + + DefaultMessageRaiser.EarlyInitialize (); + SimulationTimer.Stop (); + SimulationTimer.Reset (); + SimulationTimer.Start (); + LSDatabaseManager.Initialize (); + LSUtility.Initialize (1); + InfluenceCount = 0; + Time.timeScale = 1f; + + Stalled = true; + + FrameCount = 0; + InfluenceFrameCount = 0; + + ClientManager.Initialize (MainGameManager.MainNetworkHelper); + + TriggerManager.Initialize (); + + GridManager.Initialize (); + + TeamManager.Initialize (); + + CoroutineManager.Initialize (); + FrameManager.Initialize (); + + CommandManager.Initialize (); + + AgentController.Initialize (); + TeamManager.LateInitialize (); + + PhysicsManager.Initialize (); + PlayerManager.Initialize (); + SelectionManager.Initialize (); + InfluenceManager.Initialize (); + ProjectileManager.Initialize (); + + DefaultMessageRaiser.LateInitialize (); + InitializeHelpers (); + BehaviourHelperManager.LateInitialize (); + if (onInitialize != null) + onInitialize (); + } + + static void InitializeHelpers () + { + FastList helpers = new FastList (); + MainGameManager.GetBehaviourHelpers (helpers); + BehaviourHelperManager.Initialize (helpers.ToArray ()); + } + + static bool Stalled; + + internal static void Simulate () + { + MainGameManager.MainNetworkHelper.Simulate (); + DefaultMessageRaiser.EarlySimulate (); + if (InfluenceCount == 0) { + InfluenceSimulate (); + InfluenceCount = InfluenceResolution - 1; + if (FrameManager.CanAdvanceFrame == false) { + Stalled = true; + return; + } + Stalled = false; + if (InfluenceFrameCount == 0) { + GameStart (); + } + FrameManager.Simulate (); + InfluenceFrameCount++; + } else { + InfluenceCount--; + } + if (Stalled || IsPaused) { + return; + } + + + BehaviourHelperManager.Simulate (); + AgentController.Simulate (); + PhysicsManager.Simulate (); + CoroutineManager.Simulate (); + InfluenceManager.Simulate (); + ProjectileManager.Simulate (); + TeamManager.Simulate (); + + TriggerManager.Simulate (); + + LateSimulate (); + FrameCount++; + + } + + private static void GameStart () + { + BehaviourHelperManager.GameStart (); + GameStarted = true; + + } + + private static void LateSimulate () + { + BehaviourHelperManager.LateSimulate (); + AgentController.LateSimulate (); + PhysicsManager.LateSimulate (); + DefaultMessageRaiser.LateSimulate (); + } + + internal static void InfluenceSimulate () + { + PlayerManager.Simulate (); + CommandManager.Simulate (); + ClientManager.Simulate (); + } + + internal static void Execute (Command com) + { + if (!GameStarted) { + Debug.LogError ("BOOM"); + return; + } + if (com.ControllerID != byte.MaxValue) { + AgentController cont = AgentController.InstanceManagers [com.ControllerID]; + cont.Execute (com); + } else { + BehaviourHelperManager.Execute (com); + } + + DefaultMessageRaiser.Execute (com); + + } + + internal static void Visualize () + { + if (!GameStarted) + return; + DefaultMessageRaiser.EarlyVisualize (); + PlayerManager.Visualize (); + BehaviourHelperManager.Visualize (); + PhysicsManager.Visualize (); + AgentController.Visualize (); + ProjectileManager.Visualize (); + EffectManager.Visualize (); + + TeamManager.Visualize (); + } + + internal static void LateVisualize () + { + DefaultMessageRaiser.LateVisualize (); + + } + + internal static void DrawGUI () + { + + } + + internal static void Deactivate () + { + DefaultMessageRaiser.EarlyDeactivate (); + + if (GameStarted == false) + return; + Selector.Clear (); + AgentController.Deactivate (); + BehaviourHelperManager.Deactivate (); + ProjectileManager.Deactivate (); + EffectManager.Deactivate (); + ClientManager.Deactivate (); + + TeamManager.Deactivate (); + ClientManager.Quit (); + PhysicsManager.Deactivate (); + GameStarted = false; + LSServer.Deactivate (); + DefaultMessageRaiser.LateDeactivate (); + + if (MainGameManager.gameObject != null) + GameObject.Destroy (MainGameManager.gameObject); + } + + public static void Quit () + { + ClientManager.Quit (); + } + + public static int GetStateHash () + { + int hash = LSUtility.PeekRandom (int.MaxValue); + hash += 1; + hash ^= AgentController.GetStateHash (); + hash += 1; + hash ^= ProjectileManager.GetStateHash (); + hash += 1; + return hash; + } + } } \ No newline at end of file diff --git a/Core/Game/Managers/LockstepManager.cs.meta b/Core/Game/Managers/LockstepManager.cs.meta old mode 100644 new mode 100755 diff --git a/Core/Game/Managers/MessageType.cs b/Core/Game/Managers/MessageType.cs old mode 100644 new mode 100755 diff --git a/Core/Game/Managers/MessageType.cs.meta b/Core/Game/Managers/MessageType.cs.meta old mode 100644 new mode 100755 diff --git a/Core/Game/Managers/Network.meta b/Core/Game/Managers/Network.meta old mode 100644 new mode 100755 diff --git a/Core/Game/Managers/Network/NetworkHelper.cs b/Core/Game/Managers/Network/NetworkHelper.cs old mode 100644 new mode 100755 index 8649e523..6c3930c7 --- a/Core/Game/Managers/Network/NetworkHelper.cs +++ b/Core/Game/Managers/Network/NetworkHelper.cs @@ -84,10 +84,10 @@ protected void Receive (MessageType messageType, byte[] data) { OnDataReceived.Invoke (messageType,data); //Huge switch statement for distributing data based on MessageType switch (messageType) { - case MessageType.Input: - if (OnInputData != null) { - OnInputData.Invoke (data); - } + case MessageType.Input: + if (OnInputData != null) { + OnInputData.Invoke (data); + } break; case MessageType.Frame: if (OnFrameData != null) { diff --git a/Core/Game/Managers/Network/NetworkHelper.cs.meta b/Core/Game/Managers/Network/NetworkHelper.cs.meta old mode 100644 new mode 100755 diff --git a/Core/Game/Managers/Replay.cs b/Core/Game/Managers/Replay.cs old mode 100644 new mode 100755 index 7b43cf80..e730c0a7 --- a/Core/Game/Managers/Replay.cs +++ b/Core/Game/Managers/Replay.cs @@ -1,13 +1,26 @@ using System; - namespace Lockstep { [Serializable] public sealed class Replay { public byte[] Content; - - // TODO: Temporary for tests, remove later public long hash; + public string Name; + public string Date; + public float Seconds { + get { return (float)FrameManager.Frames.Length / (float)LockstepManager.FrameRate; } + } + + public string SerializeAsString() + { + String base64String = Convert.ToBase64String(Content); + return base64String; + } + + public void DeserializeString(string data) + { + Content = Convert.FromBase64String(data); + } } } \ No newline at end of file diff --git a/Core/Game/Managers/Replay.cs.meta b/Core/Game/Managers/Replay.cs.meta old mode 100644 new mode 100755 diff --git a/Core/Game/Managers/ReplayManager.cs b/Core/Game/Managers/ReplayManager.cs old mode 100644 new mode 100755 index 069bc70a..ff323288 --- a/Core/Game/Managers/ReplayManager.cs +++ b/Core/Game/Managers/ReplayManager.cs @@ -12,6 +12,9 @@ public static class ReplayManager #region public members public static bool IsPlayingBack; + + public static System.Action onIsPlayingBack; + public static Replay CurrentReplay; #endregion @@ -30,6 +33,11 @@ public static void Play (Replay replay) { IsPlayingBack = true; StartStreaming (replay); + FrameManager.AdjustFramerate = false; + + if (onIsPlayingBack != null) { + onIsPlayingBack.Invoke(IsPlayingBack); + } } public static void Stop () @@ -39,8 +47,14 @@ public static void Stop () AgentController.Deactivate (); IsPlayingBack = false; StopStreaming (); + + if (onIsPlayingBack != null) { + onIsPlayingBack.Invoke(IsPlayingBack); + } } - } + FrameManager.AdjustFramerate = true; + + } static Writer cachedWriter = new Writer(); public static Replay SerializeCurrent () { @@ -129,9 +143,7 @@ public static IEnumerator StreamPlayback (Replay playbackReplay) yield break; } - public static void ChangeTimescale (float newScale) { - Time.timeScale = newScale; - } + private static void StartStreaming (Replay replay) { @@ -147,12 +159,8 @@ private static void StopStreaming () } } #endregion - } - public enum RecordState - { - None, - Record, - Playback + } + } \ No newline at end of file diff --git a/Core/Game/Managers/ReplayManager.cs.meta b/Core/Game/Managers/ReplayManager.cs.meta old mode 100644 new mode 100755 diff --git a/Core/Game/Managers/ServerSimulator.cs b/Core/Game/Managers/ServerSimulator.cs old mode 100644 new mode 100755 diff --git a/Core/Game/Managers/ServerSimulator.cs.meta b/Core/Game/Managers/ServerSimulator.cs.meta old mode 100644 new mode 100755 diff --git a/Core/Game/Networking.meta b/Core/Game/Networking.meta old mode 100644 new mode 100755 diff --git a/Core/Game/Networking/NetworkHelperTester.cs b/Core/Game/Networking/NetworkHelperTester.cs old mode 100644 new mode 100755 diff --git a/Core/Game/Networking/NetworkHelperTester.cs.meta b/Core/Game/Networking/NetworkHelperTester.cs.meta old mode 100644 new mode 100755 diff --git a/Core/Game/Player.meta b/Core/Game/Player.meta old mode 100644 new mode 100755 diff --git a/Core/Game/Player/Commands.meta b/Core/Game/Player/Commands.meta old mode 100644 new mode 100755 diff --git a/Core/Game/Player/Commands/Command.cs b/Core/Game/Player/Commands/Command.cs old mode 100644 new mode 100755 index 33c74643..d2dc4796 --- a/Core/Game/Player/Commands/Command.cs +++ b/Core/Game/Player/Commands/Command.cs @@ -66,13 +66,8 @@ public Command() { } - public Command(ushort inputCode) - { - this.Initialize(); - InputCode = inputCode; - } - public Command(ushort inputCode, byte controllerID) + public Command(ushort inputCode, byte controllerID = byte.MaxValue) { this.Initialize(); this.InputCode = inputCode; @@ -136,6 +131,14 @@ public void Add(TData item) where TData : ICommandData } return default(TData); } + public TData[] GetDataArray() where TData : ICommandData{ + int count = this.GetDataCount (); + TData[] array = new TData[count]; + for (int i = 0; i < count; i++) { + array [i] = GetData (i); + } + return array; + } public bool TryGetData (out TData data, int index = 0) where TData : ICommandData { data = default(TData); diff --git a/Core/Game/Player/Commands/Command.cs.meta b/Core/Game/Player/Commands/Command.cs.meta old mode 100644 new mode 100755 diff --git a/Core/Game/Player/Commands/CommandManager.cs b/Core/Game/Player/Commands/CommandManager.cs old mode 100644 new mode 100755 diff --git a/Core/Game/Player/Commands/CommandManager.cs.meta b/Core/Game/Player/Commands/CommandManager.cs.meta old mode 100644 new mode 100755 diff --git a/Core/Game/Player/Commands/Default.meta b/Core/Game/Player/Commands/Default.meta old mode 100644 new mode 100755 diff --git a/Core/Game/Player/Commands/Default/BaseSerializableValue.cs b/Core/Game/Player/Commands/Default/BaseSerializableValue.cs old mode 100644 new mode 100755 diff --git a/Core/Game/Player/Commands/Default/BaseSerializableValue.cs.meta b/Core/Game/Player/Commands/Default/BaseSerializableValue.cs.meta old mode 100644 new mode 100755 diff --git a/Core/Game/Player/Commands/Default/DefaultData.cs b/Core/Game/Player/Commands/Default/DefaultData.cs old mode 100644 new mode 100755 diff --git a/Core/Game/Player/Commands/Default/DefaultData.cs.meta b/Core/Game/Player/Commands/Default/DefaultData.cs.meta old mode 100644 new mode 100755 diff --git a/Core/Game/Player/Commands/Default/EmptyData.cs b/Core/Game/Player/Commands/Default/EmptyData.cs old mode 100644 new mode 100755 diff --git a/Core/Game/Player/Commands/Default/EmptyData.cs.meta b/Core/Game/Player/Commands/Default/EmptyData.cs.meta old mode 100644 new mode 100755 diff --git a/Core/Game/Player/Commands/Default/SerializableValue.cs b/Core/Game/Player/Commands/Default/SerializableValue.cs old mode 100644 new mode 100755 diff --git a/Core/Game/Player/Commands/Default/SerializableValue.cs.meta b/Core/Game/Player/Commands/Default/SerializableValue.cs.meta old mode 100644 new mode 100755 diff --git a/Core/Game/Player/Commands/ICommandData.cs b/Core/Game/Player/Commands/ICommandData.cs old mode 100644 new mode 100755 diff --git a/Core/Game/Player/Commands/ICommandData.cs.meta b/Core/Game/Player/Commands/ICommandData.cs.meta old mode 100644 new mode 100755 diff --git a/Core/Game/Player/OrderMarker.cs b/Core/Game/Player/OrderMarker.cs old mode 100644 new mode 100755 diff --git a/Core/Game/Player/OrderMarker.cs.meta b/Core/Game/Player/OrderMarker.cs.meta old mode 100644 new mode 100755 diff --git a/Core/Game/Player/PlayerManager.cs b/Core/Game/Player/PlayerManager.cs old mode 100644 new mode 100755 diff --git a/Core/Game/Player/PlayerManager.cs.meta b/Core/Game/Player/PlayerManager.cs.meta old mode 100644 new mode 100755 diff --git a/Core/Game/Player/RTSInterfacing.cs b/Core/Game/Player/RTSInterfacing.cs old mode 100644 new mode 100755 diff --git a/Core/Game/Player/RTSInterfacing.cs.meta b/Core/Game/Player/RTSInterfacing.cs.meta old mode 100644 new mode 100755 diff --git a/Core/Game/Player/RTSInterfacingHelper.cs b/Core/Game/Player/RTSInterfacingHelper.cs old mode 100644 new mode 100755 diff --git a/Core/Game/Player/RTSInterfacingHelper.cs.meta b/Core/Game/Player/RTSInterfacingHelper.cs.meta old mode 100644 new mode 100755 diff --git a/Core/Game/Player/SelectionManager.cs b/Core/Game/Player/SelectionManager.cs old mode 100644 new mode 100755 diff --git a/Core/Game/Player/SelectionManager.cs.meta b/Core/Game/Player/SelectionManager.cs.meta old mode 100644 new mode 100755 diff --git a/Core/Game/Player/UI.meta b/Core/Game/Player/UI.meta old mode 100644 new mode 100755 diff --git a/Core/Game/Player/UI/BarElement.cs b/Core/Game/Player/UI/BarElement.cs old mode 100644 new mode 100755 diff --git a/Core/Game/Player/UI/BarElement.cs.meta b/Core/Game/Player/UI/BarElement.cs.meta old mode 100644 new mode 100755 diff --git a/Core/Game/Player/UI/Icons/asset1.psd b/Core/Game/Player/UI/Icons/asset1.psd old mode 100644 new mode 100755 diff --git a/Core/Game/Player/UI/Icons/asset1.psd.meta b/Core/Game/Player/UI/Icons/asset1.psd.meta old mode 100644 new mode 100755 diff --git a/Core/Game/Player/UI/StatsBar.cs b/Core/Game/Player/UI/StatsBar.cs old mode 100644 new mode 100755 diff --git a/Core/Game/Player/UI/StatsBar.cs.meta b/Core/Game/Player/UI/StatsBar.cs.meta old mode 100644 new mode 100755 diff --git a/Core/Game/Player/Utility.meta b/Core/Game/Player/Utility.meta old mode 100644 new mode 100755 diff --git a/Core/Game/Player/Utility/BoxedAgents.cs b/Core/Game/Player/Utility/BoxedAgents.cs old mode 100644 new mode 100755 diff --git a/Core/Game/Player/Utility/BoxedAgents.cs.meta b/Core/Game/Player/Utility/BoxedAgents.cs.meta old mode 100644 new mode 100755 diff --git a/Core/Game/Player/Utility/IMousable.cs b/Core/Game/Player/Utility/IMousable.cs old mode 100644 new mode 100755 diff --git a/Core/Game/Player/Utility/IMousable.cs.meta b/Core/Game/Player/Utility/IMousable.cs.meta old mode 100644 new mode 100755 diff --git a/Core/Game/Player/Utility/Selection.cs b/Core/Game/Player/Utility/Selection.cs old mode 100644 new mode 100755 diff --git a/Core/Game/Player/Utility/Selection.cs.meta b/Core/Game/Player/Utility/Selection.cs.meta old mode 100644 new mode 100755 diff --git a/Core/Game/Player/Utility/Selector.cs b/Core/Game/Player/Utility/Selector.cs old mode 100644 new mode 100755 diff --git a/Core/Game/Player/Utility/Selector.cs.meta b/Core/Game/Player/Utility/Selector.cs.meta old mode 100644 new mode 100755 diff --git a/Core/Game/Player/Visuals.meta b/Core/Game/Player/Visuals.meta old mode 100644 new mode 100755 diff --git a/Core/Game/Player/Visuals/BoxTexture.png b/Core/Game/Player/Visuals/BoxTexture.png old mode 100644 new mode 100755 diff --git a/Core/Game/Player/Visuals/BoxTexture.png.meta b/Core/Game/Player/Visuals/BoxTexture.png.meta old mode 100644 new mode 100755 diff --git a/Core/Game/Player/Visuals/EmptyIcon.png b/Core/Game/Player/Visuals/EmptyIcon.png old mode 100644 new mode 100755 diff --git a/Core/Game/Player/Visuals/EmptyIcon.png.meta b/Core/Game/Player/Visuals/EmptyIcon.png.meta old mode 100644 new mode 100755 diff --git a/Core/Game/Player/Visuals/RTS 3D Arrow.meta b/Core/Game/Player/Visuals/RTS 3D Arrow.meta old mode 100644 new mode 100755 diff --git a/Core/Game/Player/Visuals/RTS 3D Arrow/Material.meta b/Core/Game/Player/Visuals/RTS 3D Arrow/Material.meta old mode 100644 new mode 100755 diff --git a/Core/Game/Player/Visuals/RTS 3D Arrow/Material/Arrow.mat b/Core/Game/Player/Visuals/RTS 3D Arrow/Material/Arrow.mat old mode 100644 new mode 100755 diff --git a/Core/Game/Player/Visuals/RTS 3D Arrow/Material/Arrow.mat.meta b/Core/Game/Player/Visuals/RTS 3D Arrow/Material/Arrow.mat.meta old mode 100644 new mode 100755 diff --git a/Core/Game/Player/Visuals/RTS 3D Arrow/Material/Arrow.png b/Core/Game/Player/Visuals/RTS 3D Arrow/Material/Arrow.png old mode 100644 new mode 100755 diff --git a/Core/Game/Player/Visuals/RTS 3D Arrow/Material/Arrow.png.meta b/Core/Game/Player/Visuals/RTS 3D Arrow/Material/Arrow.png.meta old mode 100644 new mode 100755 diff --git a/Core/Game/Player/Visuals/RTS 3D Arrow/Material/Arrow.psd b/Core/Game/Player/Visuals/RTS 3D Arrow/Material/Arrow.psd old mode 100644 new mode 100755 diff --git a/Core/Game/Player/Visuals/RTS 3D Arrow/Material/Arrow.psd.meta b/Core/Game/Player/Visuals/RTS 3D Arrow/Material/Arrow.psd.meta old mode 100644 new mode 100755 diff --git a/Core/Game/Player/Visuals/RTS 3D Arrow/Mesh.meta b/Core/Game/Player/Visuals/RTS 3D Arrow/Mesh.meta old mode 100644 new mode 100755 diff --git a/Core/Game/Player/Visuals/RTS 3D Arrow/Mesh/Materials.meta b/Core/Game/Player/Visuals/RTS 3D Arrow/Mesh/Materials.meta old mode 100644 new mode 100755 diff --git a/Core/Game/Player/Visuals/RTS 3D Arrow/Mesh/Materials/Arrow.mat b/Core/Game/Player/Visuals/RTS 3D Arrow/Mesh/Materials/Arrow.mat old mode 100644 new mode 100755 diff --git a/Core/Game/Player/Visuals/RTS 3D Arrow/Mesh/Materials/Arrow.mat.meta b/Core/Game/Player/Visuals/RTS 3D Arrow/Mesh/Materials/Arrow.mat.meta old mode 100644 new mode 100755 diff --git a/Core/Game/Player/Visuals/RTS 3D Arrow/Mesh/ModifiedPlay.anim b/Core/Game/Player/Visuals/RTS 3D Arrow/Mesh/ModifiedPlay.anim old mode 100644 new mode 100755 diff --git a/Core/Game/Player/Visuals/RTS 3D Arrow/Mesh/ModifiedPlay.anim.meta b/Core/Game/Player/Visuals/RTS 3D Arrow/Mesh/ModifiedPlay.anim.meta old mode 100644 new mode 100755 diff --git a/Core/Game/Player/Visuals/RTS 3D Arrow/Mesh/RTS_Arrow.fbx b/Core/Game/Player/Visuals/RTS 3D Arrow/Mesh/RTS_Arrow.fbx old mode 100644 new mode 100755 diff --git a/Core/Game/Player/Visuals/RTS 3D Arrow/Mesh/RTS_Arrow.fbx.meta b/Core/Game/Player/Visuals/RTS 3D Arrow/Mesh/RTS_Arrow.fbx.meta old mode 100644 new mode 100755 diff --git a/Core/Game/Player/Visuals/RTS 3D Arrow/RTS_Arrow.prefab b/Core/Game/Player/Visuals/RTS 3D Arrow/RTS_Arrow.prefab old mode 100644 new mode 100755 diff --git a/Core/Game/Player/Visuals/RTS 3D Arrow/RTS_Arrow.prefab.meta b/Core/Game/Player/Visuals/RTS 3D Arrow/RTS_Arrow.prefab.meta old mode 100644 new mode 100755 diff --git a/Core/Game/Player/Visuals/RTS 3D Arrow/Shader.meta b/Core/Game/Player/Visuals/RTS 3D Arrow/Shader.meta old mode 100644 new mode 100755 diff --git a/Core/Game/Player/Visuals/RTS 3D Arrow/Shader/ArrowShader.shader b/Core/Game/Player/Visuals/RTS 3D Arrow/Shader/ArrowShader.shader old mode 100644 new mode 100755 diff --git a/Core/Game/Player/Visuals/RTS 3D Arrow/Shader/ArrowShader.shader.meta b/Core/Game/Player/Visuals/RTS 3D Arrow/Shader/ArrowShader.shader.meta old mode 100644 new mode 100755 diff --git a/Core/Game/Projectiles.meta b/Core/Game/Projectiles.meta old mode 100644 new mode 100755 diff --git a/Core/Game/Projectiles/DamageManager.cs b/Core/Game/Projectiles/DamageManager.cs old mode 100644 new mode 100755 diff --git a/Core/Game/Projectiles/DamageManager.cs.meta b/Core/Game/Projectiles/DamageManager.cs.meta old mode 100644 new mode 100755 diff --git a/Core/Game/Projectiles/HitType.cs b/Core/Game/Projectiles/HitType.cs old mode 100644 new mode 100755 diff --git a/Core/Game/Projectiles/HitType.cs.meta b/Core/Game/Projectiles/HitType.cs.meta old mode 100644 new mode 100755 diff --git a/Core/Game/Projectiles/LSProjectile.cs b/Core/Game/Projectiles/LSProjectile.cs old mode 100644 new mode 100755 index 811e4c8e..e5cf40fc --- a/Core/Game/Projectiles/LSProjectile.cs +++ b/Core/Game/Projectiles/LSProjectile.cs @@ -12,8 +12,8 @@ namespace Lockstep { public sealed class LSProjectile : CerealBehaviour { + public const int DefaultTickRate = LockstepManager.FrameRate / 4; private const long Gravity = FixedMath.One * 98 / 10; - public const int TickRate = LockstepManager.FrameRate / 4; // // Static Fields // @@ -83,8 +83,6 @@ public sealed class LSProjectile : CerealBehaviour public bool IsActive; public bool UseEffects; - - public bool RotateHitFX = true; [SerializeField] private bool _canVisualize = true; @@ -116,11 +114,17 @@ public sealed class LSProjectile : CerealBehaviour [SerializeField, FrameCount] private int _lastingDuration; + [SerializeField, FrameCount] + private int _tickRate = DefaultTickRate; + // // Properties // - public uint SpawnVersion { get; private set; } + public uint SpawnVersion { get; private set; } + + //PAPPS ADDED THIS: it detaches the children particle effects inside the projectile, and siwtches em off.. REALLY NECESSARY + public bool DoReleaseChildren = false; public int AliveTime { @@ -140,6 +144,8 @@ public long Angle public int LastingDuration { get; set; } + public int TickRate { get; set;} + public Vector3 EndPoint { get @@ -244,6 +250,7 @@ public int GetStateHash() private void ApplyArea(Vector2d center, long radius) { long num = radius * radius; + foreach (LSAgent agent in Scan(center, radius)) { if (agent.Body._position.FastDistance(center.x, center.y) < num) @@ -307,15 +314,17 @@ private bool CheckCollision(LSBody target) private IEnumerable Scan(Vector2d center, long radius) { - foreach (LSAgent agent in InfluenceManager.ScanAll ( center, radius, this.AgentConditional, - this.BucketConditional)) + this.BucketConditional + ) + ) { yield return agent; } + } private void SetupCachedActions() @@ -359,7 +368,7 @@ private void Hit(bool destroy = true) this.OnHit(); if (this.onHit.IsNotNull()) { - this.onHit(this); + this.onHit(); } if (this.UseEffects) { @@ -374,10 +383,10 @@ private void Hit(bool destroy = true) */ } else { - if (RotateHitFX) - EffectManager.LazyCreateEffect(this.HitFX, this.cachedTransform.position, this.cachedTransform.rotation); - else - EffectManager.LazyCreateEffect(this.HitFX, this.cachedTransform.position); + + { + EffectManager.LazyCreateEffect(this.HitFX, this.cachedTransform.position, this.cachedTransform.rotation); + } } } @@ -409,6 +418,7 @@ internal void Prepare(int id, Vector3d projectilePosition, Func ag this.BucketConditional = bucketConditional; + this.AgentConditional = agentConditional; Forward = Vector2d.up; @@ -487,6 +497,7 @@ public void LateInit() this.arcStartVerticalSpeed = (this.TargetHeight - this.Position.z).Div(timeToHit) + timeToHit.Mul(Gravity); } else { + if (timeToHit > 0) this.linearHeightSpeed = (this.TargetHeight - Position.z).Div(timeToHit).Abs() / LockstepManager.FrameRate; } @@ -514,7 +525,14 @@ public void LateInit() if (UseEffects) { - EffectManager.LazyCreateEffect(this.StartFX, this.Position.ToVector3(), this.cachedTransform.rotation); + LSEffect effect = EffectManager.LazyCreateEffect(this.StartFX, this.Position.ToVector3(), this.cachedTransform.rotation); + if (effect != null) + { + effect.StartPos = this.Position.ToVector3(); + effect.EndPos = this.TargetPosition.ToVector3(this.TargetHeight.ToFloat()); + if (this.Target != null) + effect.Target = Target.transform; + } } } @@ -535,7 +553,9 @@ private void OnHit () case HitType.Single: if (Target == null) { - throw new System.Exception("Cannot use single hit effect without target"); + //throw new System.Exception("Cannot use single hit effect without target"); + + break; } this.HitAgent(Target); break; @@ -547,11 +567,28 @@ private void OnHit () break; } } + //PAPPS ADDED THIS: + if(DoReleaseChildren){ + foreach(Transform each in transform){ + ParticleSystem ps; + if(ps = each.GetComponent()){ + each.parent = null; + ps.enableEmission = false; + foreach(Transform eachChild in each){ + ParticleSystem cps; + if(cps = eachChild.GetComponent()){ + cps.enableEmission = false; + } + } + } + } + } } private void ResetHit() { this.ExclusiveTargetType = this._exclusiveTargetType; + this.onHit = null; } private void ResetEffects() @@ -569,6 +606,8 @@ private void ResetTargeting() this.Delay = this._delay; this.Speed = this._speed; this.LastingDuration = this._lastingDuration; + this.TickRate = this._tickRate; + } private void ResetTrajectory() @@ -730,7 +769,7 @@ public void Visualize() // public event Action onDeactivate; - public event Action onHit; + public event Action onHit; public event Action onInitialize; diff --git a/Core/Game/Projectiles/LSProjectile.cs.meta b/Core/Game/Projectiles/LSProjectile.cs.meta old mode 100644 new mode 100755 diff --git a/Core/Game/Projectiles/ProjectileDataItem.cs b/Core/Game/Projectiles/ProjectileDataItem.cs old mode 100644 new mode 100755 diff --git a/Core/Game/Projectiles/ProjectileDataItem.cs.meta b/Core/Game/Projectiles/ProjectileDataItem.cs.meta old mode 100644 new mode 100755 diff --git a/Core/Game/Projectiles/ProjectileManager.cs b/Core/Game/Projectiles/ProjectileManager.cs old mode 100644 new mode 100755 index e1cbb122..b68da3ef --- a/Core/Game/Projectiles/ProjectileManager.cs +++ b/Core/Game/Projectiles/ProjectileManager.cs @@ -46,9 +46,10 @@ public static void Visualize () { for (int i = ProjectileBucket.PeakCount - 1; i >= 0; i--) { - if (ProjectileBucket.arrayAllocation[i]) - { - ProjectileBucket[i].Visualize (); + if (ProjectileBucket.arrayAllocation[i]) { + if (ProjectileBucket[i] != null) { + ProjectileBucket[i].Visualize(); + } } } VisualizeBucket (NDProjectileBucket); @@ -91,17 +92,31 @@ public static int GetStateHash () { private static LSProjectile NewProjectile (string projCode) { IProjectileData projData = CodeDataMap[projCode]; - curProj = ((GameObject)GameObject.Instantiate (projData.GetProjectile().gameObject)).GetComponent (); - curProj.Setup (projData); - return curProj; + if (projData.GetProjectile().gameObject != null) { + curProj = ((GameObject)GameObject.Instantiate(projData.GetProjectile().gameObject)).GetComponent(); + if (curProj != null) { + curProj.Setup(projData); + return curProj; + } + else return null; + } + else return null; } public static LSProjectile Create (string projCode, LSAgent source, Vector3d offset, AllegianceType targetAllegiance, Func agentConditional,Action hitEffect) { Vector2d relativePos = offset.ToVector2d(); - Vector2d worldPos = relativePos.Rotated(source.Body.Rotation); + Vector2d worldPos = relativePos.Rotated(source.Body.Rotation) + source.Body.Position; Vector3d pos = new Vector3d(worldPos.x,worldPos.y,offset.z + source.Body.HeightPos); - pos.Add(ref source.Body._position); - - return Create (projCode,pos,agentConditional,(bite) => ((source.Controller.GetAllegiance(bite) & targetAllegiance) != 0),hitEffect); + AgentController sourceController = source.Controller; + LSProjectile proj = Create ( + projCode, + pos, + agentConditional, + (bite) => { + return ((sourceController.GetAllegiance(bite) & targetAllegiance) != 0); + } + , + hitEffect); + return proj; } public static LSProjectile Create (string projCode, Vector3d position, Func agentConditional, Func bucketConditional, Action hitEffect) { @@ -128,17 +143,22 @@ private static LSProjectile RawCreate (string projCode) { } public static void Fire (LSProjectile projectile) { - projectile.LateInit (); + if (projectile != null) { + projectile.LateInit(); + } } private static FastBucket NDProjectileBucket = new FastBucket(); public static LSProjectile NDCreateAndFire (string projCode, Vector3d position, Vector3d direction, bool gravity = false) { - curProj = RawCreate (projCode); - int id = NDProjectileBucket.Add (curProj); - curProj.Prepare(id,position,(a)=>false,(a)=>false,(a)=>{}, false); - curProj.InitializeFree(direction,(a)=>false,gravity); - ProjectileManager.Fire (curProj); - return curProj; + if (curProj != null) { + curProj = RawCreate(projCode); + int id = NDProjectileBucket.Add(curProj); + curProj.Prepare(id, position, (a) => false, (a) => false, (a) => { }, false); + curProj.InitializeFree(direction, (a) => false, gravity); + ProjectileManager.Fire(curProj); + return curProj; + } + else return null; } public static void EndProjectile (LSProjectile projectile) diff --git a/Core/Game/Projectiles/ProjectileManager.cs.meta b/Core/Game/Projectiles/ProjectileManager.cs.meta old mode 100644 new mode 100755 diff --git a/Core/Game/Projectiles/TargetingType.cs b/Core/Game/Projectiles/TargetingType.cs old mode 100644 new mode 100755 diff --git a/Core/Game/Projectiles/TargetingType.cs.meta b/Core/Game/Projectiles/TargetingType.cs.meta old mode 100644 new mode 100755 diff --git a/Core/Simulation.meta b/Core/Simulation.meta old mode 100644 new mode 100755 diff --git a/Core/Simulation/Grid.meta b/Core/Simulation/Grid.meta old mode 100644 new mode 100755 diff --git a/Core/Simulation/Grid/Core.meta b/Core/Simulation/Grid/Core.meta old mode 100644 new mode 100755 diff --git a/Core/Simulation/Grid/Core/GridClosedSet.cs b/Core/Simulation/Grid/Core/GridClosedSet.cs old mode 100644 new mode 100755 diff --git a/Core/Simulation/Grid/Core/GridClosedSet.cs.meta b/Core/Simulation/Grid/Core/GridClosedSet.cs.meta old mode 100644 new mode 100755 diff --git a/Core/Simulation/Grid/Core/GridHeap.cs b/Core/Simulation/Grid/Core/GridHeap.cs old mode 100644 new mode 100755 diff --git a/Core/Simulation/Grid/Core/GridHeap.cs.meta b/Core/Simulation/Grid/Core/GridHeap.cs.meta old mode 100644 new mode 100755 diff --git a/Core/Simulation/Grid/Core/GridManager.cs b/Core/Simulation/Grid/Core/GridManager.cs old mode 100644 new mode 100755 diff --git a/Core/Simulation/Grid/Core/GridManager.cs.meta b/Core/Simulation/Grid/Core/GridManager.cs.meta old mode 100644 new mode 100755 diff --git a/Core/Simulation/Grid/Core/GridNode.cs b/Core/Simulation/Grid/Core/GridNode.cs old mode 100644 new mode 100755 diff --git a/Core/Simulation/Grid/Core/GridNode.cs.meta b/Core/Simulation/Grid/Core/GridNode.cs.meta old mode 100644 new mode 100755 diff --git a/Core/Simulation/Grid/Core/ScanNode.cs b/Core/Simulation/Grid/Core/ScanNode.cs old mode 100644 new mode 100755 diff --git a/Core/Simulation/Grid/Core/ScanNode.cs.meta b/Core/Simulation/Grid/Core/ScanNode.cs.meta old mode 100644 new mode 100755 diff --git a/Core/Simulation/Grid/Influence.meta b/Core/Simulation/Grid/Influence.meta old mode 100644 new mode 100755 diff --git a/Core/Simulation/Grid/Influence/DeltaCache.cs b/Core/Simulation/Grid/Influence/DeltaCache.cs old mode 100644 new mode 100755 diff --git a/Core/Simulation/Grid/Influence/DeltaCache.cs.meta b/Core/Simulation/Grid/Influence/DeltaCache.cs.meta old mode 100644 new mode 100755 diff --git a/Core/Simulation/Grid/Influence/InfluenceManager.cs b/Core/Simulation/Grid/Influence/InfluenceManager.cs old mode 100644 new mode 100755 diff --git a/Core/Simulation/Grid/Influence/InfluenceManager.cs.meta b/Core/Simulation/Grid/Influence/InfluenceManager.cs.meta old mode 100644 new mode 100755 diff --git a/Core/Simulation/Grid/Influence/LSInfluencer.cs b/Core/Simulation/Grid/Influence/LSInfluencer.cs old mode 100644 new mode 100755 diff --git a/Core/Simulation/Grid/Influence/LSInfluencer.cs.meta b/Core/Simulation/Grid/Influence/LSInfluencer.cs.meta old mode 100644 new mode 100755 diff --git a/Core/Simulation/Grid/Influence/Utility.meta b/Core/Simulation/Grid/Influence/Utility.meta old mode 100644 new mode 100755 diff --git a/Core/Simulation/Grid/Influence/Utility/DeltaCacheGenerator.cs b/Core/Simulation/Grid/Influence/Utility/DeltaCacheGenerator.cs old mode 100644 new mode 100755 diff --git a/Core/Simulation/Grid/Influence/Utility/DeltaCacheGenerator.cs.meta b/Core/Simulation/Grid/Influence/Utility/DeltaCacheGenerator.cs.meta old mode 100644 new mode 100755 diff --git a/Core/Simulation/Grid/Influence/Utility/DeltaCountCacheGenerator.cs b/Core/Simulation/Grid/Influence/Utility/DeltaCountCacheGenerator.cs old mode 100644 new mode 100755 diff --git a/Core/Simulation/Grid/Influence/Utility/DeltaCountCacheGenerator.cs.meta b/Core/Simulation/Grid/Influence/Utility/DeltaCountCacheGenerator.cs.meta old mode 100644 new mode 100755 diff --git a/Core/Simulation/Grid/Settings.meta b/Core/Simulation/Grid/Settings.meta old mode 100644 new mode 100755 diff --git a/Core/Simulation/Grid/Settings/GridSettings.cs b/Core/Simulation/Grid/Settings/GridSettings.cs old mode 100644 new mode 100755 diff --git a/Core/Simulation/Grid/Settings/GridSettings.cs.meta b/Core/Simulation/Grid/Settings/GridSettings.cs.meta old mode 100644 new mode 100755 diff --git a/Core/Simulation/Grid/Settings/GridSettingsSaver.cs b/Core/Simulation/Grid/Settings/GridSettingsSaver.cs old mode 100644 new mode 100755 diff --git a/Core/Simulation/Grid/Settings/GridSettingsSaver.cs.meta b/Core/Simulation/Grid/Settings/GridSettingsSaver.cs.meta old mode 100644 new mode 100755 diff --git a/Core/Simulation/Grid/Utility.meta b/Core/Simulation/Grid/Utility.meta old mode 100644 new mode 100755 diff --git a/Core/Simulation/Grid/Utility/Tools.meta b/Core/Simulation/Grid/Utility/Tools.meta old mode 100644 new mode 100755 diff --git a/Core/Simulation/Grid/Utility/Tools/Blocker.meta b/Core/Simulation/Grid/Utility/Tools/Blocker.meta old mode 100644 new mode 100755 diff --git a/Core/Simulation/Grid/Utility/Tools/Blocker/Blocker.cs b/Core/Simulation/Grid/Utility/Tools/Blocker/Blocker.cs old mode 100644 new mode 100755 diff --git a/Core/Simulation/Grid/Utility/Tools/Blocker/Blocker.cs.meta b/Core/Simulation/Grid/Utility/Tools/Blocker/Blocker.cs.meta old mode 100644 new mode 100755 diff --git a/Core/Simulation/Grid/Utility/Tools/Blocker/DynamicBlocker.cs b/Core/Simulation/Grid/Utility/Tools/Blocker/DynamicBlocker.cs old mode 100644 new mode 100755 diff --git a/Core/Simulation/Grid/Utility/Tools/Blocker/DynamicBlocker.cs.meta b/Core/Simulation/Grid/Utility/Tools/Blocker/DynamicBlocker.cs.meta old mode 100644 new mode 100755 diff --git a/Core/Simulation/Grid/Utility/Tools/Blocker/Test.meta b/Core/Simulation/Grid/Utility/Tools/Blocker/Test.meta old mode 100644 new mode 100755 diff --git a/Core/Simulation/Grid/Utility/Tools/Blocker/Test/BlockerTestScene.unity b/Core/Simulation/Grid/Utility/Tools/Blocker/Test/BlockerTestScene.unity old mode 100644 new mode 100755 diff --git a/Core/Simulation/Grid/Utility/Tools/Blocker/Test/BlockerTestScene.unity.meta b/Core/Simulation/Grid/Utility/Tools/Blocker/Test/BlockerTestScene.unity.meta old mode 100644 new mode 100755 diff --git a/Core/Simulation/Math.meta b/Core/Simulation/Math.meta old mode 100644 new mode 100755 diff --git a/Core/Simulation/Math/Coordinate.cs b/Core/Simulation/Math/Coordinate.cs old mode 100644 new mode 100755 diff --git a/Core/Simulation/Math/Coordinate.cs.meta b/Core/Simulation/Math/Coordinate.cs.meta old mode 100644 new mode 100755 diff --git a/Core/Simulation/Math/FixedMath.cs b/Core/Simulation/Math/FixedMath.cs old mode 100644 new mode 100755 diff --git a/Core/Simulation/Math/FixedMath.cs.meta b/Core/Simulation/Math/FixedMath.cs.meta old mode 100644 new mode 100755 diff --git a/Core/Simulation/Math/Vector2d.cs.meta b/Core/Simulation/Math/Vector2d.cs.meta old mode 100644 new mode 100755 diff --git a/Core/Simulation/Math/Vector2dHeight.cs b/Core/Simulation/Math/Vector2dHeight.cs old mode 100644 new mode 100755 diff --git a/Core/Simulation/Math/Vector2dHeight.cs.meta b/Core/Simulation/Math/Vector2dHeight.cs.meta old mode 100644 new mode 100755 diff --git a/Core/Simulation/Math/Vector3d.cs b/Core/Simulation/Math/Vector3d.cs old mode 100644 new mode 100755 diff --git a/Core/Simulation/Math/Vector3d.cs.meta b/Core/Simulation/Math/Vector3d.cs.meta old mode 100644 new mode 100755 diff --git a/Core/Simulation/Pathfinding.meta b/Core/Simulation/Pathfinding.meta old mode 100644 new mode 100755 diff --git a/Core/Simulation/Pathfinding/Pathfinder.cs b/Core/Simulation/Pathfinding/Pathfinder.cs old mode 100644 new mode 100755 diff --git a/Core/Simulation/Pathfinding/Pathfinder.cs.meta b/Core/Simulation/Pathfinding/Pathfinder.cs.meta old mode 100644 new mode 100755 diff --git a/Core/Simulation/Physics.meta b/Core/Simulation/Physics.meta old mode 100644 new mode 100755 diff --git a/Core/Simulation/Physics/Core.meta b/Core/Simulation/Physics/Core.meta old mode 100644 new mode 100755 diff --git a/Core/Simulation/Physics/Core/CollisionPair.cs b/Core/Simulation/Physics/Core/CollisionPair.cs old mode 100644 new mode 100755 diff --git a/Core/Simulation/Physics/Core/CollisionPair.cs.meta b/Core/Simulation/Physics/Core/CollisionPair.cs.meta old mode 100644 new mode 100755 diff --git a/Core/Simulation/Physics/Core/Editor.meta b/Core/Simulation/Physics/Core/Editor.meta old mode 100644 new mode 100755 diff --git a/Core/Simulation/Physics/Core/Editor/EditorLSBody.cs b/Core/Simulation/Physics/Core/Editor/EditorLSBody.cs old mode 100644 new mode 100755 diff --git a/Core/Simulation/Physics/Core/Editor/EditorLSBody.cs.meta b/Core/Simulation/Physics/Core/Editor/EditorLSBody.cs.meta old mode 100644 new mode 100755 diff --git a/Core/Simulation/Physics/Core/LSBody.cs b/Core/Simulation/Physics/Core/LSBody.cs old mode 100644 new mode 100755 index 8cc25cf4..81e54634 --- a/Core/Simulation/Physics/Core/LSBody.cs +++ b/Core/Simulation/Physics/Core/LSBody.cs @@ -275,6 +275,8 @@ public bool CanSetVisualPosition [SerializeField] private Transform _rotationalTransform; + public Vector3 _rotationOffset; + public Transform RotationalTransform { get; set; } private bool _canSetVisualRotation; @@ -419,7 +421,9 @@ public void Initialize(Vector2dHeight StartPosition, Vector2d StartRotation) if (RotationalTransform != null) { CanSetVisualRotation = true; - visualRot = Quaternion.LookRotation(Forward.ToVector3(0f)); +// visualRot = Quaternion.LookRotation(Forward.ToVector3(0f) + _rotationOffset); +// _rotationOffset = transform.GetComponent()._eulerOffset; + visualRot = Quaternion.Euler(Quaternion.LookRotation(Forward.ToVector3(0f)).eulerAngles + _rotationOffset); lastVisualRot = visualRot; RotationalTransform.rotation = visualRot; } else @@ -637,8 +641,9 @@ private void DoSetVisualPosition(Vector3 pos) private void DoSetVisualRotation(Vector2d rot) { - lastVisualRot = visualRot; - visualRot = Quaternion.LookRotation(Forward.ToVector3(0f)); + lastVisualRot = visualRot; + visualRot = Quaternion.Euler(Quaternion.LookRotation(Forward.ToVector3(0f)).eulerAngles + _rotationOffset); +// visualRot = Quaternion.LookRotation(Forward.ToVector3(0f)); SetRotationBuffer = true; } diff --git a/Core/Simulation/Physics/Core/LSBody.cs.meta b/Core/Simulation/Physics/Core/LSBody.cs.meta old mode 100644 new mode 100755 diff --git a/Core/Simulation/Physics/Core/LSBodyOverlapCheck.cs b/Core/Simulation/Physics/Core/LSBodyOverlapCheck.cs old mode 100644 new mode 100755 diff --git a/Core/Simulation/Physics/Core/LSBodyOverlapCheck.cs.meta b/Core/Simulation/Physics/Core/LSBodyOverlapCheck.cs.meta old mode 100644 new mode 100755 diff --git a/Core/Simulation/Physics/Core/Partition.cs b/Core/Simulation/Physics/Core/Partition.cs old mode 100644 new mode 100755 diff --git a/Core/Simulation/Physics/Core/Partition.cs.meta b/Core/Simulation/Physics/Core/Partition.cs.meta old mode 100644 new mode 100755 diff --git a/Core/Simulation/Physics/Core/PartitionNode.cs b/Core/Simulation/Physics/Core/PartitionNode.cs old mode 100644 new mode 100755 diff --git a/Core/Simulation/Physics/Core/PartitionNode.cs.meta b/Core/Simulation/Physics/Core/PartitionNode.cs.meta old mode 100644 new mode 100755 diff --git a/Core/Simulation/Physics/Core/PhysicsManager.cs b/Core/Simulation/Physics/Core/PhysicsManager.cs old mode 100644 new mode 100755 diff --git a/Core/Simulation/Physics/Core/PhysicsManager.cs.meta b/Core/Simulation/Physics/Core/PhysicsManager.cs.meta old mode 100644 new mode 100755 diff --git a/Core/Simulation/Physics/Core/Settings.meta b/Core/Simulation/Physics/Core/Settings.meta old mode 100644 new mode 100755 diff --git a/Core/Simulation/Physics/Core/Settings/PhysicsSettings.cs b/Core/Simulation/Physics/Core/Settings/PhysicsSettings.cs old mode 100644 new mode 100755 diff --git a/Core/Simulation/Physics/Core/Settings/PhysicsSettings.cs.meta b/Core/Simulation/Physics/Core/Settings/PhysicsSettings.cs.meta old mode 100644 new mode 100755 diff --git a/Core/Simulation/Physics/Raycast.meta b/Core/Simulation/Physics/Raycast.meta old mode 100644 new mode 100755 diff --git a/Core/Simulation/Physics/Raycast/Raycaster.cs b/Core/Simulation/Physics/Raycast/Raycaster.cs old mode 100644 new mode 100755 diff --git a/Core/Simulation/Physics/Raycast/Raycaster.cs.meta b/Core/Simulation/Physics/Raycast/Raycaster.cs.meta old mode 100644 new mode 100755 diff --git a/Core/Simulation/Physics/Raycast/Test.meta b/Core/Simulation/Physics/Raycast/Test.meta old mode 100644 new mode 100755 diff --git a/Core/Simulation/Physics/Raycast/Test/RaycastTestHelper.cs b/Core/Simulation/Physics/Raycast/Test/RaycastTestHelper.cs old mode 100644 new mode 100755 diff --git a/Core/Simulation/Physics/Raycast/Test/RaycastTestHelper.cs.meta b/Core/Simulation/Physics/Raycast/Test/RaycastTestHelper.cs.meta old mode 100644 new mode 100755 diff --git a/Core/Simulation/Physics/Raycast/Test/RaycastTestScene.unity b/Core/Simulation/Physics/Raycast/Test/RaycastTestScene.unity old mode 100644 new mode 100755 diff --git a/Core/Simulation/Physics/Raycast/Test/RaycastTestScene.unity.meta b/Core/Simulation/Physics/Raycast/Test/RaycastTestScene.unity.meta old mode 100644 new mode 100755 diff --git a/Core/UI.meta b/Core/UI.meta old mode 100644 new mode 100755 diff --git a/Core/UI/LSUIWindow.cs b/Core/UI/LSUIWindow.cs old mode 100644 new mode 100755 diff --git a/Core/UI/LSUIWindow.cs.meta b/Core/UI/LSUIWindow.cs.meta old mode 100644 new mode 100755 diff --git a/Core/Utility.meta b/Core/Utility.meta old mode 100644 new mode 100755 diff --git a/Core/Utility/Array2D.cs b/Core/Utility/Array2D.cs old mode 100644 new mode 100755 diff --git a/Core/Utility/Array2D.cs.meta b/Core/Utility/Array2D.cs.meta old mode 100644 new mode 100755 diff --git a/Core/Utility/CodeHelper.cs b/Core/Utility/CodeHelper.cs old mode 100644 new mode 100755 diff --git a/Core/Utility/CodeHelper.cs.meta b/Core/Utility/CodeHelper.cs.meta old mode 100644 new mode 100755 diff --git a/Core/Utility/CoroutineManager.cs b/Core/Utility/CoroutineManager.cs old mode 100644 new mode 100755 diff --git a/Core/Utility/CoroutineManager.cs.meta b/Core/Utility/CoroutineManager.cs.meta old mode 100644 new mode 100755 diff --git a/Core/Utility/Distributor.cs b/Core/Utility/Distributor.cs old mode 100644 new mode 100755 diff --git a/Core/Utility/Distributor.cs.meta b/Core/Utility/Distributor.cs.meta old mode 100644 new mode 100755 diff --git a/Core/Utility/Fast.meta b/Core/Utility/Fast.meta old mode 100644 new mode 100755 diff --git a/Core/Utility/Fast/BiDictionary.cs b/Core/Utility/Fast/BiDictionary.cs old mode 100644 new mode 100755 diff --git a/Core/Utility/Fast/BiDictionary.cs.meta b/Core/Utility/Fast/BiDictionary.cs.meta old mode 100644 new mode 100755 diff --git a/Core/Utility/Fast/FastBucket.cs b/Core/Utility/Fast/FastBucket.cs old mode 100644 new mode 100755 diff --git a/Core/Utility/Fast/FastBucket.cs.meta b/Core/Utility/Fast/FastBucket.cs.meta old mode 100644 new mode 100755 diff --git a/Core/Utility/Fast/FastDictionary.cs b/Core/Utility/Fast/FastDictionary.cs old mode 100644 new mode 100755 diff --git a/Core/Utility/Fast/FastDictionary.cs.meta b/Core/Utility/Fast/FastDictionary.cs.meta old mode 100644 new mode 100755 diff --git a/Core/Utility/Fast/FastHeap.cs b/Core/Utility/Fast/FastHeap.cs old mode 100644 new mode 100755 diff --git a/Core/Utility/Fast/FastHeap.cs.meta b/Core/Utility/Fast/FastHeap.cs.meta old mode 100644 new mode 100755 diff --git a/Core/Utility/Fast/FastList.cs b/Core/Utility/Fast/FastList.cs old mode 100644 new mode 100755 diff --git a/Core/Utility/Fast/FastList.cs.meta b/Core/Utility/Fast/FastList.cs.meta old mode 100644 new mode 100755 diff --git a/Core/Utility/Fast/FastQueue.cs b/Core/Utility/Fast/FastQueue.cs old mode 100644 new mode 100755 diff --git a/Core/Utility/Fast/FastQueue.cs.meta b/Core/Utility/Fast/FastQueue.cs.meta old mode 100644 new mode 100755 diff --git a/Core/Utility/Fast/FastSorter.cs b/Core/Utility/Fast/FastSorter.cs old mode 100644 new mode 100755 diff --git a/Core/Utility/Fast/FastSorter.cs.meta b/Core/Utility/Fast/FastSorter.cs.meta old mode 100644 new mode 100755 diff --git a/Core/Utility/Fast/FastStack.cs b/Core/Utility/Fast/FastStack.cs old mode 100644 new mode 100755 diff --git a/Core/Utility/Fast/FastStack.cs.meta b/Core/Utility/Fast/FastStack.cs.meta old mode 100644 new mode 100755 diff --git a/Core/Utility/Fast/LSEnumerable.cs b/Core/Utility/Fast/LSEnumerable.cs old mode 100644 new mode 100755 diff --git a/Core/Utility/Fast/LSEnumerable.cs.meta b/Core/Utility/Fast/LSEnumerable.cs.meta old mode 100644 new mode 100755 diff --git a/Core/Utility/Fast/Tests.meta b/Core/Utility/Fast/Tests.meta old mode 100644 new mode 100755 diff --git a/Core/Utility/Fast/Tests/Array2DTester.cs b/Core/Utility/Fast/Tests/Array2DTester.cs old mode 100644 new mode 100755 diff --git a/Core/Utility/Fast/Tests/Array2DTester.cs.meta b/Core/Utility/Fast/Tests/Array2DTester.cs.meta old mode 100644 new mode 100755 diff --git a/Core/Utility/LSUtility.cs b/Core/Utility/LSUtility.cs old mode 100644 new mode 100755 diff --git a/Core/Utility/LSUtility.cs.meta b/Core/Utility/LSUtility.cs.meta old mode 100644 new mode 100755 diff --git a/Core/Utility/MessageSystem.meta b/Core/Utility/MessageSystem.meta old mode 100644 new mode 100755 diff --git a/Core/Utility/MessageSystem/BaseMessageChannel.cs b/Core/Utility/MessageSystem/BaseMessageChannel.cs old mode 100644 new mode 100755 diff --git a/Core/Utility/MessageSystem/BaseMessageChannel.cs.meta b/Core/Utility/MessageSystem/BaseMessageChannel.cs.meta old mode 100644 new mode 100755 diff --git a/Core/Utility/MessageSystem/BaseMessageStop.cs b/Core/Utility/MessageSystem/BaseMessageStop.cs old mode 100644 new mode 100755 diff --git a/Core/Utility/MessageSystem/BaseMessageStop.cs.meta b/Core/Utility/MessageSystem/BaseMessageStop.cs.meta old mode 100644 new mode 100755 diff --git a/Core/Utility/MessageSystem/DefaultMessage.cs b/Core/Utility/MessageSystem/DefaultMessage.cs old mode 100644 new mode 100755 diff --git a/Core/Utility/MessageSystem/DefaultMessage.cs.meta b/Core/Utility/MessageSystem/DefaultMessage.cs.meta old mode 100644 new mode 100755 diff --git a/Core/Utility/MessageSystem/DefaultMessageRaiser.cs b/Core/Utility/MessageSystem/DefaultMessageRaiser.cs old mode 100644 new mode 100755 diff --git a/Core/Utility/MessageSystem/DefaultMessageRaiser.cs.meta b/Core/Utility/MessageSystem/DefaultMessageRaiser.cs.meta old mode 100644 new mode 100755 diff --git a/Core/Utility/MessageSystem/IMessage.cs b/Core/Utility/MessageSystem/IMessage.cs old mode 100644 new mode 100755 diff --git a/Core/Utility/MessageSystem/IMessage.cs.meta b/Core/Utility/MessageSystem/IMessage.cs.meta old mode 100644 new mode 100755 diff --git a/Core/Utility/MessageSystem/MessageChannel.cs b/Core/Utility/MessageSystem/MessageChannel.cs old mode 100644 new mode 100755 diff --git a/Core/Utility/MessageSystem/MessageChannel.cs.meta b/Core/Utility/MessageSystem/MessageChannel.cs.meta old mode 100644 new mode 100755 diff --git a/Core/Utility/MessageSystem/MessageManager.cs b/Core/Utility/MessageSystem/MessageManager.cs old mode 100644 new mode 100755 diff --git a/Core/Utility/MessageSystem/MessageManager.cs.meta b/Core/Utility/MessageSystem/MessageManager.cs.meta old mode 100644 new mode 100755 diff --git a/Core/Utility/MessageSystem/MessageStop.cs b/Core/Utility/MessageSystem/MessageStop.cs old mode 100644 new mode 100755 diff --git a/Core/Utility/MessageSystem/MessageStop.cs.meta b/Core/Utility/MessageSystem/MessageStop.cs.meta old mode 100644 new mode 100755 diff --git a/Core/Utility/NDRaycast.meta b/Core/Utility/NDRaycast.meta old mode 100644 new mode 100755 diff --git a/Core/Utility/NDRaycast/NDRaycast.cs b/Core/Utility/NDRaycast/NDRaycast.cs old mode 100644 new mode 100755 diff --git a/Core/Utility/NDRaycast/NDRaycast.cs.meta b/Core/Utility/NDRaycast/NDRaycast.cs.meta old mode 100644 new mode 100755 diff --git a/Core/Utility/NDRaycast/NDRaycastCollider.cs b/Core/Utility/NDRaycast/NDRaycastCollider.cs old mode 100644 new mode 100755 diff --git a/Core/Utility/NDRaycast/NDRaycastCollider.cs.meta b/Core/Utility/NDRaycast/NDRaycastCollider.cs.meta old mode 100644 new mode 100755 diff --git a/Core/Utility/PathObject.meta b/Core/Utility/PathObject.meta old mode 100644 new mode 100755 diff --git a/Core/Utility/PathObject/Core.meta b/Core/Utility/PathObject/Core.meta old mode 100644 new mode 100755 diff --git a/Core/Utility/PathObject/Core/Editor.meta b/Core/Utility/PathObject/Core/Editor.meta old mode 100644 new mode 100755 diff --git a/Core/Utility/PathObject/Core/Editor/EditorPathObject.cs b/Core/Utility/PathObject/Core/Editor/EditorPathObject.cs old mode 100644 new mode 100755 diff --git a/Core/Utility/PathObject/Core/Editor/EditorPathObject.cs.meta b/Core/Utility/PathObject/Core/Editor/EditorPathObject.cs.meta old mode 100644 new mode 100755 diff --git a/Core/Utility/PathObject/Core/Editor/PathObjectUtility.cs b/Core/Utility/PathObject/Core/Editor/PathObjectUtility.cs old mode 100644 new mode 100755 diff --git a/Core/Utility/PathObject/Core/Editor/PathObjectUtility.cs.meta b/Core/Utility/PathObject/Core/Editor/PathObjectUtility.cs.meta old mode 100644 new mode 100755 diff --git a/Core/Utility/PathObject/Core/PathObject.cs b/Core/Utility/PathObject/Core/PathObject.cs old mode 100644 new mode 100755 index a9f4b2d9..be0b2d33 --- a/Core/Utility/PathObject/Core/PathObject.cs +++ b/Core/Utility/PathObject/Core/PathObject.cs @@ -1,18 +1,33 @@ using UnityEngine; using System.Collections; -namespace Lockstep { -[System.Serializable] -public class PathObject { - [SerializeField,HideInInspector] - protected string _path; - public string Path {get {return _path;}} - bool Setted = false; - private UnityEngine.Object _object; - public UnityEngine.Object Object { - get { - return Setted ? _object : (_object = PathObjectFactory.Load (this)); - } - } -} +namespace Lockstep +{ + [System.Serializable] + public class PathObject + { + [SerializeField,HideInInspector] + protected string _path; + + [SerializeField] + private BundleType _bundleType; + public BundleType BundleType {get {return _bundleType;} set { _bundleType = value; }} + + public string Path { get { return _path; } } + + bool Setted = false; + private UnityEngine.Object _object; + + public UnityEngine.Object Object { + get { + return Setted ? _object : (_object = Load ()); + } + } + protected virtual UnityEngine.Object Load () { + + return PathObjectFactory.Load (this); + } + + + } } \ No newline at end of file diff --git a/Core/Utility/PathObject/Core/PathObject.cs.meta b/Core/Utility/PathObject/Core/PathObject.cs.meta old mode 100644 new mode 100755 diff --git a/Core/Utility/PathObject/Core/PathObjectAttribute.cs b/Core/Utility/PathObject/Core/PathObjectAttribute.cs old mode 100644 new mode 100755 index f2a15458..1d55e266 --- a/Core/Utility/PathObject/Core/PathObjectAttribute.cs +++ b/Core/Utility/PathObject/Core/PathObjectAttribute.cs @@ -8,7 +8,7 @@ public class PathObjectAttribute : UnityEngine.PropertyAttribute { public Type ObjectType { get; private set; } - public PathObjectAttribute(Type requiredType) + public PathObjectAttribute(Type requiredType) { this.ObjectType = requiredType; if (requiredType.IsSubclassOf(typeof(UnityEngine.Object)) == false) diff --git a/Core/Utility/PathObject/Core/PathObjectAttribute.cs.meta b/Core/Utility/PathObject/Core/PathObjectAttribute.cs.meta old mode 100644 new mode 100755 diff --git a/Core/Utility/PathObject/Core/PathObjectFactory.cs b/Core/Utility/PathObject/Core/PathObjectFactory.cs old mode 100644 new mode 100755 index 3be6499a..34aed7fc --- a/Core/Utility/PathObject/Core/PathObjectFactory.cs +++ b/Core/Utility/PathObject/Core/PathObjectFactory.cs @@ -3,18 +3,70 @@ namespace Lockstep { - public static class PathObjectFactory + public class PathObjectFactory { + + + private static AssetBundle mainBundle; + + public static AssetBundle MainBundle + { + get + { + return mainBundle; + } + set + { + mainBundle = value; + } + } + + private static AssetBundle artBundle; + public static AssetBundle ArtBundle { + get { return artBundle; } + set { + artBundle = value; + } + } + public static UnityEngine.Object Load(PathObject pathObject) { - return Load(pathObject.Path); + return Load(pathObject.Path, pathObject.BundleType); } - public static UnityEngine.Object Load(string prefabName) + const bool ForceResourcesLoad = true; + public static UnityEngine.Object Load(string prefabName, BundleType bundleType = BundleType.Resources) { - UnityEngine.Object obj = Resources.Load(prefabName); + if (bundleType == BundleType.Resources || ForceResourcesLoad) + return ResourcesLoad (prefabName); + + UnityEngine.Object obj = null; + + { + string ABPrefabName = prefabName.Remove (0, prefabName.LastIndexOf ('/') + 1); + + if (bundleType == BundleType.Main) { + if (MainBundle == null) + return ResourcesLoad (prefabName); + obj = MainBundle.LoadAsset (ABPrefabName); + } else { + if (bundleType == BundleType.Art) + return ResourcesLoad (prefabName); + obj = ArtBundle.LoadAsset (ABPrefabName); + } + + } return obj; } + public static UnityEngine.Object ResourcesLoad (string prefabName) { + return Resources.Load (prefabName); + } + } + public enum BundleType { + Main, + Art, + Resources + } } \ No newline at end of file diff --git a/Core/Utility/PathObject/Core/PathObjectFactory.cs.meta b/Core/Utility/PathObject/Core/PathObjectFactory.cs.meta old mode 100644 new mode 100755 diff --git a/Core/Utility/Serialization.meta b/Core/Utility/Serialization.meta old mode 100644 new mode 100755 diff --git a/Core/Utility/Serialization/CerealBehaviour.cs b/Core/Utility/Serialization/CerealBehaviour.cs old mode 100644 new mode 100755 diff --git a/Core/Utility/Serialization/CerealBehaviour.cs.meta b/Core/Utility/Serialization/CerealBehaviour.cs.meta old mode 100644 new mode 100755 diff --git a/Core/Utility/Serialization/Compressor.cs.meta b/Core/Utility/Serialization/Compressor.cs.meta old mode 100644 new mode 100755 diff --git a/Core/Utility/Serialization/Editor.meta b/Core/Utility/Serialization/Editor.meta old mode 100644 new mode 100755 diff --git a/Core/Utility/Serialization/Editor/Injector.cs b/Core/Utility/Serialization/Editor/Injector.cs old mode 100644 new mode 100755 diff --git a/Core/Utility/Serialization/Editor/Injector.cs.meta b/Core/Utility/Serialization/Editor/Injector.cs.meta old mode 100644 new mode 100755 diff --git a/Core/Utility/Serialization/FileManager.cs b/Core/Utility/Serialization/FileManager.cs old mode 100644 new mode 100755 diff --git a/Core/Utility/Serialization/FileManager.cs.meta b/Core/Utility/Serialization/FileManager.cs.meta old mode 100644 new mode 100755 diff --git a/Core/Utility/Serialization/Reader.cs b/Core/Utility/Serialization/Reader.cs old mode 100644 new mode 100755 index ecdff530..521205c4 --- a/Core/Utility/Serialization/Reader.cs +++ b/Core/Utility/Serialization/Reader.cs @@ -111,5 +111,13 @@ public byte[] ReadByteArray () { return ret; } + + public TData Read () where TData : ICommandData + { + TData data = Activator.CreateInstance (); + data.Read (this); + + return data; + } } } \ No newline at end of file diff --git a/Core/Utility/Serialization/Reader.cs.meta b/Core/Utility/Serialization/Reader.cs.meta old mode 100644 new mode 100755 diff --git a/Core/Utility/Serialization/Writer.cs b/Core/Utility/Serialization/Writer.cs old mode 100644 new mode 100755 index 06343264..bb49c43e --- a/Core/Utility/Serialization/Writer.cs +++ b/Core/Utility/Serialization/Writer.cs @@ -81,6 +81,10 @@ public void WriteByteArray (byte[] byteArray) { Canvas.AddRange(byteArray); } + public void Write (ICommandData data) { + data.Write (this); + } + public void Reset () { this.Canvas.FastClear(); } diff --git a/Core/Utility/Serialization/Writer.cs.meta b/Core/Utility/Serialization/Writer.cs.meta old mode 100644 new mode 100755 diff --git a/Core/Utility/Triggers.meta b/Core/Utility/Triggers.meta old mode 100644 new mode 100755 diff --git a/Core/Utility/Triggers/Default.meta b/Core/Utility/Triggers/Default.meta old mode 100644 new mode 100755 diff --git a/Core/Utility/Triggers/Default/Contact.meta b/Core/Utility/Triggers/Default/Contact.meta old mode 100644 new mode 100755 diff --git a/Core/Utility/Triggers/Default/Contact/ContactMessage.cs b/Core/Utility/Triggers/Default/Contact/ContactMessage.cs old mode 100644 new mode 100755 diff --git a/Core/Utility/Triggers/Default/Contact/ContactMessage.cs.meta b/Core/Utility/Triggers/Default/Contact/ContactMessage.cs.meta old mode 100644 new mode 100755 diff --git a/Core/Utility/Triggers/Default/Contact/ContactTrigger.cs b/Core/Utility/Triggers/Default/Contact/ContactTrigger.cs old mode 100644 new mode 100755 diff --git a/Core/Utility/Triggers/Default/Contact/ContactTrigger.cs.meta b/Core/Utility/Triggers/Default/Contact/ContactTrigger.cs.meta old mode 100644 new mode 100755 diff --git a/Core/Utility/Triggers/LSTrigger.cs b/Core/Utility/Triggers/LSTrigger.cs old mode 100644 new mode 100755 diff --git a/Core/Utility/Triggers/LSTrigger.cs.meta b/Core/Utility/Triggers/LSTrigger.cs.meta old mode 100644 new mode 100755 diff --git a/Core/Utility/Triggers/TriggerManager.cs b/Core/Utility/Triggers/TriggerManager.cs old mode 100644 new mode 100755 diff --git a/Core/Utility/Triggers/TriggerManager.cs.meta b/Core/Utility/Triggers/TriggerManager.cs.meta old mode 100644 new mode 100755 diff --git a/Example/TestAgent.prefab b/Example/TestAgent.prefab index ff7520b242ff685790e42d6801ff26b0e9439974..9b6aa58bba8fa1fe9935b866b38cd7deebaf4658 100644 GIT binary patch literal 18920 zcmeHP4|G+~eN(?RHyMJr-T6)@pToEcCF8D?QaJXsv67{rzU{ckkSr zmk@CG?CCkVI=M5ynfd0MZ@&5Fo4NB)YR*oj>R(ezja6#S9=z3z%IeCh_0!a`U>e-FFp@3M<1pZa(Mc}97Jp_Se6Nv3c&2x}u`7#Ty1f2_z z9_i=*kia%e@nzxLau-1)@iaE8VVZnulk3+OBb{cnK|<$ose9$h{$ z4f13leirc>;$>RSA3+`Rb2f1u$`r=5X9EJ$;{rUPNWa>rKc09G>kNs|{}bXh#G~{% zo~7uY8{i2w1#$4H$om8Y4m9P!{$6d8>bw{}*T>Hfa6@N4(xmf|0FTo7XbcxR69YV< z+pR~Mx-iMY$>%Br(x*O_;wP^RWOQ z8j;(@FX+$Pl%J{?F8ovnctX#YZlpP1rpNFv`1p(%zSYNP#_$Jye3pej z2tEHc(wrx=i7#c`*pq+s@j1kyl*DP@euO0Xxr#Uxl{n|ilP0M+Z*2UhK7LIM|D}(! z-%_6Z972-(%p-2K`zDfXm-9@@Q)iALaJ*{pHh6TrY6CnvUJEST9_;^B*&P<=qp91&$8(F`u z4a!I9Gz54;9fF*(E@*z1X*%VQ`4F`OQcYjg3X`nnmeM zG4CzvD!REsCZC(9+LDViS+{;6B8^V56_GV=3Pq~YD%qYdWQr)Ix>UDHdikQGQ^{60 z)6!aO%okL$)6M2nnPRtE={niQd?r^cs72`(*Zf_c_u2}o(J2&{c$xItWtp6naJquT z4R+2A%aD^Sv^wpsN@fbHyi7}r>#1bc>E^4|$*#XXlP?y(nAQ{7Da2jsnwu3}EOMN_akWBg2J{~$qW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}6^a)Ua1E^1jXbtsng}q386%l_9m$*$9SohwI1I)ks)O-)> zref-Y2XoB)s_^2`e1CPwWszB8#0q9cCKF0WwnJVxN)(Ih(OP z@-OJXXnl%C1F7vn z;6AAq6W%wiHb4zB_=88MK}I8cIC#6i;Kbm~LIH4yh}$>w6_Nw*SkeCkXh4Vojws(q X+zBHBcmbV0*|D8f@^J+@7^D9JGuN2_ From 83ca0f44b3ced5471d8b3a3ae983219955cc855e Mon Sep 17 00:00:00 2001 From: SnpM Date: Wed, 6 Jul 2016 09:28:51 -0600 Subject: [PATCH 4/9] Fix and integrate updates --- Core/Game/Abilities/DurationAbility.cs | 59 ++++++++++++++++++ Core/Game/Abilities/DurationAbility.cs.meta | 12 ++++ .../Abilities/Essential/SpecialHitEffect.cs | 36 +++++++++++ .../Essential/SpecialHitEffect.cs.meta | 12 ++++ Core/Game/Agents/LSAgent.cs | 6 +- Core/Game/Agents/Visuals/Textures/Square2.png | Bin 0 -> 4420 bytes .../Agents/Visuals/Textures/Square2.png.meta | 55 ++++++++++++++++ Example/ExampleScene.unity | Bin 115092 -> 116076 bytes 8 files changed, 177 insertions(+), 3 deletions(-) create mode 100644 Core/Game/Abilities/DurationAbility.cs create mode 100644 Core/Game/Abilities/DurationAbility.cs.meta create mode 100644 Core/Game/Abilities/Essential/SpecialHitEffect.cs create mode 100644 Core/Game/Abilities/Essential/SpecialHitEffect.cs.meta create mode 100755 Core/Game/Agents/Visuals/Textures/Square2.png create mode 100755 Core/Game/Agents/Visuals/Textures/Square2.png.meta diff --git a/Core/Game/Abilities/DurationAbility.cs b/Core/Game/Abilities/DurationAbility.cs new file mode 100644 index 00000000..832c34f7 --- /dev/null +++ b/Core/Game/Abilities/DurationAbility.cs @@ -0,0 +1,59 @@ +using UnityEngine; +using System.Collections; +namespace Lockstep +{ + public class DurationAbility : ActiveAbility + { + [SerializeField, FrameCount] + private int _duration; + + public virtual int Duration + { + get + { + return _duration; + } + } + + [Lockstep(true)] + private int Timer { get; set; } + public bool IsWorking { get { return Timer > 0; } } + protected override void OnExecute(Command com) + { + Timer = Duration; + OnStartWorking(); + if (!IsWorking) + { + OnWorking(); + OnStopWorking(); + } + } + + protected override void OnSimulate() + { + if (IsWorking) + { + OnWorking(); + Timer--; + if (!IsWorking) + { + OnStopWorking(); + } + } + } + + protected virtual void OnStartWorking() + { + + } + protected virtual void OnWorking() + { + + } + protected virtual void OnStopWorking() + { + + } + + } +} \ No newline at end of file diff --git a/Core/Game/Abilities/DurationAbility.cs.meta b/Core/Game/Abilities/DurationAbility.cs.meta new file mode 100644 index 00000000..640feb98 --- /dev/null +++ b/Core/Game/Abilities/DurationAbility.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: 251eaa3cf77524b94911979110399bf4 +timeCreated: 1465425059 +licenseType: Pro +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Core/Game/Abilities/Essential/SpecialHitEffect.cs b/Core/Game/Abilities/Essential/SpecialHitEffect.cs new file mode 100644 index 00000000..ac5a5769 --- /dev/null +++ b/Core/Game/Abilities/Essential/SpecialHitEffect.cs @@ -0,0 +1,36 @@ +using UnityEngine; +using System.Collections; +using Lockstep; +namespace Lockstep +{ + public class SpecialHitEffect : DurationAbility + { + protected Scan cachedScan { get; private set;} + + protected override void OnSetup() + { + cachedScan = Agent.GetAbility(); + } + protected override void OnExecute(Command com) + { + base.OnExecute(com); + } + + protected override void OnStartWorking() + { + cachedScan.ExtraOnHit += ApplyEffect; + } + protected virtual void ApplyEffect(LSAgent agent) + { + OnApplyEffect(agent); + } + protected virtual void OnApplyEffect (LSAgent agent) + { + } + + protected override void OnStopWorking() + { + cachedScan.ExtraOnHit -= ApplyEffect; + } + } +} \ No newline at end of file diff --git a/Core/Game/Abilities/Essential/SpecialHitEffect.cs.meta b/Core/Game/Abilities/Essential/SpecialHitEffect.cs.meta new file mode 100644 index 00000000..db96045d --- /dev/null +++ b/Core/Game/Abilities/Essential/SpecialHitEffect.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: 39916341c4283498eaf25f946467226d +timeCreated: 1465425865 +licenseType: Pro +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Core/Game/Agents/LSAgent.cs b/Core/Game/Agents/LSAgent.cs index d7462c1f..60387ce0 100755 --- a/Core/Game/Agents/LSAgent.cs +++ b/Core/Game/Agents/LSAgent.cs @@ -521,9 +521,9 @@ public long GetStateHash() long hash = 3; hash ^= this.GlobalID; hash ^= this.LocalID; - hash ^= this.Body._position.GetStateHash(); - hash ^= this.Body._rotation.GetStateHash(); - hash ^= this.Body.Velocity.GetStateHash(); + hash ^= this.Body._position.GetHashCode(); + hash ^= this.Body._rotation.GetHashCode(); + hash ^= this.Body.Velocity.GetHashCode(); return hash; } diff --git a/Core/Game/Agents/Visuals/Textures/Square2.png b/Core/Game/Agents/Visuals/Textures/Square2.png new file mode 100755 index 0000000000000000000000000000000000000000..89178412a6aae6df015470b637182db26e88098f GIT binary patch literal 4420 zcmXw5cQ_Sb`+kqTNw&xe$)4eu$DRo}R<=XpP$c^(yE3w!h-8n9>~(A*$4K_x31vj) z@AUn?@42q$eg1jIec#vhT<;To&p?xsjD-vUK&h>zb{`i}|D1#f_jW4U4d4Q)rYGp(_k_@16_N8~M})>B*rDgK>C1K{~rWb^_q}bfz)F#CVHA;duT~ zRW}Niq>H>yPr`9u^%aUPfmeW<w3tGiQq4sQsF{Ist26b`*YWEb2AAksw73*(C8Q z=ZDyrxlu9wXG;OOZr_`a*S}uYOek)Y9%NQyi7_M;DOwUnQYeZdRrYI(FMGRsmR5z8 zL&rPQ> zz(pREVjsk)1Gp%lbJp#W1(QNRRNKs13slqr%n%KE6(FGiqDE2Sw*f%_uoQNMxOJ!|!O3FB;GtgL4eVReF#Fl{IL-4q@~d;UF|ICc`v$lG-H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%TzE0h`enx|H5pIX6KZO_QRU2q3uHxr}4^trnjFEjFOFWk-e zn|bnqDwgRBb~AEJuh`Ehv3Jq#8~J Date: Wed, 6 Jul 2016 09:35:05 -0600 Subject: [PATCH 5/9] Tweak example`and sync meta files --- Example/ExampleScene.unity | Bin 116076 -> 116092 bytes 1 file changed, 0 insertions(+), 0 deletions(-) diff --git a/Example/ExampleScene.unity b/Example/ExampleScene.unity index e8d95da332abd22d4c538e9fc1b6850e4c699242..3f64e8822416037edf84e18072610908ebfc5636 100644 GIT binary patch delta 1541 zcmZ8heN2^Q6#xAm;eO=3e8^=$R}`3#f)F%^K*%8F!+{c+3i%N%M9oSrA4AXzBoq`& ze8#YkIpH&|NMfy{* zmHL{;ojJUKSR~9nuh(0L0G|lSel>C?bAbkz;^&I=f;u<%>WVsd^aasX3VYYcAv=>N z&9BSQJ)&#X?}{DQAB(y(kLVG_8F;AFSW0}?L z+i^P6r#`4XqKnac#E$8HQK#k;{lZMnJ>x<}o=^R)z9PC1Js~z%M>V)JYYWVsxP*22 zI~C_w+X{(l!F?SG@N?(Oo+}g=wfflxH~-XK4f4gsMD71{7yY_}`jqI#^(C=m`Y%yG zT0-QD`ZZ&j)og5eb*s48uhSacoISXt(HjuD@0bq)HV>I^_VtV~OjoqT47Rpx&#~JP zha@B*XzjQ~rr2Fs8Nivd_eFjwSZ;w*Go z1EtHkm@7^f?OE7_W>gt&2d4&O2^!HZb=p$!Xm!S2_~!g%C3$v zi~R_Z$Rg9=-Wb136!{z0d@${h@1rx4PY&A5rjsd<#IOT#W=wF%qMiYrJLsFe5f69aBz zuvJd#B<|uq{*EE65^X!3Hmt=v_!3{>FxChp6XTF$I)G!c*=htDkUbVP*e%CgB5oJ0 z$tXrC62;lgzOy4TnP;~ZIII?=;6Y=^L=%e=8G%1tU|^ zobQoyCG)xg}C#QztF}#4CGQmj#v@>`XnlOSN@DoO*LYIJ2 zYz@vJgelVg+fvL!0!qKa(T!i^2#T3O#REt-;pqZjLp-xZeH|Te7%7}j<9*zc`|>v& zL8(B}t$6vsn>dPItTyWGpxm~Zcm%1!$94}@9_QtNzS3b@hYC(G(V|CN98cEV^W8bX ztRA_3eNU@l|1-XO z{F(TD|5C8i;tA=t$~Y#YmNN6Fh?o(i!*P)4%HsV?I@_{jDQ=Wc&D_WT{ za1QrApYLkX^cUF%N3sX4m2(Ldj^6QhQVO@!zp0Bp{RdtT=JkyjzW4Rvz+IFSl_v?s zKV&+A74I>{j&U14my%U*dD(<6%U{sVZA`78pS$6mrZ@R)3?)rT-H_t)Z2OR7q&rsF z6nnfZn@T>7WbN_#8z*IiYdXx1K!hadt7D7smAhPXBtx-6b#7dPGl*ee270ta7Ds E02}_a(f|Me From 26f372ba1d8bb6585653aeae527c4e999ff620fe Mon Sep 17 00:00:00 2001 From: SnpM Date: Wed, 6 Jul 2016 10:42:30 -0600 Subject: [PATCH 6/9] Implement immediate replays --- Core/Game/Managers/ReplayManager.cs | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) diff --git a/Core/Game/Managers/ReplayManager.cs b/Core/Game/Managers/ReplayManager.cs index ff323288..6fbd66a1 100755 --- a/Core/Game/Managers/ReplayManager.cs +++ b/Core/Game/Managers/ReplayManager.cs @@ -29,10 +29,10 @@ static ReplayManager () #region public methods - public static void Play (Replay replay) + public static void Play (Replay replay, bool immediate = true) { IsPlayingBack = true; - StartStreaming (replay); + StartStreaming (replay, immediate); FrameManager.AdjustFramerate = false; if (onIsPlayingBack != null) { @@ -145,10 +145,22 @@ public static IEnumerator StreamPlayback (Replay playbackReplay) - private static void StartStreaming (Replay replay) + private static void StartStreaming (Replay replay, bool immediate) { StopStreaming (); + if (immediate) + { + var iter = StreamPlayback(replay); + { + while (iter.MoveNext()) + { + + } + } + } + else streamer = LockstepManager.UnityInstance.StartCoroutine (StreamPlayback (replay)); + } private static void StopStreaming () From 6805ee48e70e575b9b714b5f85da6e7f97215429 Mon Sep 17 00:00:00 2001 From: Jesse Fish Date: Thu, 14 Jul 2016 19:17:46 -0700 Subject: [PATCH 7/9] Add testing and documentation to FixedMath MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit There are no logical or execution changes to FixedMath in this change. This change adds documentation to Fixed math about it’s fixed point system, brings the formatting to a similar standard of the rest of the codebase, and adds Math/Tests/Editor/FixedMathTest.cs a unit test class that tests the majority of the features of FixedMath and can be run in Unity by browsing to window->EditorTestsRunner. The tests should automatically load and be able to be run in the project. --- Core/Simulation/Math/FixedMath.cs | 186 +++++++----------- Core/Simulation/Math/Tests.meta | 9 + Core/Simulation/Math/Tests/Editor.meta | 9 + .../Math/Tests/Editor/FixedMathTest.cs | 127 ++++++++++++ .../Math/Tests/Editor/FixedMathTest.cs.meta | 12 ++ 5 files changed, 231 insertions(+), 112 deletions(-) create mode 100644 Core/Simulation/Math/Tests.meta create mode 100644 Core/Simulation/Math/Tests/Editor.meta create mode 100644 Core/Simulation/Math/Tests/Editor/FixedMathTest.cs create mode 100644 Core/Simulation/Math/Tests/Editor/FixedMathTest.cs.meta diff --git a/Core/Simulation/Math/FixedMath.cs b/Core/Simulation/Math/FixedMath.cs index 34c1b009..388666ae 100755 --- a/Core/Simulation/Math/FixedMath.cs +++ b/Core/Simulation/Math/FixedMath.cs @@ -11,10 +11,15 @@ using System.Collections; using System; -namespace Lockstep -{ - public static class FixedMath - { +namespace Lockstep { + /// + /// Utility class for fixed point numbers. + /// The lower (right) 16 bits are used as the fraction + /// component and the upper (left) 48 bits are used as the decimal + /// and sign. The numbers use 2-s compliment so they can + /// be added and subtracted like normal long values. + /// + public static class FixedMath { #region Meta @@ -37,13 +42,11 @@ public static class FixedMath /// Create a fixed point number from an integer. /// /// Integer. - public static long Create(long integer) - { + public static long Create(long integer) { return integer << SHIFT_AMOUNT; } - public static long Create(float singleFloat) - { + public static long Create(float singleFloat) { return (long)((double)singleFloat * One); } @@ -51,8 +54,7 @@ public static long Create(float singleFloat) /// Create a fixed point number from a double. /// /// Double float. - public static long Create(double doubleFloat) - { + public static long Create(double doubleFloat) { return (long)(doubleFloat * One); } @@ -61,8 +63,7 @@ public static long Create(double doubleFloat) /// /// Whole. /// Fraction. - public static long Create(long Numerator, long Denominator) - { + public static long Create(long Numerator, long Denominator) { return (Numerator << SHIFT_AMOUNT) / Denominator; } @@ -72,27 +73,20 @@ public static long Create(long Numerator, long Denominator) /// true, if parse was tried, false otherwise. /// S. /// Result. - public static bool TryParse(string s, out long result) - { + public static bool TryParse(string s, out long result) { string[] NewValues = s.Split('.'); - if (NewValues.Length <= 2) - { + if (NewValues.Length <= 2) { long Whole; - if (long.TryParse(NewValues [0], out Whole)) - { - if (NewValues.Length == 1) - { + if (long.TryParse(NewValues[0], out Whole)) { + if (NewValues.Length == 1) { result = Whole << SHIFT_AMOUNT; return true; - } else - { + } else { long Numerator; - if (long.TryParse(NewValues [1], out Numerator)) - { - int fractionDigits = NewValues [1].Length; + if (long.TryParse(NewValues[1], out Numerator)) { + int fractionDigits = NewValues[1].Length; long Denominator = 1; - for (int i = 0; i < fractionDigits; i++) - { + for (int i = 0; i < fractionDigits; i++) { Denominator *= 10; } result = (Whole << SHIFT_AMOUNT) + FixedMath.Create(Numerator, Denominator); @@ -114,8 +108,7 @@ public static bool TryParse(string s, out long result) /// /// f1. /// f2. - public static long Add(this long f1, long f2) - { + public static long Add(this long f1, long f2) { return f1 + f2; } @@ -124,8 +117,7 @@ public static long Add(this long f1, long f2) /// /// f1. /// f2. - public static long Sub(this long f1, long f2) - { + public static long Sub(this long f1, long f2) { return f1 - f2; } @@ -134,13 +126,11 @@ public static long Sub(this long f1, long f2) /// /// f1. /// f2. - public static long Mul(this long f1, long f2) - { + public static long Mul(this long f1, long f2) { return (f1 * f2) >> SHIFT_AMOUNT; } - public static long Mul(this long f1, int intr) - { + public static long Mul(this long f1, int intr) { return (f1 * intr); } @@ -149,8 +139,7 @@ public static long Mul(this long f1, int intr) /// /// f1. /// f2. - public static long Div(this long f1, long f2) - { + public static long Div(this long f1, long f2) { return (f1 << SHIFT_AMOUNT) / f2; } @@ -159,13 +148,11 @@ public static long Div(this long f1, long f2) /// /// f1. /// f2. - public static long Remainder(this long f1, long f2) - { + public static long Remainder(this long f1, long f2) { return f1 % f2; } - public static long Mod(this long f1, long f2) - { + public static long Mod(this long f1, long f2) { long f = f1 % f2; return f < 0 ? f + f2 : f; } @@ -177,47 +164,38 @@ public static long Mod(this long f1, long f2) static long n, n1; - public static long Sqrt(long f1) - { + public static long Sqrt(long f1) { if (f1 == 0) return 0; n = (f1 >> 1) + 1; n1 = (n + (f1 / n)) >> 1; - while (n1 < n) - { + while (n1 < n) { n = n1; n1 = (n + (f1 / n)) >> 1; } return n << (SHIFT_AMOUNT / 2); } - - - public static long Normalized(this long f1) - { + public static long Normalized(this long f1) { return f1 >> FixedMath.SHIFT_AMOUNT; } - public static long Abs(this long f1) - { + public static long Abs(this long f1) { return f1 < 0 ? -f1 : f1; } - public static bool AbsMoreThan(this long f1, long f2) - { + public static bool AbsMoreThan(this long f1, long f2) { if (f1 < 0) { return -f1 > f2; - } - else { + } else { return f1 > f2; } } - public static bool AbsLessThan (this long f1, long f2) { + public static bool AbsLessThan(this long f1, long f2) { if (f1 < 0) { return -f1 < f2; - } - else { + } else { return f1 < f2; } } @@ -230,8 +208,7 @@ public static bool AbsLessThan (this long f1, long f2) { /// Truncate the specified fixed-point number. /// /// F1. - public static long Truncate(long f1) - { + public static long Truncate(long f1) { return ((f1) >> SHIFT_AMOUNT) << SHIFT_AMOUNT; } @@ -239,28 +216,23 @@ public static long Truncate(long f1) /// Round the specified fixed point number. /// /// F1. - public static long Round(long f1) - { + public static long Round(long f1) { return ((f1 + FixedMath.Half - 1) >> SHIFT_AMOUNT) << SHIFT_AMOUNT; } - - /// /// Ceil the specified fixed point number. /// /// F1. - public static long Ceil(long f1) - { + public static long Ceil(long f1) { return ((f1 + One - 1) >> SHIFT_AMOUNT) << SHIFT_AMOUNT; } - public static long Floor (long f1) { + public static long Floor(long f1) { return ((f1) >> SHIFT_AMOUNT) << SHIFT_AMOUNT; } - public static long Lerp(long from, long to, long t) - { + public static long Lerp(long from, long to, long t) { if (t >= One) return to; else if (t <= 0) @@ -268,38 +240,36 @@ public static long Lerp(long from, long to, long t) return (to * t + from * (One - t)) >> SHIFT_AMOUNT; } - public static long Min(this long f1, long f2) - { + public static long Min(this long f1, long f2) { return f1 <= f2 ? f1 : f2; } - public static long Max(this long f1, long f2) - { + public static long Max(this long f1, long f2) { return f1 >= f2 ? f1 : f2; } - public static long Clamp (this long f1, long min, long max) { - if (f1 < min) return min; - if (f1 > max) return max; + + public static long Clamp(this long f1, long min, long max) { + if (f1 < min) + return min; + if (f1 > max) + return max; return f1; } - public static double ToFormattedDouble(this long f1) - { + + public static double ToFormattedDouble(this long f1) { return Math.Round(FixedMath.ToDouble(f1), 2, MidpointRounding.AwayFromZero); } - public static bool MoreThanEpsilon(this long f1) - { + public static bool MoreThanEpsilon(this long f1) { return f1 > Epsilon || f1 < Epsilon; } - public static long MoveTowards (long from, long to, long maxAmount) { - if (from < to) - { + public static long MoveTowards(long from, long to, long maxAmount) { + if (from < to) { from += maxAmount; if (from > to) from = to; - } - else if (from > to) { + } else if (from > to) { from -= maxAmount; if (from < to) from = to; @@ -310,7 +280,8 @@ public static long MoveTowards (long from, long to, long maxAmount) { #endregion #region Convert - public static int Sign (this long f1) { + + public static int Sign(this long f1) { if (f1 > 0) return 1; else if (f1 == 0) @@ -319,18 +290,15 @@ public static int Sign (this long f1) { return -1; } - public static int ToInt(this long f1) - { + public static int ToInt(this long f1) { return (int)(f1 >> SHIFT_AMOUNT); } - public static int RoundToInt(this long f1) - { + public static int RoundToInt(this long f1) { return (int)((f1 + Half - 1) >> SHIFT_AMOUNT); } - public static int CeilToInt(this long f1) - { + public static int CeilToInt(this long f1) { return (int)((f1 + One - 1) >> SHIFT_AMOUNT); } @@ -339,8 +307,7 @@ public static int CeilToInt(this long f1) /// /// The double. /// f1. - public static double ToDouble(this long f1) - { + public static double ToDouble(this long f1) { return (f1 / OneD); } @@ -349,13 +316,11 @@ public static double ToDouble(this long f1) /// /// The float. /// f1. - public static float ToFloat(this long f1) - { + public static float ToFloat(this long f1) { return (float)(f1 / OneD); } - public static float ToPreciseFloat(this long f1) - { + public static float ToPreciseFloat(this long f1) { return (float)ToDouble(f1); } @@ -365,19 +330,14 @@ public static float ToPreciseFloat(this long f1) /// The string. /// f1. - public static string GetString(this long f1) - { + public static string GetString(this long f1) { return (System.Math.Round((f1) / OneD, 4, System.MidpointRounding.AwayFromZero)).ToString(); } - - #endregion - public static class Trig - { - public static long Sin(long theta) - { + public static class Trig { + public static long Sin(long theta) { //Taylor series cuz easy //TODO: Profiling //Note: Max 4 multiplications before overflow @@ -400,7 +360,7 @@ public static long Sin(long theta) n *= thetaSquared; n >>= shift; const long Factorial7 = Factorial5 * 6 * 7; - result -= n / Factorial7; + result -= n / Factorial7; #if true || HIGH_ACCURACY //Required or there'll be .07 inaccuracy @@ -411,15 +371,17 @@ public static long Sin(long theta) #endif return result; } + public static long Cos(long theta) { - return Sin (theta - FixedMath.Pi / 2); + return Sin(theta - FixedMath.Pi / 2); } - public static long SinToCos(long sin) - { - return Sqrt(FixedMath.One - (sin.Mul( sin)).Normalized()); + + public static long SinToCos(long sin) { + return Sqrt(FixedMath.One - (sin.Mul(sin)).Normalized()); } - public static long Tan (long theta) { + + public static long Tan(long theta) { return Sin(theta).Div(Cos(theta)); } } diff --git a/Core/Simulation/Math/Tests.meta b/Core/Simulation/Math/Tests.meta new file mode 100644 index 00000000..2024fe7b --- /dev/null +++ b/Core/Simulation/Math/Tests.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: 395a367a4de0e4d0baf5153e2a59fabb +folderAsset: yes +timeCreated: 1468530563 +licenseType: Free +DefaultImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Core/Simulation/Math/Tests/Editor.meta b/Core/Simulation/Math/Tests/Editor.meta new file mode 100644 index 00000000..2225e432 --- /dev/null +++ b/Core/Simulation/Math/Tests/Editor.meta @@ -0,0 +1,9 @@ +fileFormatVersion: 2 +guid: b77cfd3739c7b42c9805fe5a03b98222 +folderAsset: yes +timeCreated: 1468530563 +licenseType: Free +DefaultImporter: + userData: + assetBundleName: + assetBundleVariant: diff --git a/Core/Simulation/Math/Tests/Editor/FixedMathTest.cs b/Core/Simulation/Math/Tests/Editor/FixedMathTest.cs new file mode 100644 index 00000000..f5fdb9ad --- /dev/null +++ b/Core/Simulation/Math/Tests/Editor/FixedMathTest.cs @@ -0,0 +1,127 @@ +using System; +using UnityEngine; +using UnityEditor; +using NUnit.Framework; +using Lockstep; + +namespace MonoTests.Lockstep { + [TestFixture] + public class FixedMathTest { + + [SetUp] + public void GetReady() { + } + + [TearDown] + public void Clean() { + } + + [Test] + public void CreateLongTest() { + Assert.AreEqual(0L, FixedMath.Create(0L)); + Assert.AreEqual(1L << 16, FixedMath.Create(1L)); + Assert.AreEqual(-1L << 16, FixedMath.Create(-1L)); + Assert.AreEqual(132414LL << 16, FixedMath.Create(132414L)); + } + + [Test] + public void AddSubIntTest() { + long n1 = FixedMath.Create(-1L); + long p1 = FixedMath.Create(1L); + + // Assert 1 + -1 = 0 + Assert.AreEqual(0, n1.Add(p1)); + + // Assert 1 + 1 = 2 + Assert.AreEqual(2 << 16, p1.Add(p1)); + + // Assert -1 + -1 = -2 + Assert.AreEqual(-2 << 16, n1.Add(n1)); + + // Assert 12 - 7 = 5 + Assert.AreEqual(5 << 16, FixedMath.Create(12L).Sub(FixedMath.Create(7L))); + + // Assert 33 - 66 = -33 + Assert.AreEqual(-33 << 16, FixedMath.Create(33L).Sub(FixedMath.Create(66L))); + + // Assert -33 - -66 = -33 + Assert.AreEqual(33 << 16, FixedMath.Create(-33L).Sub(FixedMath.Create(-66L))); + } + + [Test] + public void CreateFloatTest() { + // The left 48 bits in the number are the whole number + // and the right 16 are the fraction. This test ensures + // the fractional numbers are being assigned correctly. + Assert.AreEqual(0, FixedMath.Create(0f)); + // Assert 1.5 = ..001|100.. + Assert.AreEqual((1 << 16) + (1 << 15), FixedMath.Create(1.5f)); + // Assert .75 = ..0000|1100.. + Assert.AreEqual((1 << 14) + (1 << 15), FixedMath.Create(.75f)); + Assert.AreEqual((1 << 26) + (1 << 15), FixedMath.Create(1024.5f)); + Assert.AreEqual(-((1 << 26) + (1 << 15)), FixedMath.Create(-1024.5f)); + } + + [Test] + public void AddSubFloatTest() { + long half = FixedMath.Create(0.5f); + Assert.AreEqual(1 << 16, half.Add(half)); + + long quarter = FixedMath.Create(0.5f); + Assert.AreEqual(1 << 16, half.Add(half)); + } + + [Test] + public void RoundTest() { + // Keep in mind the current rounding uses .5 -> 0 + Assert.AreEqual(0, FixedMath.Round(FixedMath.Create(0.5f))); + Assert.AreEqual(1 << 16, FixedMath.Round(FixedMath.Create(0.6f))); + Assert.AreEqual(0, FixedMath.Round(FixedMath.Create(0.4f))); + Assert.AreEqual(0, FixedMath.Round(FixedMath.Create(0.1f))); + + // Keep in mind the current rounding uses 0.5 -> -1 + Assert.AreEqual(-1 << 16, FixedMath.Round(FixedMath.Create(-0.5f))); + Assert.AreEqual(-1 << 16, FixedMath.Round(FixedMath.Create(-0.6f))); + Assert.AreEqual(0, FixedMath.Round(FixedMath.Create(-0.4f))); + Assert.AreEqual(0, FixedMath.Round(FixedMath.Create(-0.1f))); + } + + [Test] + public void CreateFromFractionTest() { + Assert.AreEqual(0, FixedMath.Create(0, 100)); + Assert.AreEqual(1 << 15, FixedMath.Create(1, 2)); + Assert.AreEqual(-1 << 15, FixedMath.Create(-1, 2)); + Assert.AreEqual(-1 << 15, FixedMath.Create(1, -2)); + Assert.AreEqual(1 << 15, FixedMath.Create(-1, -2)); + } + + [Test] + public void MulDivTest() { + long two = FixedMath.Create(2); + // Assert 2x2 = 4 + Assert.AreEqual(1 << 18, two.Mul(two)); + + // Assert 2/2 = 1 + Assert.AreEqual(1 << 16, two.Div(two)); + + long max = FixedMath.Create(int.MaxValue); + long answer = FixedMath.Create(1073741823.5); + Assert.AreEqual(70368744144896L, answer); + + // Assert.AreEqual(answer, max.Div(two)); + Assert.AreEqual(answer, max.Div(two)); + Assert.AreEqual(1 << 16, max.Div(max)); + } + + [Test] + public void ToIntTest() { + Assert.AreEqual(0, FixedMath.Create(0).ToInt()); + Assert.AreEqual(1, FixedMath.Create(1).ToInt()); + Assert.AreEqual(-1, FixedMath.Create(-1).ToInt()); + } + + // Test ToFormattedDouble + // test ToPreciseFloat + } +} + diff --git a/Core/Simulation/Math/Tests/Editor/FixedMathTest.cs.meta b/Core/Simulation/Math/Tests/Editor/FixedMathTest.cs.meta new file mode 100644 index 00000000..4f8366bc --- /dev/null +++ b/Core/Simulation/Math/Tests/Editor/FixedMathTest.cs.meta @@ -0,0 +1,12 @@ +fileFormatVersion: 2 +guid: 8293726fbe2e445eaa66b1e04a99e6dd +timeCreated: 1468530563 +licenseType: Free +MonoImporter: + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: From 658a1645e3e4185bf8c9c060e850a6322043fc02 Mon Sep 17 00:00:00 2001 From: Jesse Fish Date: Thu, 14 Jul 2016 19:43:32 -0700 Subject: [PATCH 8/9] Minor comment changes to test Minor comment changes to FixedMathTest file. --- Core/Simulation/Math/Tests/Editor/FixedMathTest.cs | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/Core/Simulation/Math/Tests/Editor/FixedMathTest.cs b/Core/Simulation/Math/Tests/Editor/FixedMathTest.cs index f5fdb9ad..098ee305 100644 --- a/Core/Simulation/Math/Tests/Editor/FixedMathTest.cs +++ b/Core/Simulation/Math/Tests/Editor/FixedMathTest.cs @@ -44,7 +44,7 @@ public void AddSubIntTest() { // Assert 33 - 66 = -33 Assert.AreEqual(-33 << 16, FixedMath.Create(33L).Sub(FixedMath.Create(66L))); - // Assert -33 - -66 = -33 + // Assert -33 - -66 = 33 Assert.AreEqual(33 << 16, FixedMath.Create(-33L).Sub(FixedMath.Create(-66L))); } @@ -73,7 +73,7 @@ public void AddSubFloatTest() { [Test] public void RoundTest() { - // Keep in mind the current rounding uses .5 -> 0 + // Keep in mind the current rounding uses 0.5 -> 0 Assert.AreEqual(0, FixedMath.Round(FixedMath.Create(0.5f))); Assert.AreEqual(1 << 16, FixedMath.Round(FixedMath.Create(0.6f))); Assert.AreEqual(0, FixedMath.Round(FixedMath.Create(0.4f))); @@ -108,7 +108,6 @@ public void MulDivTest() { long answer = FixedMath.Create(1073741823.5); Assert.AreEqual(70368744144896L, answer); - // Assert.AreEqual(answer, max.Div(two)); Assert.AreEqual(answer, max.Div(two)); Assert.AreEqual(1 << 16, max.Div(max)); } @@ -119,9 +118,6 @@ public void ToIntTest() { Assert.AreEqual(1, FixedMath.Create(1).ToInt()); Assert.AreEqual(-1, FixedMath.Create(-1).ToInt()); } - - // Test ToFormattedDouble - // test ToPreciseFloat } } From ab1a0a0500f2fe558abf4559a35e70cc41edf106 Mon Sep 17 00:00:00 2001 From: SnpM Date: Fri, 12 Aug 2016 21:54:08 -0600 Subject: [PATCH 9/9] Refactor project organization; Fix API errors --- Core/Game/Agents/AgentController.cs | 2 +- .../Pan-Line-Algorithm-master.meta | 0 .../FractionalLineAlgorithm.cs | 0 .../FractionalLineAlgorithm.cs.meta | 0 .../FractionalLineAlgorithmTest.cs | 0 .../FractionalLineAlgorithmTest.cs.meta | 0 .../Pan-Line-Algorithm-master/LICENSE | 0 .../Pan-Line-Algorithm-master/LICENSE.meta | 0 .../Pan-Line-Algorithm-master/README.md | 0 .../Pan-Line-Algorithm-master/README.md.meta | 0 .../Pan-Line-Algorithm-master/TestScene.unity | 0 .../TestScene.unity.meta | 0 Core/Simulation/Math/Tests.meta | 9 -- Core/Simulation/Math/Tests/Editor.meta | 9 -- .../Math/Tests/Editor/FixedMathTest.cs | 123 ------------------ .../Math/Tests/Editor/FixedMathTest.cs.meta | 12 -- Core/Simulation/Math/Vector2d.cs | 5 +- .../ExampleDatabase/Example_Database.asset | Bin 4724 -> 1636 bytes Example/ExampleScene.unity | Bin 113880 -> 195610 bytes Example/TestAgent.prefab | Bin 18920 -> 12826 bytes .../DefaultLockstepFrameworkSettings.asset | Bin 4208 -> 466 bytes 21 files changed, 5 insertions(+), 155 deletions(-) rename Core/Simulation/{Physics/Raycast => Math}/Pan-Line-Algorithm-master.meta (100%) rename Core/Simulation/{Physics/Raycast => Math}/Pan-Line-Algorithm-master/FractionalLineAlgorithm.cs (100%) rename Core/Simulation/{Physics/Raycast => Math}/Pan-Line-Algorithm-master/FractionalLineAlgorithm.cs.meta (100%) rename Core/Simulation/{Physics/Raycast => Math}/Pan-Line-Algorithm-master/FractionalLineAlgorithmTest.cs (100%) rename Core/Simulation/{Physics/Raycast => Math}/Pan-Line-Algorithm-master/FractionalLineAlgorithmTest.cs.meta (100%) rename Core/Simulation/{Physics/Raycast => Math}/Pan-Line-Algorithm-master/LICENSE (100%) rename Core/Simulation/{Physics/Raycast => Math}/Pan-Line-Algorithm-master/LICENSE.meta (100%) rename Core/Simulation/{Physics/Raycast => Math}/Pan-Line-Algorithm-master/README.md (100%) rename Core/Simulation/{Physics/Raycast => Math}/Pan-Line-Algorithm-master/README.md.meta (100%) rename Core/Simulation/{Physics/Raycast => Math}/Pan-Line-Algorithm-master/TestScene.unity (100%) rename Core/Simulation/{Physics/Raycast => Math}/Pan-Line-Algorithm-master/TestScene.unity.meta (100%) delete mode 100644 Core/Simulation/Math/Tests.meta delete mode 100644 Core/Simulation/Math/Tests/Editor.meta delete mode 100644 Core/Simulation/Math/Tests/Editor/FixedMathTest.cs delete mode 100644 Core/Simulation/Math/Tests/Editor/FixedMathTest.cs.meta mode change 100755 => 100644 Example/TestAgent.prefab diff --git a/Core/Game/Agents/AgentController.cs b/Core/Game/Agents/AgentController.cs index d47a1efa..3f7b4b2a 100755 --- a/Core/Game/Agents/AgentController.cs +++ b/Core/Game/Agents/AgentController.cs @@ -282,7 +282,7 @@ public static int GetStateHash() if (GlobalAgentActive [i]) { LSAgent agent = GlobalAgents [i]; - int n1 = agent.Body._position.GetStateHash() + agent.Body._rotation.GetStateHash(); + int n1 = agent.Body._position.GetHashCode() + agent.Body._rotation.GetStateHash(); switch (operationToggle) { case 0: diff --git a/Core/Simulation/Physics/Raycast/Pan-Line-Algorithm-master.meta b/Core/Simulation/Math/Pan-Line-Algorithm-master.meta similarity index 100% rename from Core/Simulation/Physics/Raycast/Pan-Line-Algorithm-master.meta rename to Core/Simulation/Math/Pan-Line-Algorithm-master.meta diff --git a/Core/Simulation/Physics/Raycast/Pan-Line-Algorithm-master/FractionalLineAlgorithm.cs b/Core/Simulation/Math/Pan-Line-Algorithm-master/FractionalLineAlgorithm.cs similarity index 100% rename from Core/Simulation/Physics/Raycast/Pan-Line-Algorithm-master/FractionalLineAlgorithm.cs rename to Core/Simulation/Math/Pan-Line-Algorithm-master/FractionalLineAlgorithm.cs diff --git a/Core/Simulation/Physics/Raycast/Pan-Line-Algorithm-master/FractionalLineAlgorithm.cs.meta b/Core/Simulation/Math/Pan-Line-Algorithm-master/FractionalLineAlgorithm.cs.meta similarity index 100% rename from Core/Simulation/Physics/Raycast/Pan-Line-Algorithm-master/FractionalLineAlgorithm.cs.meta rename to Core/Simulation/Math/Pan-Line-Algorithm-master/FractionalLineAlgorithm.cs.meta diff --git a/Core/Simulation/Physics/Raycast/Pan-Line-Algorithm-master/FractionalLineAlgorithmTest.cs b/Core/Simulation/Math/Pan-Line-Algorithm-master/FractionalLineAlgorithmTest.cs similarity index 100% rename from Core/Simulation/Physics/Raycast/Pan-Line-Algorithm-master/FractionalLineAlgorithmTest.cs rename to Core/Simulation/Math/Pan-Line-Algorithm-master/FractionalLineAlgorithmTest.cs diff --git a/Core/Simulation/Physics/Raycast/Pan-Line-Algorithm-master/FractionalLineAlgorithmTest.cs.meta b/Core/Simulation/Math/Pan-Line-Algorithm-master/FractionalLineAlgorithmTest.cs.meta similarity index 100% rename from Core/Simulation/Physics/Raycast/Pan-Line-Algorithm-master/FractionalLineAlgorithmTest.cs.meta rename to Core/Simulation/Math/Pan-Line-Algorithm-master/FractionalLineAlgorithmTest.cs.meta diff --git a/Core/Simulation/Physics/Raycast/Pan-Line-Algorithm-master/LICENSE b/Core/Simulation/Math/Pan-Line-Algorithm-master/LICENSE similarity index 100% rename from Core/Simulation/Physics/Raycast/Pan-Line-Algorithm-master/LICENSE rename to Core/Simulation/Math/Pan-Line-Algorithm-master/LICENSE diff --git a/Core/Simulation/Physics/Raycast/Pan-Line-Algorithm-master/LICENSE.meta b/Core/Simulation/Math/Pan-Line-Algorithm-master/LICENSE.meta similarity index 100% rename from Core/Simulation/Physics/Raycast/Pan-Line-Algorithm-master/LICENSE.meta rename to Core/Simulation/Math/Pan-Line-Algorithm-master/LICENSE.meta diff --git a/Core/Simulation/Physics/Raycast/Pan-Line-Algorithm-master/README.md b/Core/Simulation/Math/Pan-Line-Algorithm-master/README.md similarity index 100% rename from Core/Simulation/Physics/Raycast/Pan-Line-Algorithm-master/README.md rename to Core/Simulation/Math/Pan-Line-Algorithm-master/README.md diff --git a/Core/Simulation/Physics/Raycast/Pan-Line-Algorithm-master/README.md.meta b/Core/Simulation/Math/Pan-Line-Algorithm-master/README.md.meta similarity index 100% rename from Core/Simulation/Physics/Raycast/Pan-Line-Algorithm-master/README.md.meta rename to Core/Simulation/Math/Pan-Line-Algorithm-master/README.md.meta diff --git a/Core/Simulation/Physics/Raycast/Pan-Line-Algorithm-master/TestScene.unity b/Core/Simulation/Math/Pan-Line-Algorithm-master/TestScene.unity similarity index 100% rename from Core/Simulation/Physics/Raycast/Pan-Line-Algorithm-master/TestScene.unity rename to Core/Simulation/Math/Pan-Line-Algorithm-master/TestScene.unity diff --git a/Core/Simulation/Physics/Raycast/Pan-Line-Algorithm-master/TestScene.unity.meta b/Core/Simulation/Math/Pan-Line-Algorithm-master/TestScene.unity.meta similarity index 100% rename from Core/Simulation/Physics/Raycast/Pan-Line-Algorithm-master/TestScene.unity.meta rename to Core/Simulation/Math/Pan-Line-Algorithm-master/TestScene.unity.meta diff --git a/Core/Simulation/Math/Tests.meta b/Core/Simulation/Math/Tests.meta deleted file mode 100644 index 2024fe7b..00000000 --- a/Core/Simulation/Math/Tests.meta +++ /dev/null @@ -1,9 +0,0 @@ -fileFormatVersion: 2 -guid: 395a367a4de0e4d0baf5153e2a59fabb -folderAsset: yes -timeCreated: 1468530563 -licenseType: Free -DefaultImporter: - userData: - assetBundleName: - assetBundleVariant: diff --git a/Core/Simulation/Math/Tests/Editor.meta b/Core/Simulation/Math/Tests/Editor.meta deleted file mode 100644 index 2225e432..00000000 --- a/Core/Simulation/Math/Tests/Editor.meta +++ /dev/null @@ -1,9 +0,0 @@ -fileFormatVersion: 2 -guid: b77cfd3739c7b42c9805fe5a03b98222 -folderAsset: yes -timeCreated: 1468530563 -licenseType: Free -DefaultImporter: - userData: - assetBundleName: - assetBundleVariant: diff --git a/Core/Simulation/Math/Tests/Editor/FixedMathTest.cs b/Core/Simulation/Math/Tests/Editor/FixedMathTest.cs deleted file mode 100644 index 098ee305..00000000 --- a/Core/Simulation/Math/Tests/Editor/FixedMathTest.cs +++ /dev/null @@ -1,123 +0,0 @@ -using System; -using UnityEngine; -using UnityEditor; -using NUnit.Framework; -using Lockstep; - -namespace MonoTests.Lockstep { - [TestFixture] - public class FixedMathTest { - - [SetUp] - public void GetReady() { - } - - [TearDown] - public void Clean() { - } - - [Test] - public void CreateLongTest() { - Assert.AreEqual(0L, FixedMath.Create(0L)); - Assert.AreEqual(1L << 16, FixedMath.Create(1L)); - Assert.AreEqual(-1L << 16, FixedMath.Create(-1L)); - Assert.AreEqual(132414LL << 16, FixedMath.Create(132414L)); - } - - [Test] - public void AddSubIntTest() { - long n1 = FixedMath.Create(-1L); - long p1 = FixedMath.Create(1L); - - // Assert 1 + -1 = 0 - Assert.AreEqual(0, n1.Add(p1)); - - // Assert 1 + 1 = 2 - Assert.AreEqual(2 << 16, p1.Add(p1)); - - // Assert -1 + -1 = -2 - Assert.AreEqual(-2 << 16, n1.Add(n1)); - - // Assert 12 - 7 = 5 - Assert.AreEqual(5 << 16, FixedMath.Create(12L).Sub(FixedMath.Create(7L))); - - // Assert 33 - 66 = -33 - Assert.AreEqual(-33 << 16, FixedMath.Create(33L).Sub(FixedMath.Create(66L))); - - // Assert -33 - -66 = 33 - Assert.AreEqual(33 << 16, FixedMath.Create(-33L).Sub(FixedMath.Create(-66L))); - } - - [Test] - public void CreateFloatTest() { - // The left 48 bits in the number are the whole number - // and the right 16 are the fraction. This test ensures - // the fractional numbers are being assigned correctly. - Assert.AreEqual(0, FixedMath.Create(0f)); - // Assert 1.5 = ..001|100.. - Assert.AreEqual((1 << 16) + (1 << 15), FixedMath.Create(1.5f)); - // Assert .75 = ..0000|1100.. - Assert.AreEqual((1 << 14) + (1 << 15), FixedMath.Create(.75f)); - Assert.AreEqual((1 << 26) + (1 << 15), FixedMath.Create(1024.5f)); - Assert.AreEqual(-((1 << 26) + (1 << 15)), FixedMath.Create(-1024.5f)); - } - - [Test] - public void AddSubFloatTest() { - long half = FixedMath.Create(0.5f); - Assert.AreEqual(1 << 16, half.Add(half)); - - long quarter = FixedMath.Create(0.5f); - Assert.AreEqual(1 << 16, half.Add(half)); - } - - [Test] - public void RoundTest() { - // Keep in mind the current rounding uses 0.5 -> 0 - Assert.AreEqual(0, FixedMath.Round(FixedMath.Create(0.5f))); - Assert.AreEqual(1 << 16, FixedMath.Round(FixedMath.Create(0.6f))); - Assert.AreEqual(0, FixedMath.Round(FixedMath.Create(0.4f))); - Assert.AreEqual(0, FixedMath.Round(FixedMath.Create(0.1f))); - - // Keep in mind the current rounding uses 0.5 -> -1 - Assert.AreEqual(-1 << 16, FixedMath.Round(FixedMath.Create(-0.5f))); - Assert.AreEqual(-1 << 16, FixedMath.Round(FixedMath.Create(-0.6f))); - Assert.AreEqual(0, FixedMath.Round(FixedMath.Create(-0.4f))); - Assert.AreEqual(0, FixedMath.Round(FixedMath.Create(-0.1f))); - } - - [Test] - public void CreateFromFractionTest() { - Assert.AreEqual(0, FixedMath.Create(0, 100)); - Assert.AreEqual(1 << 15, FixedMath.Create(1, 2)); - Assert.AreEqual(-1 << 15, FixedMath.Create(-1, 2)); - Assert.AreEqual(-1 << 15, FixedMath.Create(1, -2)); - Assert.AreEqual(1 << 15, FixedMath.Create(-1, -2)); - } - - [Test] - public void MulDivTest() { - long two = FixedMath.Create(2); - // Assert 2x2 = 4 - Assert.AreEqual(1 << 18, two.Mul(two)); - - // Assert 2/2 = 1 - Assert.AreEqual(1 << 16, two.Div(two)); - - long max = FixedMath.Create(int.MaxValue); - long answer = FixedMath.Create(1073741823.5); - Assert.AreEqual(70368744144896L, answer); - - Assert.AreEqual(answer, max.Div(two)); - Assert.AreEqual(1 << 16, max.Div(max)); - } - - [Test] - public void ToIntTest() { - Assert.AreEqual(0, FixedMath.Create(0).ToInt()); - Assert.AreEqual(1, FixedMath.Create(1).ToInt()); - Assert.AreEqual(-1, FixedMath.Create(-1).ToInt()); - } - } -} - diff --git a/Core/Simulation/Math/Tests/Editor/FixedMathTest.cs.meta b/Core/Simulation/Math/Tests/Editor/FixedMathTest.cs.meta deleted file mode 100644 index 4f8366bc..00000000 --- a/Core/Simulation/Math/Tests/Editor/FixedMathTest.cs.meta +++ /dev/null @@ -1,12 +0,0 @@ -fileFormatVersion: 2 -guid: 8293726fbe2e445eaa66b1e04a99e6dd -timeCreated: 1468530563 -licenseType: Free -MonoImporter: - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Core/Simulation/Math/Vector2d.cs b/Core/Simulation/Math/Vector2d.cs index 2435d907..4aed709c 100755 --- a/Core/Simulation/Math/Vector2d.cs +++ b/Core/Simulation/Math/Vector2d.cs @@ -452,10 +452,13 @@ public long GetLongHashCode() return x * 31 + y * 7; } - public override int GetHashCode() + public int GetStateHash() { return (int)(GetLongHashCode() % int.MaxValue); } + public override int GetHashCode () { + return this.GetStateHash (); + } public void Write(Writer writer) { diff --git a/Example/ExampleDatabase/Example_Database.asset b/Example/ExampleDatabase/Example_Database.asset index 76fd0ddb69019b53226ca347f7254b07b98ae724..876aea4e2c10be0f41bcd9e73021778acecba4d6 100644 GIT binary patch literal 1636 zcmb`HO^@0z5Qgvk3h!Zi0u(!6kQ)n>A}#HzaH*;ajXwfzlQ>EYDysV5>j?`Yf|a%s z91y%7zdSSZhR1KC#WSIO+Id`!X5?Y_KrC#MU7_v4mwjRKF7qf&I=x;GPbm$^2lwXT ztFthLc~V>0YqP784k7va3;(Hv{iLP(n8Bt_h}Xz3l}drXK&1+MEJ?_pRA*{FaV38* zYUYJiRRP)c`3!RP*4=3VJX10uw6U5>ZB2DWu@sdq?S(U?Vbe*MY z?raSk_Z^FIVm-1h8kd!-?Fdht=!&GO8(3|M=9ZJRz|ZZeIk{{`dvQQL&!^t0r5I$& zBFVytMR5=YoJZ-9hhY$VUPxtpYKdV>Yh9GPYqn*ngoX@fd**%B*bU9Up#_)P*i@=z zhC<5;g_aEpEswcXdCLQZmIn$g4;0YDjm%(5UHopY;c1s;>JEE|;)tF15X3`4Idh|z z122dIHUJ4yrZnP#FVvvD2bHD{u%RR0e;_k(owU7oh4E`H3QXx& zl_uobh+nl;WglI;WK`EG=h>k*UT&c(k3W-XS5eF{C}SgC{!hDV;***x2kTNh1G~k< zw|2A?P~0CDUH=Cbk#57b;V0_RRgNl7nV`2>Qpbx&7Xd(~B7auh7!5B$=!218s?B33;x4fHllGA(U zH)sBH?m2hwOhwil7HRiIzF9?{CiU{Cd7K z-?Zx0b6;j(I{Wu8$@Aa+@zMT;BX5@xw;REXZ?&ZMph%7P;S?UZCGRv#?PFYv0WmH# z{uTKid=17X7-KDXKjF?BanAVW2v0!gcAT%OUkl?cd7(*a7wS6kNPJYMCBmaRt%_UH z3!T}z4xce#$fqsBqdKbd(CzoX65S zTobU6N1u!CDV-7MzYiVOpDnd&LAM6_ntlg)Ke?{Ye&W`ENA+(~+>*`kAAm8>n=#61-lOZ^qPVVqD><6R z=YCSppE{i?J{IJURs{O%6pw59-v(}tP^U$!&wBDezeTGL*JH>-{b8K*xf?Ks`Rn={ zflc~%kQ?;xR6Hh=@Ut+kolUTCzH#mMau;x@6PM^Zxm)p=%)oyRMxA?LCY{Z|CY>#c zTXG8iYcS6DUW}%G-KV(TuP*XnzIwm9RlMG>gyMQV?*}*4b1S)_p7vcu8uNdM+>rmnitFp`5pa|KPR5VGmaOMpN=IMM zk1DROw?1&wI@zt__4U@TxW3-_`!nh6QSrJ?QgKVZfd4Iw{Tjq*>Q_o}yFE91r?}p)ad1;V)a!ge zalKy?%jj?~GVKos6}RL^_`kx~uO~2?`gKTgyir4$~wBq{yfUg{5J)a>r z^lM6SyZ>`$KE297!eDE zQ?iSWWTu^J&T}h1ZVxp#O;kMBclspb<`f%7?7r+VC+CA#JST5wC0(kVh$y>_QyKTl zj6@=f&#h=oQu#b07B4&MTn4gk!S&}Bui1-0k_Ee3ot&#U2b{d)Ii(zC5autL9It^( zrr=glks!Zhc^V;ZDPQ)AHYYiZvN#@=g-HLOXIaeP@SDPAqwl>w|5v)bE87u3dG~U*+sO{6KEL$YL0>wahY}9|n{#IlzuZ4`>f*)A_UKoy zgfzIc@@J(2D;4;ERiM5d1lvMmPvF0nsgriGQgAZduCjKOZ=E2f4dbL!^@Ht~aLK{# z;D;AORsQ>d9bG0WPR_Lp+amtkXfu==AvpXvEWR z#M5uY(`P(0TMgqJ_M9jb93Ll34sL%JA{!fDPqe+|S!YS8tOpn?=Z<4zt|S=HwPB!I zb&A=-Tz7I}#`Y?U`7#$ipIQ?+J9y*4RfndONe&|{VFlaUIpvI(U X|3_mZc)B!e^A$X3&m|ah1sVAlO1zdx diff --git a/Example/ExampleScene.unity b/Example/ExampleScene.unity index 8d0e2feeb8de258311b750d358a23eba6ae4903b..69cfcbd8b4216ab4672f2fc61edd0a7845589e4e 100644 GIT binary patch literal 195610 zcmeI5TXWkuvd7>3DYy?ibxu|6B6z3Ye96V9;>2Y+nX|REr2E zTeBZI3biKtv)9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*=900@8p2!H?xfB*=900@8p2!H?xfB*=900@8p2!H?xfB*=900@8p2!H?xfB*=9 z00@8p2!H?xfB*=900@8p2!H?xfB*=900@8p2!H?xfB*=900@8p2!H?xfB*=900@8p z2!H?xfB*=900@8p2!H?xfB*=900@8p2!H?xfB*=900@8p2!H?xfB*=900@8p2!H?x zfB*=900@8p2!H?xfB*=900@8p2!H?xfB*=900@8p2!H?xfB*=900@8p2!H?xfB*=9 z00@8p2!H?xfB*=900@8p2!H?xfB*=900@8p2!H?xfB*=900@8p2!H?xfB*=900@8p z2!H?xfB*=900@8p2!H?xfB*=900@8p2!H?xfB*=900@8p2!H?xfB*=900@8p2!H?x zfB*=900@8p2!H?xfB*=900@8p2!H?xfB*=900@8p2!H?xfB*=900@8p2!H?xfB*=9 z00@8p2!H?xfB*=900@8p2!H?xfB*=900@8p2!H?xfB*=900@8p2!H?xfB*=900@8p z2!H?xfB*=900@8p2!H?xfB*=900@8p2!H?xfB*=900@8p2!H?xfB*=900@8p2!H?x zfB*=900@8p2!H?xfB*=900@8p2!H?xfB*=900@8p2!H?xfB*=900@8p2!H?xfB*=9 z00@8p2!H?xfB*=900@8p2!H?xfB*=900@8p2!H?xfB*=900@8p2t0tmj^m6MSM|-l zP4?mB;4{*5`md9EKP5o2+>^O{e^`|RH$Z}+M0bgch=Qx@V?#V;4~K6&}95fh%B z@kY#AQ{DMo574ZwF zy`77F$NSHq<&#+}ni;S52dze7>bXJaC9>i|G$pUfKSc3SG>fvH?K^?G|EQkM>luk9 z<==IJK@0XV6IZsd>-herLM6wp<83TtTFAHjRy3ByJ3_YajOJIO5lVy$emQEJa(21z ze3-TT@=_G)`bjRu>@X=QrsH?~`cy2gR+=2Oye;#WMcLNP3ip%6LEe_v^nJ|sU(oko z;_h5De72a>&Ghlz7lf|o2j92*rsKgt>yg+Vic`b6&UtlSOBxE@XJY=sxmCaaP`_y; z+dh$X&+0{ar|w?#!jZKHZH}leLHv^%WU4{>O;v_XyKDYhW&Y6x9^)m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Z?n-WTC~Z4j9kfh`AbmN^he%#5G!@r& zREF~5^#0C8#ZrHe$4yhvy{flV94yGtpMvz&`wqijDepDSx7&MLw{oyLEG_O@327F@ zpG&W8eHZUpH%&{R)21y?Z-j~&n%)ysf{)KQlL?)>Eb-jIk0tXM2-XxD`%$0@`)w`X TWG~6N%Hx&z#@@e-Q|x~L0{jvl diff --git a/Example/TestAgent.prefab b/Example/TestAgent.prefab old mode 100755 new mode 100644 index 9b6aa58bba8fa1fe9935b866b38cd7deebaf4658..b24a6dd14e6a0f6b436052710d0c2c8706eec0e1 GIT binary patch literal 12826 zcmeHOTXUPp5`OouU>`P5u?iTjev_S>s^Y|DIo^}n+M||MF^@=4Up%yP~ z)3Q#Ej*pM=s%5;eOp{sW(ObTdALD;ZQJ)+c#v;<6-(`t>lk-`1Vwg01QOcCZ7rc~3 z-Ap(BOtV~0Ucr?A_U25AT9yURPuAB#6#Ri7oL9**<9YT)CfBm8GF6-y4&8pH7B{MZ z_3=TD4X3w&o^ZxW1;Ikw5IL4p7($})3Y92(+_?7 zA$g8(>-!ebd%luotJ)7>ffM6OR`qxWyC+>-@!7O4vto8)d@8__Gnvr%M4-Ml75{g*OoTK&_&e4G8hoCeplnWL@4SWg{{c_wq3D|Y`1 z>P5Mmbx?Phk?rc;V1CkFH8yRH-T#4}`{jTVxUSqVd|xEjl30*;Rt)mkOPm zBEdaGk(b7bet)6gci`B)xfiO+9+*3F$daIYTyzS5At?NbD~?>fCjN`7jwlv36JIZL zS&oZYE~|GLL~DIZ{~@&avw4;$kS|V*-~XVa`-a!xWxb=}bdJ1;E|sc3mWd9FO_oAS z(3GFX5)>tS+Wp&>7UWy}^nbiQQ2Kalk=sV;a_z%Lp(#I& zQ3%NN6!^D|@)RcNxx$u7nh?3mMQmogXp-9zVt`9ofDeHek;iR;xgQm=dVcb{;BhV! zgd3QA&v;c&=R8q&fGzdVr4$kX$;Rlp!mxD>z*Lpp)c4tJUSE_dmY*s5j@zSVQ zHz2UV5YuH`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C8Z@_(tO+PN&i?bfj@k6e9A|c<8SXrm+J)^ zK71X4EOsyGRm2BaKmOSK$hhiu@Q3gJPkux`oZAO32{|8VKUnVDlX_T_+wVT|--z4wI7h;%~ctf9=yo#``n=eN+3b zX(1J%A0qwti@F@AtJG^|HMEGFEM40du*m2=9M_Ho9k{Q}#Y21Sd~44DZ_`paV&sjf z;uZKaz(@F$w_UA2`P%-9)Txn(^^Vdt_VHBgp3t#WYxb0?7}l`+ zXUFYYVQGV2WM?AIJ!`VIIg`b2pWH%at>-!2l?5Jvm@&3gI95|B?rX7ok~8f{WwzU2 zUGDYyr9M}HhoyhdYR)^RRaNzBM*!~MV;=-7yMeK-sZyxKo9>}sPalr661BQ=`c(7G zEK$jadewy^f68??54>)vzH$$7qP~`@hh|S$kMqnwywyFAuQwXRAL4DvMLGWLE{*t! z#+hdpy>%q*6rE2@y%BkQD9`y*bTsnE=m<8(!Pkoux5s&lvDUXf$lL4)#b|Oz|Tu{#U@@Vr3Jv3CM};CGphTO5B)y5U3#K1px()^ z<4L=^YTC5EEt%n6^MkUSdo#&PKSqq_XZEk9jJ&I7_ftimya)fffc?XI(Be~S&Cv3a ze}iCvbvS={g6`j+I-$O@zy1whJ%-g#)BfhEE^mHsre!s2_RQ(k{Ro%m&Y^yG4QMVz Q>vRuj9-tZh*gon10KV{76951J diff --git a/Resources/DefaultLockstepFrameworkSettings.asset b/Resources/DefaultLockstepFrameworkSettings.asset index 7fc250dc06f51e9ad59e21e16cbc6bac82f93d77..4acf87f460e8854d87869f69379423a951c833d9 100644 GIT binary patch literal 466 zcmZ{gOK-w35QOjf73M%sfb3w5;~OoHB0-BpFFheYHmOU9k>j*NRsVYp2!w>{gAY5i zqi?7EK3Xmi>5-)UHkzSU(?UTOqN!{+^i5B@T_?qah@{)?9#ujpdWauBzGUet_Xr>I z%euyk1fkvLRegdE&(^@SltnENK8;r%a;a9*Llw>zfqrsZ!h9Spzc-$F6~I@ryw_)P z2mkF(Dyd2^0+CbH#Mt2c9mQIEyALmTL-_bJ{n9Va7p{ zA;!ZF3Wq%i)ISryL?VI4@wBE43#Yerfc@0R>9_OSHH2WRqP`(|DrH^IO)SCY7Q8@F q+ZY+7l66eFHgakB!Ufte${{6$VNO#;Gs*@m!(4KfDRSjXf0I8Chm8XO literal 4208 zcmeH~y=xRf7{=eZ)tvDon)sa*T11G=q2xpm33qV$5U)5%sYkN$Hr|=shkNT+w}q&X zP6P!JtR$c!#>!H#u@NjRw2+j3fQ_J?=kv_&EtB9MU@-^p&O5(-=b4#j_KFd4>LNQ@ zBC;JV8j)j}Z05-PsQl@4I!Xbc?F@f>`tYzUe>zwCvGg^+diLe_k@Ablf&2O2w+_93 zJ9%dabp-_L(@MhQA|c12i;P^!V@JXjyxRc8x+wS*`2fBZZ3@9!h3qp%?m?gRj=?j~ zIe`AA_+3=55Bq^t%uOE#V_qr+{>kx5Eol1V*8;E6t~DEDQlFWqEqbR4NJ?%{ zMWXA5i_--+aOd2%HzqTcIK`a$m;3oFO7P?#h4%R*kx$HI_4;$&^7ECY2eYqde--;~ zXUq4#45nNBc17ORZ)Ey=rdIA&yx!&Nt4q36zp)SNfOWt+U>&dySO=^F)&c8)b-+6C zA2|?Th4huDd)GOL^%cB%_wr&;Y@T0e2VQH!ckABOroS-l1wpNGq0KGuqSL)Y{RMud Bo^AjD