protected virtual void ProjDataInit(ref ProjectileData data)
 {
     Data.Clone(data);
     Data.TypeProjectile = (int)ProjectileType;
     m_LifeTime          = Data.LifeTime;
     //m_LifeTime = data.LifeTime;
 }
Beispiel #2
0
 protected override void Fire(Vector2 Pos)
 {
     for (int i = 0; i < Shots; i++)
     {
         Projectile P = Instantiate(Projectile);
         ProjectileData D = ProjectileData.Clone();
         D.Impulse += Random.Range(-Mathf.Min(D.Impulse / 2, ForceSpread), ForceSpread);
         P.Shoot(Holder, (Pos + Random.insideUnitCircle * Spread) - (Vector2)transform.position, D);
     }
 }