public override void _Ready() { base._Ready(); titleLabel = GetNode <Label>(titleLabelNodePath); messageLabel = GetNode <Label>(messageLabelNodePath); continueButton = GetNode <Button>(continueButtonNodePath); continueButton.Connect("pressed", this, nameof(OnContinueButtonPressed)); soundEngineNode = NodeGetter.GetFirstNodeInGroup <SoundEngineNode>(GetTree(), GameConstants.SoundEngineGroup, true); if (pointsLimitTitleText.EndsWith("won")) { soundEngineNode.PlaySfx(winningSound, this); } else { soundEngineNode.PlaySfx(loosingSound, this); } var gameState = NodeGetter.GetFirstNodeInGroup <GameState>(GetTree(), GameConstants.GameStateGroup, true); if (gameState.isPointLimitEnabled) { titleLabel.SetText(Tr(pointsLimitTitleText)); messageLabel.SetText(Tr(pointsLimitMessageText)); } else { titleLabel.SetText(Tr(worldLimitTitleText)); messageLabel.SetText(Tr(worldLimitMessageText)); } }
public override void _Ready() { base._Ready(); entityMovement = GetNode <EntityMovement>(entityMovementNodePath); gameState = NodeGetter.GetFirstNodeInGroup <GameState>(GetTree(), GameConstants.GameStateGroup, true); pathfindingTileMap = NodeGetter.GetFirstNodeInGroup <PathfindingTileMap>(GetTree(), GameConstants.PathfindingTileMapGroup, true); soundEngineNode = NodeGetter.GetFirstNodeInGroup <SoundEngineNode>(GetTree(), GameConstants.SoundEngineGroup, true); }
public override void _Ready() { base._Ready(); timer = new Timer { OneShot = true }; AddChild(timer); soundEngineNode = NodeGetter.GetFirstNodeInGroup <SoundEngineNode>(GetTree(), GameConstants.SoundEngineGroup, true); }
public override void _Ready() { base._Ready(); GetNode <Eventing>(Eventing.EventingNodePath).EmitSignal(nameof(Eventing.LevelSetupFinished)); gameUi = GetNode <Control>(gameUiNodePath); pauseMenuContainer = GetNode <Control>(pauseMenuContainerNodePath); soundEngineNode = NodeGetter.GetFirstNodeInGroup <SoundEngineNode>(GetTree(), GameConstants.SoundEngineGroup, true); soundEngineNode.PlayMusic("rainforest-01"); }
public override void _Ready() { base._Ready(); startWithPointLimitGameButton = GetNode <Button>(startGameWithPointLimitButtonNodePath); startWithPointLimitGameButton.Connect("pressed", this, nameof(OnStartWithPointLimitPressed)); startGameButton = GetNode <Button>(startGameButtonNodePath); startGameButton.Connect("pressed", this, nameof(StartGame)); quitGameButton = GetNode <Button>(quitGameButtonNodePath); quitGameButton.Connect("pressed", this, nameof(OnQuitPressed)); soundEngineNode = NodeGetter.GetFirstNodeInGroup <SoundEngineNode>(GetTree(), GameConstants.SoundEngineGroup, true); soundEngineNode.PlayMusic("intro_03"); }
public override void _Ready() { base._Ready(); hoverIndicator = GetNode <HoverIndicator>(hoverIndicatorNodePath); treeActionRadius = GetNode <TreeActionRadius>(actionRadiusNodePath); stateMachine = GetNode <TreeStateMachine>(stateMachineNodePath); treeState = GetNode <TreeState>(treeStateNodePath); interactionPopup = interactionPopupPackedScene.Instance() as InteractionPopup; uiContainer = NodeGetter.GetFirstNodeInGroup <Control>(GetTree(), GameConstants.UiContainerGroup, true); soundEngineNode = NodeGetter.GetFirstNodeInGroup <SoundEngineNode>(GetTree(), GameConstants.SoundEngineGroup, true); uiContainer?.AddChild(interactionPopup); interactionPopup.Init(this); Connect("tree_exiting", this, nameof(OnTreeExiting)); }
public override void _Ready() { base._Ready(); gameState = NodeGetter.GetFirstNodeInGroup <GameState>(GetTree(), GameConstants.GameStateGroup, true); tmpTweetContainer = GetNode <Control>(tmpTweetContainerNodePath); playerEnergy = GetNode <ProgressBar>(playerEnergyNodePath); demonEnergy = GetNode <ProgressBar>(demonEnergyNodePath); tweetUpdater = GetNode <TweetUpdater>(tweetUpdaterNodePath); tweetTimer = new Timer { OneShot = true }; tutorialTweetTimer = new Timer { OneShot = true }; AddChild(tweetTimer); AddChild(tutorialTweetTimer); AddChild(buffAnimationTween); tweetUpdater.GetTweets(UpdateTweets); tutorialTweets.AddRange(tweetUpdater.GetTutorialTweets().statuses); soundEngineNode = NodeGetter.GetFirstNodeInGroup <SoundEngineNode>(GetTree(), GameConstants.SoundEngineGroup, true); }
public override void _Ready() { base._Ready(); entityMovement = GetNode <EntityMovement>(entityMovementNodePath); soundEngineNode = NodeGetter.GetFirstNodeInGroup <SoundEngineNode>(GetTree(), GameConstants.SoundEngineGroup, true); }