protected override void Awake() { ProcessingEntities.Create(this); #if ACTORS_DEBUG var name = gameObject.name.Split('(')[0]; gameObject.name = name + "_" + id; #endif base.Awake(); AddGo(); }
public void Shoot(int speed, Vector3 position, Quaternion rotation) { for (var i = 0; i < 1; i++) { var obj = this.Populate(Pool.Projectiles, prefab_bullet, position, rotation); var entity = ProcessingEntities.AddEntity(); var dataBullet = new DataBullet(); dataBullet.speed = speed; dataBullet.tr = obj; Storage <DataBullet> .Instance.AddVirtual(dataBullet, entity); } }
public EntityComposer(int components = 1) { storages = new Storage[components]; id = ProcessingEntities.Create(); length = 0; }
protected override void Awake() { ProcessingEntities.AddEntity(this); base.Awake(); }