Ejemplo n.º 1
0
    // Called when the node enters the scene tree for the first time.
    public override void _Ready()
    {
        Kingdom      = GetNode <Kingdom>("Kingdom");
        Battle       = GetNode <Battle>("Battle");
        FollowCam    = (Camera2D)GetTree().GetNodesInGroup("camera")[0];
        BattleCam    = GetNode <Camera2D>("BattleCam");
        KingdomAudio = GetNode <AudioStreamPlayer>("KingdomAudio");
        BattleAudio  = GetNode <AudioStreamPlayer>("BattleAudio");

        Kingdom.Connect("BattleInitiated", this, nameof(OnBattleInitiated));
        Battle.Connect("Retreated", this, nameof(OnRetreated));
    }