Exemplo n.º 1
0
        public async Task ReturnToBaseAsync()
        {
            attackStarted.Raise();

            var baseDescription = await playerBaseProvider.GetPlayerBase(playerData.Id, false);

            await Scenes.UnloadScenes();

            await Scenes.LoadPlayerScene();

            currentGameState.Value = defaultState;

            await baseBuilder.BuildBase(baseDescription);

            attackFinished.Raise();
        }
Exemplo n.º 2
0
        public async Task AttackAsync()
        {
            attackStarted.Raise();

            var targetId = await targetProvider.GetAttackTargetId();

            var baseDescription = await enemyBaseProvider.GetPlayerBase(targetId, true);

            await Scenes.UnloadScenes();

            await Scenes.LoadAttackScene();

            currentGameState.Value = attackState;

            await baseBuilder.BuildBase(baseDescription);

            attackFinished.Raise();
        }