(ScriptablePrefabs a_prefabBindings)
| 24 | private Dictionary<int, System.Type> m_idToComponentType; |
| 25 | |
| 26 | public World(ScriptablePrefabs a_prefabBindings) { |
| 27 | m_cbSpawnPrefab = SpawnPrefab; |
| 28 | m_cbSpawnPrefabWithTransform = SpawnPrefabWithTransform; |
| 29 | m_cbSpawnPrefabWithTransformAndParent = SpawnPrefabWithTransformAndParent; |
| 30 | m_cbDespawnGameObject = DespawnGameObject; |
| 31 | m_cbUploadComponentTransform = UploadComponentTransform; |
| 32 | m_cbUploadComponentTextmeshui = UploadComponentTextmeshui; |
| 33 | m_cbKeyJustPressed = InputKeyJustPressed; |
| 34 | m_cbKeyJustReleased = InputKeyJustReleased; |
| 35 | m_cbKeyHeld = InputKeyHeld; |
| 36 | m_cbEntityTrackCollision = EntityTrackCollision; |
| 37 | world_bind_spawn_prefab_callback(m_cbSpawnPrefab); |
| 38 | world_bind_spawn_prefab_with_transform_callback(m_cbSpawnPrefabWithTransform); |
| 39 | world_bind_spawn_prefab_with_transform_and_parent_callback(m_cbSpawnPrefabWithTransformAndParent); |
| 40 | world_bind_despawn_gameobject_callback(m_cbDespawnGameObject); |
| 41 | world_bind_upload_component_transform_callback(m_cbUploadComponentTransform); |
| 42 | world_bind_upload_component_textmeshui_callback(m_cbUploadComponentTextmeshui); |
| 43 | world_bind_input_key_just_pressed(m_cbKeyJustPressed); |
| 44 | world_bind_input_key_just_released(m_cbKeyJustReleased); |
| 45 | world_bind_input_key_held(m_cbKeyHeld); |
| 46 | world_bind_entity_track_collision(m_cbEntityTrackCollision); |
| 47 | m_prefabs = new Dictionary<string, UnityEngine.GameObject>(); |
| 48 | m_gameObjects = new Dictionary<UInt64, RustyGameObject>(); |
| 49 | for(int i = 0; i < a_prefabBindings.PrefabBindings.Length; i++) { |
| 50 | var binding = a_prefabBindings.PrefabBindings[i]; |
| 51 | m_prefabs.Add(binding.RustName, binding.Prefab); |
| 52 | } |
| 53 | } |
| 54 | |
| 55 | public bool InputKeyJustPressed(UnityEngine.KeyCode a_key) { |
| 56 | return UnityEngine.Input.GetKeyDown(a_key); |
nothing calls this directly
no test coverage detected