Ejemplo n.º 1
0
    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");
        });
    }
Ejemplo n.º 2
0
 void Start()
 {
     match             = GameObject.Find("MatchManager").GetComponent <MatchManager>();
     gameState.isAlive = true;
     gk         = GameKit.Instance;
     deathFlash = GameObject.Find("DeathFlash").GetComponent <DeathFlash>();
 }
Ejemplo n.º 3
0
    // Start is called before the first frame update
    void Start()
    {
        if (instance != null)
        {
            Destroy(gameObject);
            return;
        }

        instance = this;
        DontDestroyOnLoad(gameObject);
    }
Ejemplo n.º 4
0
 // Start is called before the first frame update
 void Awake()
 {
     if (!instance)
     {
         instance = this;
         DontDestroyOnLoad(gameObject);
     }
     else if (instance != this)
     {
         Destroy(gameObject);
     }
 }