Tiny refactor
This commit is contained in:
@@ -58,15 +58,15 @@ deserialize_entity :: (scene: *Scene, path: string) -> *Entity {
|
||||
//
|
||||
new_block :: (scene: *Scene = null) -> *Block { _scene := scene;
|
||||
if _scene == null {
|
||||
_scene = current_scene; }
|
||||
_scene = engine.current_scene; }
|
||||
p, locator := find_and_occupy_empty_slot(*_scene.by_type._Block); p._locator = locator; register_entity(_scene, p); p.transform = create_identity_transform(); init_entity(p); return p; }
|
||||
new_character :: (scene: *Scene = null) -> *Character { _scene := scene;
|
||||
if _scene == null {
|
||||
_scene = current_scene; }
|
||||
_scene = engine.current_scene; }
|
||||
p, locator := find_and_occupy_empty_slot(*_scene.by_type._Character); p._locator = locator; register_entity(_scene, p); p.transform = create_identity_transform(); init_entity(p); return p; }
|
||||
new_item :: (scene: *Scene = null) -> *Item { _scene := scene;
|
||||
if _scene == null {
|
||||
_scene = current_scene; }
|
||||
_scene = engine.current_scene; }
|
||||
p, locator := find_and_occupy_empty_slot(*_scene.by_type._Item); p._locator = locator; register_entity(_scene, p); p.transform = create_identity_transform(); init_entity(p); return p; }
|
||||
|
||||
//
|
||||
|
||||
Reference in New Issue
Block a user