Skip to content
This repository was archived by the owner on Dec 5, 2018. It is now read-only.

Commit fbd61b7

Browse files
committed
upgraded to SpatialOS 11.0.0
1 parent 2f60b1a commit fbd61b7

File tree

21 files changed

+167
-187
lines changed

21 files changed

+167
-187
lines changed
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
package improbable.core;
2+
3+
component Rotation {
4+
// Component ID, unique within the project
5+
id = 1004;
6+
7+
// Entity's rotation within the project
8+
uint32 rotation = 2;
9+
}

schema/improbable/core/WorldTransform.schema

Lines changed: 0 additions & 10 deletions
This file was deleted.

schema/improbable/ship/ShipControls.schema

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,6 @@ component ShipControls {
44
// Component ID, unique within the project
55
id = 1000;
66

7-
// Exclude this component from spatial finds
8-
option queryable = false;
9-
107
// The speed at which the ship wants to move at
118
float target_speed = 1;
129
// The direction the ship wants to be steering in

snapshots/default.snapshot

5 Bytes
Binary file not shown.

spatialos.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
{
22
"name": "your_project_name_here",
33
"project_version": "1.0.0",
4-
"sdk_version": "10.4.1",
4+
"sdk_version": "11.0.0",
55
"dependencies": [
6-
{"name": "WorkerSdkSchema", "version": "10.4.1"}
6+
{"name": "standard_library", "version": "11.0.0"}
77
]
88
}

workers/gsim/.gitignore

Lines changed: 0 additions & 6 deletions
This file was deleted.

workers/gsim/spatialos.gsim.worker.json

Lines changed: 0 additions & 6 deletions
This file was deleted.

workers/gsim/src/main/scala/DummyMain.scala

Lines changed: 0 additions & 4 deletions
This file was deleted.

workers/unity/Assets/Editor/SnapshotMenu.cs

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -5,18 +5,17 @@
55
using System.Collections.Generic;
66
using System.IO;
77
using UnityEditor;
8-
using Improbable.Math;
98
using Random = UnityEngine.Random;
109
using UnityEngine;
1110

12-
namespace Assets.Editor
11+
namespace Assets.Editor
1312
{
1413
public class SnapshotMenu : MonoBehaviour
1514
{
1615
[MenuItem("Improbable/Snapshots/Generate Default Snapshot")]
1716
private static void GenerateDefaultSnapshot()
1817
{
19-
var snapshotEntities = new Dictionary<EntityId, SnapshotEntity>();
18+
var snapshotEntities = new Dictionary<EntityId, Entity>();
2019
var currentEntityId = 1;
2120

2221
snapshotEntities.Add(new EntityId(currentEntityId++), EntityTemplateFactory.CreatePlayerCreatorTemplate());
@@ -28,7 +27,7 @@ private static void GenerateDefaultSnapshot()
2827
}
2928

3029
// Create and island entity for each island prefab at its given world coordinates
31-
public static void PopulateSnapshotWithIslandTerrainEntities(ref Dictionary<EntityId, SnapshotEntity> snapshotEntities, ref int nextAvailableId)
30+
public static void PopulateSnapshotWithIslandTerrainEntities(ref Dictionary<EntityId, Entity> snapshotEntities, ref int nextAvailableId)
3231
{
3332
foreach(var item in SimulationSettings.IslandsEntityPlacements)
3433
{
@@ -38,30 +37,30 @@ public static void PopulateSnapshotWithIslandTerrainEntities(ref Dictionary<Enti
3837
}
3938

4039
// Create shoal of small fish entities around given coordinates
41-
public static void PopulateSnapshotWithSmallFishGroups(ref Dictionary<EntityId, SnapshotEntity> snapshotEntities, ref int nextAvailableId)
40+
public static void PopulateSnapshotWithSmallFishGroups(ref Dictionary<EntityId, Entity> snapshotEntities, ref int nextAvailableId)
4241
{
4342
foreach (var location in SimulationSettings.FishShoalStartingLocations)
4443
{
4544
for (var i = 0; i < SimulationSettings.TotalFishInShoal; i++)
4645
{
47-
var nextFishCoodinates = new Coordinates(location.X + Random.Range(-SimulationSettings.ShoalRadius, SimulationSettings.ShoalRadius),
48-
location.Y + Random.Range(SimulationSettings.ShoalMinDepth, SimulationSettings.ShoalMaxDepth),
49-
location.Z + Random.Range(-SimulationSettings.ShoalRadius, SimulationSettings.ShoalRadius));
46+
var nextFishCoodinates = new Vector3(location.x + Random.Range(-SimulationSettings.ShoalRadius, SimulationSettings.ShoalRadius),
47+
location.y + Random.Range(SimulationSettings.ShoalMinDepth, SimulationSettings.ShoalMaxDepth),
48+
location.z + Random.Range(-SimulationSettings.ShoalRadius, SimulationSettings.ShoalRadius));
5049
snapshotEntities.Add(new EntityId(nextAvailableId++), EntityTemplateFactory.GenerateSmallFishTemplate(nextFishCoodinates));
5150
}
5251
}
5352
}
5453

5554
// Create large fish entities
56-
public static void PopulateSnapshotWithLargeFish(ref Dictionary<EntityId, SnapshotEntity> snapshotEntities, ref int nextAvailableId)
55+
public static void PopulateSnapshotWithLargeFish(ref Dictionary<EntityId, Entity> snapshotEntities, ref int nextAvailableId)
5756
{
5857
foreach (var location in SimulationSettings.LargeFishStartingLocations)
5958
{
6059
snapshotEntities.Add(new EntityId(nextAvailableId++), EntityTemplateFactory.GenerateLargeFishTemplate(location));
6160
}
6261
}
6362

64-
private static void SaveSnapshot(IDictionary<EntityId, SnapshotEntity> snapshotEntities)
63+
private static void SaveSnapshot(IDictionary<EntityId, Entity> snapshotEntities)
6564
{
6665
var snapshotPath = Application.dataPath + SimulationSettings.DefaultRelativeSnapshotPath;
6766
File.Delete(snapshotPath);

workers/unity/Assets/EntityPrefabs/PirateShip.prefab

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ Rigidbody:
4747
m_UseGravity: 0
4848
m_IsKinematic: 0
4949
m_Interpolate: 1
50-
m_Constraints: 116
50+
m_Constraints: 84
5151
m_CollisionDetection: 1
5252
--- !u!1001 &100100000
5353
Prefab:
@@ -212,6 +212,7 @@ MeshRenderer:
212212
m_AutoUVMaxAngle: 89
213213
m_LightmapParameters: {fileID: 0}
214214
m_SortingLayerID: 0
215+
m_SortingLayer: 0
215216
m_SortingOrder: 0
216217
--- !u!23 &23655010248811234
217218
MeshRenderer:
@@ -243,6 +244,7 @@ MeshRenderer:
243244
m_AutoUVMaxAngle: 89
244245
m_LightmapParameters: {fileID: 0}
245246
m_SortingLayerID: 0
247+
m_SortingLayer: 0
246248
m_SortingOrder: 0
247249
--- !u!33 &33000420411099608
248250
MeshFilter:
@@ -265,7 +267,7 @@ Light:
265267
m_PrefabInternal: {fileID: 100100000}
266268
m_GameObject: {fileID: 1933846825276336}
267269
m_Enabled: 1
268-
serializedVersion: 7
270+
serializedVersion: 8
269271
m_Type: 0
270272
m_Color: {r: 1, g: 1, b: 1, a: 1}
271273
m_Intensity: 3.13
@@ -290,6 +292,8 @@ Light:
290292
m_Lightmapping: 4
291293
m_AreaSize: {x: 1, y: 1}
292294
m_BounceIntensity: 1.77
295+
m_ColorTemperature: 6570
296+
m_UseColorTemperature: 0
293297
m_ShadowRadius: 0
294298
m_ShadowAngle: 0
295299
--- !u!111 &111887891072063252

0 commit comments

Comments
 (0)