public StartDeckCardDrawingSystem(Contexts contexts, DeckSetting setting) : base(contexts) { _gameContext = contexts.game; _cardContext = contexts.card; _setting = setting; _eventContext = contexts.gameEvent; }
public void Init() { var setting = new DeckSetting() { StartTurnDrawCount = TEST_DRAW_COUNT }; _systems.Add(new StartTurnDrawSystem(_contexts, setting)); }
public static void InitEnemyDeck(GameMode mode) { if (mode == GameMode.Single) { DeckSetting.SetEnemyDeckOfSingleMode(UserData.SingleRound); } else if (mode == GameMode.Challenge) { DeckSetting.SetEnemyDeckOfChallengeMode(UserData.ChallengeRound); } }
private void CreateDeckCardSystems(Contexts contexts, DeckSetting setting, GameUI ui, bool isServer) { if (isServer) { Add(new StartDeckCardDrawingSystem(contexts, setting)); } Add(new StartTurnDrawSystem(contexts, setting)); Add(new PlayerDeckCreatingSystem(contexts, ui.DeckFactory)); Add(new PlayerDeckRenderingSystem(contexts)); Add(new ShareDeckRenderingSystem(contexts, ui.DeckFactory.AllContainers[0])); Add(new LocalPlayerDeckRenderingSystem(contexts)); Add(new LocalDeckCardStatusRenderingSystem(contexts, ui.LocalPlayerStatus)); Add(new TargetDeckCardStatusRendingSystem(contexts, ui.TargetPlayerStatus)); }
private IEnumerator MakeEnemyDeck() { while (true) { if (MultiBattleDataManager.enemyDeckData.isReceived) { Preparation.InitMultiEnemySummoner(MultiBattleDataManager.enemyDeckData.enemyLevel, null); for (int index = 0; index < Setting.DeckCount; index++) { DeckSetting.SetMultiEnemyDeck(MultiBattleDataManager.enemyDeckData.summonNumber[index], MultiBattleDataManager.enemyDeckData.summonLevel[index]); } break; } yield return(new WaitForSeconds(0.1f)); } StartCoroutine(StartBattle()); }
public void CreatedEntityCount() { var deck = new DeckSetting(); var deckData = ScriptableObject.CreateInstance <DeckCardData>(); deckData.Type = DeckCard.Move; deckData.CreateCount = 2; deck.DataList = new List <DeckCardData> { deckData }; var system = new DeckCardCreatingSystem(_contexts, deck); system.Initialize(); var cards = _contexts.card.GetEntities(CardMatcher.DeckCard); Assert.AreEqual(2, cards.Length); }
public StartTurnDrawSystem(Contexts contexts, DeckSetting setting) : base(contexts.game) { _cardContext = contexts.card; _setting = setting; _eventContext = contexts.gameEvent; }
public static void InitMyDeck() { DeckSetting.SetMyDeck(); }
public DeckCardDataLoadingSystem(Contexts contexts, DeckSetting setting) : base(contexts.card) { _setting = setting; }
public DeckCardCreatingSystem(Contexts contexts, DeckSetting setting) { _context = contexts.card; _setting = setting; }
public void Init() { _setting = TestHelper.GetGameSetting().CardSetting.DeckSetting; }