Esempio n. 1
0
 public virtual Missile InitMissile(Vector3 position, int[] layers, string[] tags, AttackingUnitI owner)
 {
     isActive           = true;
     dieTimer           = 2.5f;
     transform.position = position;
     dDealer            = GetComponentInChildren <DamageDealer>();
     foreach (var layer in layers)
     {
         dDealer.AddTargetLayer(layer);
     }
     foreach (var tag in tags)
     {
         dDealer.AddTargetTag(tag);
     }
     this.owner = owner;
     dDealer.SetDamage(1);
     dDealer.enabled = false;
     return(this);
 }