private void Awake() { GameKit.Init(new GameKitDemoFactory()); _coin = GameKit.Config.GetVirtualItemByID("coin"); _gem = GameKit.Config.GetVirtualItemByID("gem"); _primaryCharacterItem = GameKit.Config.GetVirtualItemByID("wuzheng") as LifeTimeItem; _items = new List <PurchasableItem>(); foreach (var item in GameKit.Config.VirtualItems) { if (item is PurchasableItem && !(item is UpgradeItem)) { _items.Add(item as PurchasableItem); } } if (!IsLaunched()) { FirstTimeLaunch(); } Market.Instance.StartProductListRequest((list) => { Debug.Log("Get product list succeeded"); }, () => { Debug.LogError("Get product list failed"); }); }
void Start() { match = GameObject.Find("MatchManager").GetComponent <MatchManager>(); gameState.isAlive = true; gk = GameKit.Instance; deathFlash = GameObject.Find("DeathFlash").GetComponent <DeathFlash>(); }
// Start is called before the first frame update void Start() { if (instance != null) { Destroy(gameObject); return; } instance = this; DontDestroyOnLoad(gameObject); }
// Start is called before the first frame update void Awake() { if (!instance) { instance = this; DontDestroyOnLoad(gameObject); } else if (instance != this) { Destroy(gameObject); } }