Exemplo n.º 1
0
        public static BulletBase Create(BulletAsset BulletAsset, WeaponRanged weaponRanged)
        {
            BulletBase BulletBase;

            // 弾の種類を判断
            switch (BulletAsset.BulletType)
            {
            // 弾
            case BulletType.Projectile:
                BulletBase = new BulletProjectile(BulletAsset, weaponRanged);
                Debug.Log("Bulletrojectile");
                break;

            // レーザー
            case BulletType.Lazer:
                BulletBase = new BulletProjectileLaser(BulletAsset, weaponRanged);
                Debug.Log("BulletLaser");
                break;

            default:
                BulletBase = null;
                break;
            }

            BulletBase.weaponRanged = weaponRanged;

            return(BulletBase);
        }
Exemplo n.º 2
0
 public BulletProjectileLaser(BulletAsset asset, WeaponRanged weaponRanged) : base(asset, weaponRanged)
 {
 }
Exemplo n.º 3
0
 protected BulletBase(BulletAsset asset, WeaponRanged weaponRanged)
 {
     BulletPara   = asset.BulletParameter;
     BulletPrefab = asset.BulletPrefab;
     LaserPrefab  = asset.LaserPrefab;
 }