// Start is called before the first frame update IEnumerator Start() { GameMgr.Create(); GameMgr.Instance.Debug = Debug; if (!Debug) { yield return(new WaitForSeconds(2)); } GameMgr.Instance.EnterState(GameMgr.StateType.MainMenu); }
// Start is called before the first frame update void Start() { var gMgr = GameMgr.Create(); var card = new Card(); card.View = "Prefabs/Card/Test"; var obj = GameMgr.Instance.CardPool.Spawn(); var v = obj.GetComponent <CardView>(); v.Init(card); }
private void OnLoadScene(LevelLoader.Scene sc) { if (sc == LevelLoader.Scene.Battle) { var gMgr = GameMgr.Create(); var player = gMgr.DB.Find <ActorRecord>(_actorRecChecker.SetId(1).Check); var deck1 = gMgr.DB.Find <DeckRecord>(_deckRecChecker.SetId(1).Check); var enemy = gMgr.DB.Find <ActorRecord>(_actorRecChecker.SetId(2).Check); var deck2 = gMgr.DB.Find <DeckRecord>(_deckRecChecker.SetId(2).Check); GameMgr.Instance.StartCoroutine(InitScene(player, deck1.GetDeck(), enemy, deck2.GetDeck())); } }