浏览代码

Fix entityId indexing

Alex Peterson 2 年之前
父节点
当前提交
ddbc763505
共有 1 个文件被更改,包括 2 次插入2 次删除
  1. 2 2
      Project/Scripts/DynamicAppleSpawner.lua

+ 2 - 2
Project/Scripts/DynamicAppleSpawner.lua

@@ -72,7 +72,7 @@ function DynamicAppleSpawner:AddFollowTarget(entityId)
         self.followTargets = {}
         self.followTargets = {}
     end
     end
 
 
-    self.followTargets[entityId] = {
+    self.followTargets[tostring(entityId)] = {
         position = Vector3(0, 0, 0),
         position = Vector3(0, 0, 0),
         update = false,
         update = false,
         handler = nil,
         handler = nil,
@@ -90,7 +90,7 @@ function DynamicAppleSpawner:AddFollowTarget(entityId)
         end
         end
     }
     }
 
 
-    self.followTargets[entityId].handler = TransformNotificationBus.Connect(self.followTargets[entityId], entityId)
+    self.followTargets[tostring(entityId)].handler = TransformNotificationBus.Connect(self.followTargets[tostring(entityId)], entityId)
 
 
     self.numPrefabsToSpawn = self.numPrefabsToSpawn + self.Properties.NumPrefabsToSpawn
     self.numPrefabsToSpawn = self.numPrefabsToSpawn + self.Properties.NumPrefabsToSpawn