Using native class where appropriate
This commit is contained in:
parent
ce5454d509
commit
9ac9b2cf6c
|
@ -11,7 +11,7 @@
|
|||
if(e.Unpack(out EcsWorld world, out int id) == false)
|
||||
throw new Exception("No entity found");
|
||||
|
||||
ref var cmp = ref world.GetPool<{{o.name}}>().Ensure(id);
|
||||
ref var cmp = ref world.GetPool<{{token_or(o, 'bhl_native_class', o.name)}}>().Ensure(id);
|
||||
|
||||
return null;
|
||||
}
|
||||
|
@ -34,7 +34,7 @@
|
|||
if(e.Unpack(out EcsWorld world, out int id) == false)
|
||||
return null;
|
||||
|
||||
world.GetPool<{{o.name}}>().Del(id);
|
||||
world.GetPool<{{token_or(o, 'bhl_native_class', o.name)}}>().Del(id);
|
||||
|
||||
return null;
|
||||
}
|
||||
|
@ -59,7 +59,7 @@
|
|||
if(e.Unpack(out EcsWorld world, out int id) == false)
|
||||
dv.SetBool(false);
|
||||
else
|
||||
dv.SetBool(world.GetPool<{{o.name}}>().Has(id));
|
||||
dv.SetBool(world.GetPool<{{token_or(o, 'bhl_native_class', o.name)}}>().Has(id));
|
||||
stack.Push(dv);
|
||||
|
||||
return null;
|
||||
|
@ -104,7 +104,7 @@
|
|||
if(e.Unpack(out EcsWorld world, out int id) == false)
|
||||
throw new Exception("No entity found");
|
||||
|
||||
ref var cmp = ref world.GetPool<{{o.name}}>().Ensure(id);
|
||||
ref var cmp = ref world.GetPool<{{token_or(o, 'bhl_native_class', o.name)}}>().Ensure(id);
|
||||
var v = cmp.{{f.name}};
|
||||
|
||||
{%- if token_or(f, 'bhl_set', 1) != 0 ~%}
|
||||
|
@ -148,7 +148,7 @@
|
|||
if(e.Unpack(out EcsWorld world, out int id) == false)
|
||||
throw new Exception("No entity found");
|
||||
|
||||
ref var cmp = ref world.GetPool<{{o.name}}>().Ensure(id);
|
||||
ref var cmp = ref world.GetPool<{{token_or(o, 'bhl_native_class', o.name)}}>().Ensure(id);
|
||||
|
||||
{%~ if m.returntype %}
|
||||
var return_val =
|
||||
|
|
Loading…
Reference in New Issue