@@ -71,7 +71,7 @@ public IEnumerator CreatePlayerAndTestDecay()
7171 while ( ! playerCreated ) yield return null ;
7272
7373 Debug . Assert ( GameManager . LocalIdentity != default , "GameManager.localIdentity != default" ) ;
74- var player = GameManager . Conn . Db . Player . Identity . Find ( GameManager . LocalIdentity ) ;
74+ var player = GameManager . Conn . Db . Player . PlayerIdentityIdxBtree . Find ( GameManager . LocalIdentity ) ;
7575 Debug . Assert ( player != null , nameof ( player ) + " != null" ) ;
7676 var circle = GameManager . Conn . Db . Circle . Iter ( ) . FirstOrDefault ( a => a . PlayerId == player . PlayerId ) ;
7777
@@ -87,13 +87,13 @@ public IEnumerator CreatePlayerAndTestDecay()
8787 while ( foodEaten < 50 )
8888 {
8989 Debug . Assert ( circle != null , nameof ( circle ) + " != null" ) ;
90- var ourEntity = GameManager . Conn . Db . Entity . EntityId . Find ( circle . EntityId ) ;
90+ var ourEntity = GameManager . Conn . Db . Entity . EntityEntityIdIdxBtree . Find ( circle . EntityId ) ;
9191 var toChosenFood = new UnityEngine . Vector2 ( 1000 , 0 ) ;
9292 int chosenFoodId = 0 ;
9393 foreach ( var food in GameManager . Conn . Db . Food . Iter ( ) )
9494 {
9595 var thisFoodId = food . EntityId ;
96- var foodEntity = GameManager . Conn . Db . Entity . EntityId . Find ( thisFoodId ) ;
96+ var foodEntity = GameManager . Conn . Db . Entity . EntityEntityIdIdxBtree . Find ( thisFoodId ) ;
9797 Debug . Assert ( foodEntity != null , nameof ( foodEntity ) + " != null" ) ;
9898 Debug . Assert ( ourEntity != null , nameof ( ourEntity ) + " != null" ) ;
9999 var foodEntityPosition = foodEntity . Position ;
@@ -109,10 +109,10 @@ public IEnumerator CreatePlayerAndTestDecay()
109109 }
110110 }
111111
112- if ( GameManager . Conn . Db . Entity . EntityId . Find ( chosenFoodId ) != null )
112+ if ( GameManager . Conn . Db . Entity . EntityEntityIdIdxBtree . Find ( chosenFoodId ) != null )
113113 {
114- var ourNewEntity = GameManager . Conn . Db . Entity . EntityId . Find ( circle . EntityId ) ;
115- var foodEntity = GameManager . Conn . Db . Entity . EntityId . Find ( chosenFoodId ) ;
114+ var ourNewEntity = GameManager . Conn . Db . Entity . EntityEntityIdIdxBtree . Find ( circle . EntityId ) ;
115+ var foodEntity = GameManager . Conn . Db . Entity . EntityEntityIdIdxBtree . Find ( chosenFoodId ) ;
116116 Debug . Assert ( foodEntity != null , nameof ( foodEntity ) + " != null" ) ;
117117 Debug . Assert ( ourNewEntity != null , nameof ( ourNewEntity ) + " != null" ) ;
118118 var toThisFood = ( Vector2 ) foodEntity . Position - ( Vector2 ) ourNewEntity . Position ;
@@ -130,9 +130,9 @@ public IEnumerator CreatePlayerAndTestDecay()
130130
131131 PlayerController . Local . SetTestInput ( UnityEngine . Vector2 . zero ) ;
132132 Debug . Assert ( circle != null , nameof ( circle ) + " != null" ) ;
133- var massStart = GameManager . Conn . Db . Entity . EntityId . Find ( circle . EntityId ) ! . Mass ;
133+ var massStart = GameManager . Conn . Db . Entity . EntityEntityIdIdxBtree . Find ( circle . EntityId ) ! . Mass ;
134134 yield return new WaitForSeconds ( 10 ) ;
135- var massEnd = GameManager . Conn . Db . Entity . EntityId . Find ( circle . EntityId ) ! . Mass ;
135+ var massEnd = GameManager . Conn . Db . Entity . EntityEntityIdIdxBtree . Find ( circle . EntityId ) ! . Mass ;
136136 Debug . Assert ( massEnd < massStart , "Mass should have decayed" ) ;
137137 }
138138
@@ -260,7 +260,7 @@ public IEnumerator ReconnectionViaReloadingScene()
260260 while ( ! playerCreated ) yield return null ;
261261
262262 Debug . Assert ( GameManager . LocalIdentity != default , "GameManager.localIdentity != default" ) ;
263- var player = GameManager . Conn . Db . Player . Identity . Find ( GameManager . LocalIdentity ) ;
263+ var player = GameManager . Conn . Db . Player . PlayerIdentityIdxBtree . Find ( GameManager . LocalIdentity ) ;
264264 Debug . Assert ( player != null , nameof ( player ) + " != null" ) ;
265265 var circle = GameManager . Conn . Db . Circle . Iter ( ) . FirstOrDefault ( a => a . PlayerId == player . PlayerId ) ;
266266
@@ -273,7 +273,7 @@ public IEnumerator ReconnectionViaReloadingScene()
273273 SceneManager . LoadScene ( "Scenes/Main" ) ;
274274
275275 while ( ! connected || ! subscribed ) yield return null ;
276- var newPlayer = GameManager . Conn . Db . Player . Identity . Find ( GameManager . LocalIdentity ) ;
276+ var newPlayer = GameManager . Conn . Db . Player . PlayerIdentityIdxBtree . Find ( GameManager . LocalIdentity ) ;
277277 Debug . Assert ( player . PlayerId == newPlayer . PlayerId , "PlayerIds should match!" ) ;
278278 var newCircle = GameManager . Conn . Db . Circle . Iter ( ) . FirstOrDefault ( a => a . PlayerId == newPlayer . PlayerId ) ;
279279 Debug . Assert ( circle . EntityId == newCircle . EntityId , "Circle EntityIds should match!" ) ;
0 commit comments