protected override void Create(EntityObject entity) { m_entity = entity as ShipBase; m_entityPosition = m_entity.Position(); this.transform.localPosition = m_entityPosition; Debug.Log("Create:" + m_entity); weapon = EntityFactory.InstanceEntity <WeaponBase>(); weapon.Create(weaponRoot); }
private void Update() { if (Input.GetKeyDown(KeyCode.Alpha1)) { ship = EntityFactory.InstanceEntity <ShipBase>(); ship.Create(new Vector3(3, 3, 3)); } if (Input.GetKeyDown(KeyCode.Alpha2)) { EntityFactory.ReleaseEntity(ship); } if (Input.GetKeyDown(KeyCode.Alpha3)) { EntityFactory.ClearReleasedObjects(); } }
protected override void Release() { m_entity = null; }