Skip to content

Commit

Permalink
Can now select and move units. Dragging is local, rest is global
Browse files Browse the repository at this point in the history
Made unit movement trigger through a Position and Rotation state property, rather than a Transform property, because the transform would mean that it either needs to be manually changed on the Controller when the Owner changes the values, or the controller cant have local transform changes (like dragging). Using just a state property Vector3 Position, I can add a callback to that state everywhere (even controller), but the actual transform isn't locked to the state.Transform
  • Loading branch information
mariuskilian committed May 4, 2020
1 parent 7d939e5 commit 9b320bc
Show file tree
Hide file tree
Showing 56 changed files with 761 additions and 282 deletions.
2 changes: 1 addition & 1 deletion Assets/Data/Arena Layout/CIRCLE.asset
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ MonoBehaviour:
- row: 00010101010101010100
- row: 00010101010101010100
- row: 00000001010101000000
BenchSize: 10
BenchSizeTiles: 10
EqualDimensions: 1
PointSymmetric: 1
YSymmetric: 1
Expand Down
Binary file modified Assets/Photon/PhotonBolt/assemblies/bolt.user.dll
Binary file not shown.
175 changes: 174 additions & 1 deletion Assets/Photon/PhotonBolt/project.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,104 @@
"Assets": [
{
"$type": "Bolt.Compiler.StateDefinition, bolt.compiler",
"Properties": [],
"Properties": [
{
"Name": "Position",
"Enabled": true,
"ReplicationMode": 1,
"Priority": 1,
"PropertyType": {
"$type": "Bolt.Compiler.PropertyTypeVector, bolt.compiler",
"Selection": 14,
"Compression": [
{
"MinValue": -1024,
"MaxValue": 1024,
"Accuracy": 0.01,
"Pack": 100.0,
"Read": 0.01,
"Shift": 1024.0,
"BitsRequired": 18
},
{
"MinValue": -1024,
"MaxValue": 1024,
"Accuracy": 0.01,
"Pack": 100.0,
"Read": 0.01,
"Shift": 1024.0,
"BitsRequired": 18
},
{
"MinValue": -1024,
"MaxValue": 1024,
"Accuracy": 0.01,
"Pack": 100.0,
"Read": 0.01,
"Shift": 1024.0,
"BitsRequired": 18
}
]
},
"AssetSettings": {
"$type": "Bolt.Compiler.PropertyStateSettings, bolt.compiler",
"ExtrapolationErrorTolerance": 0.25,
"_ExtrapolationCorrectionFrames": 6,
"ExtrapolationMaxFrames": 9,
"SnapMagnitude": 10.0
}
},
{
"Name": "Rotation",
"Enabled": true,
"Expanded": true,
"ReplicationMode": 2,
"Priority": 1,
"PropertyType": {
"$type": "Bolt.Compiler.PropertyTypeQuaternion, bolt.compiler",
"Selection": 14,
"EulerCompression": [
{
"MaxValue": 360,
"Accuracy": 1.0,
"Pack": 1.0,
"Read": 1.0,
"BitsRequired": 9
},
{
"MaxValue": 360,
"Accuracy": 1.0,
"Pack": 1.0,
"Read": 1.0,
"BitsRequired": 9
},
{
"MaxValue": 360,
"Accuracy": 1.0,
"Pack": 1.0,
"Read": 1.0,
"BitsRequired": 9
}
],
"QuaternionCompression": {
"MinValue": -1,
"MaxValue": 1,
"Accuracy": 0.01,
"Pack": 100.0,
"Read": 0.01,
"Shift": 1.0,
"BitsRequired": 8
}
},
"AssetSettings": {
"$type": "Bolt.Compiler.PropertyStateSettings, bolt.compiler",
"ExtrapolationErrorTolerance": 0.25,
"_ExtrapolationCorrectionFrames": 6,
"ExtrapolationMaxFrames": 9,
"SnapMagnitude": 10.0
}
}
],
"PacketMaxBits": 512,
"PacketMaxProperties": 16,
"InitialPositionCompression": {
Expand Down Expand Up @@ -551,6 +648,82 @@
"Name": "StoreUnitState",
"Guid": "54999bf8-0394-442d-acfc-ddf1e16e8eeb",
"Groups": []
},
{
"$type": "Bolt.Compiler.EventDefinition, bolt.compiler",
"Properties": [
{
"Name": "Unit",
"Enabled": true,
"Expanded": true,
"ReplicationMode": 1,
"Priority": 1,
"PropertyType": {
"$type": "Bolt.Compiler.PropertyTypeNetworkId, bolt.compiler"
},
"AssetSettings": {
"$type": "Bolt.Compiler.PropertyEventSettings, bolt.compiler"
}
},
{
"Name": "ClickPosition",
"Enabled": true,
"ReplicationMode": 1,
"Priority": 1,
"PropertyType": {
"$type": "Bolt.Compiler.PropertyTypeVector, bolt.compiler",
"Selection": 14,
"Compression": [
{
"MinValue": -1024,
"MaxValue": 1024,
"Accuracy": 0.01,
"Pack": 100.0,
"Read": 0.01,
"Shift": 1024.0,
"BitsRequired": 18
},
{
"MinValue": -1024,
"MaxValue": 1024,
"Accuracy": 0.01,
"Pack": 100.0,
"Read": 0.01,
"Shift": 1024.0,
"BitsRequired": 18
},
{
"MinValue": -1024,
"MaxValue": 1024,
"Accuracy": 0.01,
"Pack": 100.0,
"Read": 0.01,
"Shift": 1024.0,
"BitsRequired": 18
}
]
},
"AssetSettings": {
"$type": "Bolt.Compiler.PropertyEventSettings, bolt.compiler"
}
},
{
"Name": "ClickedBoard",
"Enabled": true,
"Expanded": true,
"ReplicationMode": 1,
"Priority": 1,
"PropertyType": {
"$type": "Bolt.Compiler.PropertyTypeBool, bolt.compiler"
},
"AssetSettings": {
"$type": "Bolt.Compiler.PropertyEventSettings, bolt.compiler"
}
}
],
"Name": "ClientUnitDeselectEvent",
"Guid": "3953c576-9ada-4455-847d-d415feabbeb0",
"Groups": []
}
],
"ActiveGroup": "Everything"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ MonoBehaviour:
showDebugInfo: 1
overrideTimeScale: 1
logUncaughtExceptions: 0
debugEditorMode: 2
debugEditorMode: 1
consoleToggleKey: 9
consoleVisibleByDefault: 0
compilationWarnLevel: 4
Expand Down
4 changes: 2 additions & 2 deletions Assets/Prefabs/Arena.prefab
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ Transform:
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 5203468863060660643}
m_LocalRotation: {x: 0, y: 0, z: -0, w: 1}
m_LocalPosition: {x: -5, y: 0, z: 5}
m_LocalPosition: {x: -10, y: 0, z: 10}
m_LocalScale: {x: 1, y: 1, z: -1}
m_Children: []
m_Father: {fileID: 7401875030834618298}
Expand Down Expand Up @@ -667,7 +667,7 @@ Transform:
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 7555812946015441713}
m_LocalRotation: {x: 0, y: 1, z: 0, w: 0}
m_LocalPosition: {x: 5, y: 0, z: -5}
m_LocalPosition: {x: 10, y: 0, z: -10}
m_LocalScale: {x: 1, y: 1, z: -1}
m_Children: []
m_Father: {fileID: 7401875030834618298}
Expand Down
4 changes: 2 additions & 2 deletions Assets/Prefabs/Player.prefab
Original file line number Diff line number Diff line change
Expand Up @@ -104,8 +104,8 @@ Transform:
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1915322147054204024}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 1.39, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_LocalPosition: {x: 5, y: 0, z: 5}
m_LocalScale: {x: 0.2, y: 0.2, z: 0.2}
m_Children: []
m_Father: {fileID: 1660498949091557803}
m_RootOrder: 0
Expand Down
30 changes: 15 additions & 15 deletions Assets/Prefabs/StoreUnits/001BulbasaurStore.prefab
Original file line number Diff line number Diff line change
Expand Up @@ -349,9 +349,9 @@ GameObject:
serializedVersion: 6
m_Component:
- component: {fileID: 2342220508695812470}
- component: {fileID: -9049140579694151119}
- component: {fileID: -4503716679521164358}
- component: {fileID: 3681609011508392300}
- component: {fileID: -9049140579694151119}
m_Layer: 9
m_Name: 001BulbasaurStore
m_TagString: Untagged
Expand All @@ -375,6 +375,20 @@ Transform:
m_Father: {fileID: 0}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!114 &-9049140579694151119
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1646739649162652517}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 8382530f9e014b44381d41b906b9bc2a, type: 3}
m_Name:
m_EditorClassIdentifier:
variant: {fileID: 0}
unit: {fileID: 375144434501584237, guid: c0e29a0df41cae64da3e2ac19e3c5643, type: 3}
--- !u!95 &-4503716679521164358
Animator:
serializedVersion: 3
Expand Down Expand Up @@ -423,20 +437,6 @@ MonoBehaviour:
_entityBehaviourQueryOption: 0
_entityPriorityCalculatorQueryOption: 0
_entityReplicationFilterQueryOption: 0
--- !u!114 &-9049140579694151119
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1646739649162652517}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 8382530f9e014b44381d41b906b9bc2a, type: 3}
m_Name:
m_EditorClassIdentifier:
variant: {fileID: 0}
unit: {fileID: 375144434501584237, guid: c0e29a0df41cae64da3e2ac19e3c5643, type: 3}
--- !u!1 &1657320835397661920
GameObject:
m_ObjectHideFlags: 0
Expand Down
30 changes: 15 additions & 15 deletions Assets/Prefabs/StoreUnits/004CharmanderStore.prefab
Original file line number Diff line number Diff line change
Expand Up @@ -853,9 +853,9 @@ GameObject:
serializedVersion: 6
m_Component:
- component: {fileID: 1086484175621271612}
- component: {fileID: 7070406469247555936}
- component: {fileID: -1539175079699317484}
- component: {fileID: -3573421820126408814}
- component: {fileID: 7070406469247555936}
m_Layer: 9
m_Name: 004CharmanderStore
m_TagString: Untagged
Expand All @@ -879,6 +879,20 @@ Transform:
m_Father: {fileID: 0}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!114 &7070406469247555936
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 4127740652721783343}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 8382530f9e014b44381d41b906b9bc2a, type: 3}
m_Name:
m_EditorClassIdentifier:
variant: {fileID: 0}
unit: {fileID: 615973173250792259, guid: d44dcf4f74267074fa01a9854f100bd9, type: 3}
--- !u!95 &-1539175079699317484
Animator:
serializedVersion: 3
Expand Down Expand Up @@ -927,20 +941,6 @@ MonoBehaviour:
_entityBehaviourQueryOption: 0
_entityPriorityCalculatorQueryOption: 0
_entityReplicationFilterQueryOption: 0
--- !u!114 &7070406469247555936
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 4127740652721783343}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 8382530f9e014b44381d41b906b9bc2a, type: 3}
m_Name:
m_EditorClassIdentifier:
variant: {fileID: 0}
unit: {fileID: 615973173250792259, guid: d44dcf4f74267074fa01a9854f100bd9, type: 3}
--- !u!1 &4138023253936758186
GameObject:
m_ObjectHideFlags: 0
Expand Down
30 changes: 15 additions & 15 deletions Assets/Prefabs/StoreUnits/007SquirtleStore.prefab
Original file line number Diff line number Diff line change
Expand Up @@ -1116,9 +1116,9 @@ GameObject:
serializedVersion: 6
m_Component:
- component: {fileID: 7892598720847644804}
- component: {fileID: -8462355536035596589}
- component: {fileID: -1259158128457321734}
- component: {fileID: 294311990711787616}
- component: {fileID: -8462355536035596589}
m_Layer: 9
m_Name: 007SquirtleStore
m_TagString: Untagged
Expand All @@ -1142,6 +1142,20 @@ Transform:
m_Father: {fileID: 0}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!114 &-8462355536035596589
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 6616770131647625879}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 8382530f9e014b44381d41b906b9bc2a, type: 3}
m_Name:
m_EditorClassIdentifier:
variant: {fileID: 0}
unit: {fileID: -5143813020075713509, guid: 651df271e854f4b4f90c84a10c03ac60, type: 3}
--- !u!95 &-1259158128457321734
Animator:
serializedVersion: 3
Expand Down Expand Up @@ -1190,20 +1204,6 @@ MonoBehaviour:
_entityBehaviourQueryOption: 0
_entityPriorityCalculatorQueryOption: 0
_entityReplicationFilterQueryOption: 0
--- !u!114 &-8462355536035596589
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 6616770131647625879}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 8382530f9e014b44381d41b906b9bc2a, type: 3}
m_Name:
m_EditorClassIdentifier:
variant: {fileID: 0}
unit: {fileID: -5143813020075713509, guid: 651df271e854f4b4f90c84a10c03ac60, type: 3}
--- !u!1 &6626735792965969170
GameObject:
m_ObjectHideFlags: 0
Expand Down
Loading

0 comments on commit 9b320bc

Please sign in to comment.