예제 #1
0
 protected override void Awake()
 {
     ProcessingEntities.Create(this);
     #if ACTORS_DEBUG
     var name = gameObject.name.Split('(')[0];
     gameObject.name = name + "_" + id;
     #endif
     base.Awake();
     AddGo();
 }
예제 #2
0
        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);
            }
        }
예제 #3
0
 public EntityComposer(int components = 1)
 {
     storages = new Storage[components];
     id       = ProcessingEntities.Create();
     length   = 0;
 }
예제 #4
0
 protected override void Awake()
 {
     ProcessingEntities.AddEntity(this);
     base.Awake();
 }