Beispiel #1
0
    private DanmakuBullet CreateBullet(BulletModel bulletModel)
    {
        // Core GameKit Integration

        Transform     bulletTransform = PoolBoss.Spawn(ProjectilePrefab.transform, new Vector3(0, 0, 0), new Quaternion(0, 0, 0, 0), PoolBoss.Instance.transform);
        DanmakuBullet bullet          = bulletTransform.GetComponentInChildren <DanmakuBullet>();

        return(bullet);
    }
    private DanmakuBullet CreateBullet(BulletModel bulletModel)
    {
        // put your construction logic here...
        //PoolBoss.Spawn("playerShot", new Vector3(0, 0, 0), new Quaternion(0, 0, 0, 0));
        


        BulletLibrary lib = context.bulletLibrary;
        DanmakuBullet prefab = lib.GetBulletPrefab(bulletModel.Id);
        DanmakuBullet bullet = (Instantiate(prefab) as DanmakuBullet);

        return bullet;
    }
Beispiel #3
0
 private void DestroyBullet(DanmakuBullet bullet)
 {
     //Core GameKit Integration
     PoolBoss.Despawn(bullet.transform);
 }
 private void DestroyBullet(DanmakuBullet bullet)
 {
     // put your destruction logic here...
     Destroy(bullet.gameObject);
 }