Just breaking stuff

This commit is contained in:
2023-03-14 22:27:46 -07:00
parent 795e69237c
commit 09cb20271b
156 changed files with 4218 additions and 4389 deletions

View File

@ -0,0 +1,25 @@
// Copyright (c) 2023 Dominic Masters
//
// This software is released under the MIT License.
// https://opensource.org/licenses/MIT
#include "TicTacToeScoreboard.hpp"
using namespace Dawn;
TicTacToeScoreboard::TicTacToeScoreboard(SceneItem *item) :
SceneItemComponent(item)
{
}
void TicTacToeScoreboard::onStart() {
auto game = getScene()->findComponent<TicTacToeGame>();
assertNotNull(game);
useEffect([&]{
auto label = item->getComponent<UILabel>();
assertNotNull(label);
label->text = std::to_string(game->scoreNought) + " - " + std::to_string(game->scoreCross);
}, { &game->scoreCross, &game->scoreNought })();
}