Exemple #1
0
        public override void _Ready()
        {
            _body       = GetNode <KinematicWrapper>("body");
            _bodyOffset = _body.GlobalTransform.origin - GlobalTransform.origin;
            //ZqfGodotUtils.AddChildNodeToList(this, _turrets, "body/turret_a");
            //ZqfGodotUtils.AddChildNodeToList(this, _turrets, "body/turret_b");
            ZqfGodotUtils.GetAllChildrenOfType(_body, _turrets);
            int len = _turrets.Count;

            for (int i = 0; i < len; ++i)
            {
                EntTurret tur = _turrets[i];
                tur.SetDeathCallback(OnTurretDied);
            }
        }
Exemple #2
0
 public void OnTurretDied(EntTurret turret)
 {
     Console.WriteLine($"Boss turret {turret.Name} died");
 }