public override void OnInit()
    {
        base.OnInit();
        DamageDealer dd = GetComponentInChildren <DamageDealer>();

        GetComponentInChildren <DamageTaker>().Init(OnTakeDamage);
        dd.Init(OnGiveDamage);
        dd.SetDamage(999);
        dd.AddTargetLayer(8);
        dd.AddTargetLayer(10);
    }
    public override void OnStart()
    {
        base.OnStart();
        animator = GetComponent <Animator>();
        DamageDealer dd = GetComponentInChildren <DamageDealer>();

        GetComponentInChildren <DamageTaker>().Init(OnTakeDamage);
        dd.Init(null);
        dd.SetDamage(999);
        dd.AddTargetLayer(8);
        dd.AddTargetLayer(10);
    }
 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);
 }