Inheritance: MonoBehaviour
Example #1
0
    // Use this for initialization
    void Start()
    {
        Image img = this.transform.GetChild(0).GetComponent<Image> ();
        img.sprite = GameConstants.getSprite (type);

        shopManager = GameObject.FindGameObjectWithTag ("Shop").GetComponent<ShopManager> ();
    }
Example #2
0
    public override void Activate()
    {
        Owner.ThoughtManager.SetDialog("(SHOPKEEPING | )");
        CurrentStatus = GoalStatus.Active;
        RemoveAllSubgoals();

        shopManager = LocationManager.Instance.GetLocationMemory("Shop").GetComponent<ShopManager>();

        AddSubgoal(new Goal_ManageShop(Owner, shopManager));
        AddSubgoal(new Goal_MoveToPosition(Owner, shopManager.cTransform));
    }
Example #3
0
    // Use this for spawn this instance
    void Awake()
    {
        if (instance == null)
            instance = this;
        else
            Destroy(gameObject);

        _goldCounter.text = "" + _gold;
        setSpellsPrices();
        prices[3].text = "" +_goldMana;
        prices[4].text = "" + _goldRepair;
    }
Example #4
0
    void Awake()
    {
        if (Instance != null)
        {
            Destroy(gameObject);
            return;
        }

        Instance = this;

        ShopMan = GetComponent<ShopManager>();
    }
Example #5
0
 public void Setup()
 {
     PlayerPrefs.DeleteAll();
     am = MonoBehaviour.Instantiate(TestConstants.GetResource("Managers/Audio Manager")).GetComponent <AudioManager>();
     sm = MonoBehaviour.Instantiate(TestConstants.GetResource("Managers/Shop Manager")).GetComponent <ShopManager>();
 }
Example #6
0
    private void Awake()
    {
        if (Instance != null && Instance != this)
        {
            Destroy(this.gameObject);
            return;
        }

        Instance = this;
        this.isFirstTime = true;

        DontDestroyOnLoad(this.gameObject);
    }
Example #7
0
 private void destroyShield()
 {
     ShopManager.getInstance().destroyItem(ShopList.shield);
 }
Example #8
0
	// Use this for initialization
	void Start () {
		instance = this;
		popUp.SetActive(false);
	}
Example #9
0
 private void Start()
 {
     unitShop = GameObject.Find("UnitShop").GetComponent <ShopManager>();
     action   = new AIAction(this);
     priority = new AIPriority(this);
 }
Example #10
0
 void Start()
 {
     inventoryManagerScript = GameObject.Find("InventoryManager").GetComponent<InventoryManager>();
     shopManagerScript = inventoryManagerScript.GetComponent<ShopManager>();
     equipmentManagerScript = inventoryManagerScript.GetComponent<EquipmentManager>();
 }
Example #11
0
 public Goal_ManageShop(CognitiveAgent owner, ShopManager shopManager)
     : base(owner)
 {
     this.shopManager = shopManager;
 }
Example #12
0
 public OrderHistoryController(ShopManager manager)
 {
     //Logger = logger;
     this.manager = manager;
 }
Example #13
0
 void Start()
 {
     Instance = this;
     loadNameButton();
     loadItemShop();
 }
Example #14
0
 private void Start()
 {
     player = GameObject.FindGameObjectWithTag("GameManager").GetComponent <PlayerDataManager>();
     shop   = GameObject.FindGameObjectWithTag("ShopManager").GetComponent <ShopManager>();
 }
Example #15
0
 void OnMouseDown()
 {
     ShopManager.PurchaseSelectedItem();
 }
Example #16
0
	// Use this for initialization
	void Start () {
		shop = transform.parent.parent.gameObject.GetComponent<ShopManager>();
		textBox = gameObject.GetComponent<Text>();
	}
Example #17
0
    void Start()
    {
        gameManager = GetComponent<GameManager> ();
        stateManager = GetComponent<StateManager>();
        shopManager = GetComponent<ShopManager> ();
        gameStats = GetComponent<GameStats> ();
        //canvases:
        VloadCanvas = GameObject.Find ("VloadCanvas").GetComponent<Canvas> ();
        VpreGameCanvas = GameObject.Find ("VpreGameCanvas").GetComponent<Canvas> ();
        VpostGameCanvas = GameObject.Find ("VpostGameCanvas").GetComponent<Canvas> ();
        HloadCanvas = GameObject.Find ("HloadCanvas").GetComponent<Canvas> ();
        HpreGameCanvas = GameObject.Find ("HpreGameCanvas").GetComponent<Canvas> ();
        HpostGameCanvas = GameObject.Find ("HpostGameCanvas").GetComponent<Canvas> ();

        VtouchHand01 = VpreGameCanvas.transform.FindChild("TouchHand01").GetComponent<Image> ();
        HtouchHand01 = HpreGameCanvas.transform.FindChild("TouchHand01").GetComponent<Image> ();
        VtouchHand02 = VpreGameCanvas.transform.FindChild("TouchHand02").GetComponent<Image> ();
        HtouchHand02 = HpreGameCanvas.transform.FindChild("TouchHand02").GetComponent<Image> ();
        VtouchHand01.enabled = false;
        HtouchHand01.enabled = false;
        currentMenu = MenuTypes.PreGame;
        //---
        if(Input.deviceOrientation == DeviceOrientation.Portrait){
            SwitchOrientation(CanvasTypes.Port, true);
        }
        if (Input.deviceOrientation == DeviceOrientation.LandscapeRight) {
            SwitchOrientation(CanvasTypes.Land, true);
        }
    }
Example #18
0
    public override void Activate()
    {
        AddToThoughtBubble("Buying Item");
        CurrentStatus = GoalStatus.Active;
        RemoveAllSubgoals();

        shopManager = LocationManager.Instance.GetLocationMemory("Shop").GetComponent<ShopManager>();

        AddSubgoal(new Goal_BuyItem(Owner, shopManager, itemUID));
        AddSubgoal(new Goal_MoveToPosition(Owner, shopManager.eTransform));
    }
Example #19
0
    protected override void Awake()
    {
        base.Awake();

        instance = this;
    }
Example #20
0
    IEnumerator _LoadLocalScenes()
    {
        AsyncOperation async;
        BundleManager  bundleM = BundleManager.instance;

        for (int i = 2; i < SceneManager.sceneCountInBuildSettings; i++)
        {
            bundleM.txtStatusBar.text = "Memuat permainan " + Mathf.RoundToInt(((float)i / (float)SceneManager.sceneCountInBuildSettings) * 100).ToString() + "%";
            async = SceneManager.LoadSceneAsync(i, LoadSceneMode.Additive);
            while (!async.isDone)
            {
                yield return(_WFSUtility.wef);
            }
        }

        yield return(_WFSUtility.wef);

        homeM = HomeManager.instance;
        yield return(_WFSUtility.wef);

        profileM = ProfileManager.instance;
        yield return(_WFSUtility.wef);

        verifyM = VerifyManager.instance;
        yield return(_WFSUtility.wef);

        vipM = VipManager.instance;
        yield return(_WFSUtility.wef);

        pokerM = PokerManager.instance;
        PhotonNetwork.ConnectUsingSettings("v1.0");
        yield return(_WFSUtility.wef);

        beginM = BeginManager.instance;
        yield return(_WFSUtility.wef);

        loginM = LoginManager.instance;
        yield return(_WFSUtility.wef);

        shopM = ShopManager.instance;
        yield return(_WFSUtility.wef);

        proomM = PokerRoomManager.instance;
        yield return(_WFSUtility.wef);

        slotoM = FindObjectOfType <SlotoManagerScript> ();
        yield return(_WFSUtility.wef);

        sicboM = SicboManager.instance;
        yield return(_WFSUtility.wef);

        settingsM = SettingsManager.instance;
        yield return(_WFSUtility.wef);

        heroM = HeroManager.instance;
        yield return(_WFSUtility.wef);

        leaderboardM = LeaderboardManager.instance;
        yield return(_WFSUtility.wef);

        friendM = FriendManager.instance;
        yield return(_WFSUtility.wef);

        inboxM = InboxManager.instance;
        yield return(_WFSUtility.wef);

        transferM = TransferManager.instance;
        yield return(_WFSUtility.wef);

        redeemM = RedeemManager.instance;
        yield return(_WFSUtility.wef);

        dailyRewardsM = DailyRewardsManager.instance;
        yield return(_WFSUtility.wef);

        weeklyRewardsM = WeeklyRewardsManager.instance;
        yield return(_WFSUtility.wef);

        moneySlotM = MoneySlotManager.instance;
        yield return(_WFSUtility.wef);

        dailyQuestM = DailyQuestManager.instance;
        yield return(_WFSUtility.wef);

        watchAdsM = WatchAdsManager.instance;


        yield return(_WFSUtility.wef);

        SetActiveScene(SceneType.SLOTO, false);
        yield return(_WFSUtility.wef);

        int    playerID = PlayerPrefs.GetInt(PrefEnum.PLAYER_ID.ToString(), 0);
        string token    = PlayerPrefs.GetString(PrefEnum.TOKEN.ToString(), string.Empty);

        if (playerID != 0 && token != string.Empty)
        {
            ApiManager.instance.GetHome();
        }
        else
        {
            SetActiveScene(SceneType.LOGIN, true);
        }
        yield return(_WFSUtility.wef);

        BundleManager.instance.bLoadingScenes = true;
        yield return(_WFSUtility.wef);

        SceneManager.UnloadSceneAsync("SeSplash");
    }
Example #21
0
    void Start()
    {
        foreach (Transform child in transform)
        {
            if (child.name == "jobs")
            {
                foreach (Transform info in child)
                {
                    switch (info.name)
                    {
                    case "astronomy":
                        astronomy = info.GetComponent <Hire>();
                        break;

                    case "biology":
                        biology = info.GetComponent <Hire>();
                        break;

                    case "construction":
                        construction = info.GetComponent <Hire>();
                        break;

                    case "geography":
                        geography = info.GetComponent <Hire>();
                        break;

                    case "journalism":
                        journalism = info.GetComponent <Hire>();
                        break;

                    case "medicine":
                        medicine = info.GetComponent <Hire>();
                        break;
                    }
                }
            }
            else if (child.name == "info")
            {
                foreach (Transform job in child)
                {
                    switch (job.name)
                    {
                    case "boat":
                        boat = job.GetChild(2).GetComponent <Text>();
                        break;

                    case "weight":
                        weight = job.GetChild(2).GetComponent <Text>();
                        break;

                    case "food":
                        food = job.GetChild(2).GetComponent <Text>();
                        break;

                    case "fuel":
                        fuel = job.GetChild(2).GetComponent <Text>();
                        break;

                    case "price":
                        price = job.GetChild(2).GetComponent <Text>();
                        break;
                    }
                }
            }
            else if (child.name == "shop")
            {
                shop = child.GetComponent <ShopManager>();
            }
        }
    }
Example #22
0
        public ApiMessage CreateShopExpress()
        {
            ApiMessage message = new ApiMessage()
            {
                Status = "ok"
            };
            HttpContextBase context     = (HttpContextBase)Request.Properties["MS_HttpContext"];
            HttpRequestBase request     = context.Request;
            string          user_id     = User.Identity.Name;
            UserManager     userMgr     = new UserManager(int.Parse(user_id), null);
            BUser           user        = userMgr.CurrentUser;
            ShopManager     shopManager = new ShopManager(userMgr.CurrentUser, userMgr.Shop, userMgr.CurrentUserPermission, userMgr);

            string jsonStr = request["express"];

            jsonStr = HttpUtility.UrlDecode(jsonStr);

            JObject      json       = JObject.Parse(jsonStr);
            int          express_id = (int)json["id"];
            int          isDefault  = (int)json["isdefault"];
            BShopExpress express    = new BShopExpress()
            {
                ID = express_id
            };

            if (isDefault == 1)
            {
                express.IsDefault = true;
            }
            else
            {
                express.IsDefault = false;
            }
            JArray fees = (JArray)json["fees"];

            if (fees.Count > 0)
            {
                express.Fees = new List <BExpressFee>();
            }

            for (int i = 0; i < fees.Count; i++)
            {
                JObject     o      = (JObject)fees[i];
                int         pid    = (int)o["pid"];
                int         cid    = (int)o["cid"];
                double      fee    = (double)o["fee"];
                int         hid    = (int)o["hid"];
                BExpressFee feeObj = new BExpressFee()
                {
                    Fee = fee, Province = new BArea()
                    {
                        ID = pid
                    }, City = new BArea()
                    {
                        ID = cid
                    }, StoreHouse = new BStoreHouse {
                        ID = hid
                    }
                };
                express.Fees.Add(feeObj);
            }

            try
            {
                shopManager.CreateShopExpress(express);
            }
            catch (KMJXCException kex)
            {
                message.Status  = "failed";
                message.Message = kex.Message;
            }

            return(message);
        }
 // Initialise l'inventaire
 // Remplit l'inventaire d'objets vides
 void Start()
 {
     tooltipParent = GameObject.FindGameObjectWithTag ("ItemTooltipPanel").GetComponent<RectTransform> ();
     tooltip = tooltipParent.GetChild (0).GetComponent<RectTransform>();
     itemHeroSelection = itemHeroSelectionParent.GetChild (0).GetComponent<RectTransform>();
     modalWindowSCR = GameObject.FindGameObjectWithTag("ModalWindowManager").GetComponent<ModalWindowManager>();
     shopManagerSCR = GameObject.FindGameObjectWithTag("ShopManager").GetComponent<ShopManager>();
     for (int i = 0; i < inventorySize; i++)
     {
         inventory.Add(databaseSCR.GetItem(0));
     }
     for (int i = 0; i < inventory.Count; i++)
     {
         inventoryStacks.Add(0);
     }
 }
Example #24
0
 public Goal_BuyItem(CognitiveAgent owner, ShopManager shopManager, string itemUID)
     : base(owner)
 {
     this.shopManager = shopManager;
     this.itemUID = itemUID;
 }
Example #25
0
    public void setShopStuff(List <ShopStuff> _shopStuff, int _listIndex, SpriteAtlas _spriteAtlas, PlayerData _playerData, bool _showTitleFL, ShopManager _shopManager, ShopShelfManager _shopShelfManager)
    {
        shopShelfManager = _shopShelfManager;
        shopManager      = _shopManager;
        playerData       = _playerData;
        shopStuff        = _shopStuff;
        listIndex        = _listIndex;
        spriteAtlas      = _spriteAtlas;


        loadShopStuff();

        if (!_showTitleFL)
        {
            titleObj.SetActive(false);
        }

        checkStuffState();
    }
Example #26
0
 void OnEnable()
 {
     playerGold  = GameObject.FindGameObjectWithTag("Player").GetComponent <PlayerGold> ();
     shopManager = FindObjectOfType(typeof(ShopManager)) as ShopManager;
 }
Example #27
0
    IEnumerator _LoadAllScenes()
    {
        AsyncOperation async;

        string[]      enums   = Enum.GetNames(typeof(SceneType));
        BundleManager bundleM = BundleManager.instance;

        for (int i = 2; i < enums.Length; i++)
        {
            bundleM.txtStatusBar.text = "Memuat permainan " + Mathf.RoundToInt(((float)i / (float)enums.Length) * 100).ToString() + "%";
            string loadPath = BundleManager.instance.GetSceneLoadPath(i);
            //Logger.E ("loading scene: " + loadPath);
            AssetBundle ab        = AssetBundle.LoadFromFile(loadPath);
            string[]    scenePath = ab.GetAllScenePaths();
            //Logger.E (scenePath[0]);
            async = SceneManager.LoadSceneAsync(scenePath[0], LoadSceneMode.Additive);
            while (!async.isDone)
            {
                yield return(_WFSUtility.wef);
                //Logger.E ("name: " + scenePath[0] + " | progress: " + async.progress);
            }
            ab.Unload(false);
            //add progress here
        }
        yield return(_WFSUtility.wef);

        homeM = HomeManager.instance;
        yield return(_WFSUtility.wef);

        profileM = ProfileManager.instance;
        yield return(_WFSUtility.wef);

        verifyM = VerifyManager.instance;
        yield return(_WFSUtility.wef);

        vipM = VipManager.instance;
        yield return(_WFSUtility.wef);

        pokerM = PokerManager.instance;
        yield return(_WFSUtility.wef);

        beginM = BeginManager.instance;
        yield return(_WFSUtility.wef);

        loginM = LoginManager.instance;
        yield return(_WFSUtility.wef);

        shopM = ShopManager.instance;
        yield return(_WFSUtility.wef);

        proomM = PokerRoomManager.instance;
        yield return(_WFSUtility.wef);

        slotoM = FindObjectOfType <SlotoManagerScript> ();
        yield return(_WFSUtility.wef);

        sicboM = SicboManager.instance;
        yield return(_WFSUtility.wef);

        settingsM = SettingsManager.instance;
        yield return(_WFSUtility.wef);

        heroM = HeroManager.instance;
        yield return(_WFSUtility.wef);

        leaderboardM = LeaderboardManager.instance;
        yield return(_WFSUtility.wef);

        friendM = FriendManager.instance;
        yield return(_WFSUtility.wef);

        inboxM = InboxManager.instance;
        yield return(_WFSUtility.wef);

        transferM = TransferManager.instance;
        yield return(_WFSUtility.wef);

        redeemM = RedeemManager.instance;
        yield return(_WFSUtility.wef);

        dailyRewardsM = DailyRewardsManager.instance;
        yield return(_WFSUtility.wef);

        weeklyRewardsM = WeeklyRewardsManager.instance;
        yield return(_WFSUtility.wef);

        moneySlotM = MoneySlotManager.instance;
        yield return(_WFSUtility.wef);

        dailyQuestM = DailyQuestManager.instance;
        yield return(_WFSUtility.wef);

        watchAdsM = WatchAdsManager.instance;

        PhotonNetwork.ConnectUsingSettings("v1.0");
        yield return(_WFSUtility.wef);

        SetActiveScene(SceneType.SLOTO, false);
        yield return(_WFSUtility.wef);

        int    playerID = PlayerPrefs.GetInt(PrefEnum.PLAYER_ID.ToString(), 0);
        string token    = PlayerPrefs.GetString(PrefEnum.TOKEN.ToString(), string.Empty);

        if (playerID != 0 && token != string.Empty)
        {
            ApiManager.instance.GetHome();
        }
        else
        {
            SetActiveScene(SceneType.LOGIN, true);
        }
        yield return(_WFSUtility.wef);

        BundleManager.instance.bLoadingScenes = true;
        yield return(_WFSUtility.wef);

        SceneManager.UnloadSceneAsync("SeSplash");
    }
Example #28
0
 private void Awake()
 {
     current = this;
 }
 public CheapestBuyProducts(ShopManager manager) : base(manager)
 {
 }
Example #30
0
 // Use this for initialization
 void Start()
 {
     instance = this;
 }
Example #31
0
        public bool ShowBuyResult(GameBaseShopErrorCode errorCode, int shopId, ShopProductInfo shopProductInfo, ShopProductInfo changeProductInfo, ItemBaseInfo payItemInfo, ItemBaseInfo[] arrayRewardItemInfo, QuestData[] arrayQuestData)
        {
            UI_Main.Get().obj_IndicatorPopup.SetActive(false);

            if (errorCode == GameBaseShopErrorCode.Success)
            {
                if (changeProductInfo != null)
                {
                    UpdateContent(shopInfo, changeProductInfo);
                }

                //구매한 상품에 대한 정보
                //shopProductInfo
                switch (shopId)
                {
                case 1:
                case 2:
                case 5:
                case 6:
                    ShopManager.Get().RefreshShop();
                    break;

                case 3:
                    buttonShopItem.interactable = false;
                    break;
                }
                SetColor();

                if (payItemInfo != null)
                {
                    //소모한 재화에 대한 연출 처리
                    //payItemInfo
                    ITEM_TYPE type;
                    switch (payItemInfo.ItemId)
                    {
                    case 1:
                        type = ITEM_TYPE.GOLD;
                        UserInfoManager.Get().GetUserInfo().gold += payItemInfo.Value;
                        break;

                    case 2:
                        type = ITEM_TYPE.DIAMOND;
                        UserInfoManager.Get().GetUserInfo().diamond += payItemInfo.Value;
                        break;

                    case 11:
                        type = ITEM_TYPE.KEY;
                        UserInfoManager.Get().GetUserInfo().key += payItemInfo.Value;
                        break;

                    default:
                        type = ITEM_TYPE.NONE;
                        break;
                    }
                    UI_GetProduction.Get().RefreshProduct(type);
                }

                //구매한 상품에 대한 결과 값
                //arrayRewardItemInfo
                ItemBaseInfo[] arr = new ItemBaseInfo[arrayRewardItemInfo.Length];
                for (int i = 0; i < arrayRewardItemInfo.Length; i++)
                {
                    Debug.Log($"GET == ID:{arrayRewardItemInfo[i].ItemId}, Value:{arrayRewardItemInfo[i].Value}");
                    arr[i]        = new ItemBaseInfo();
                    arr[i].ItemId = arrayRewardItemInfo[i].ItemId;
                    arr[i].Value  = arrayRewardItemInfo[i].Value;
                }
                UI_Main.Get().AddReward(arr, ShopItem.pos);

                // 퀘스트 업데이트
                UI_Popup_Quest.QuestUpdate(arrayQuestData);

                return(true);
            }
            else
            {
                Debug.Log($"에러 발생 : {errorCode}");
                UI_ErrorMessage.Get().ShowMessage($"Error : {errorCode}");
                return(false);
            }
        }
Example #32
0
 public OrdersViewModel(ShopManager shopManager) : base(shopManager)
 {
     Title = "Список заказов";
 }
        private static void Main(string[] args)
        {
            Printf.blue("[Licença de uso]", false);
            Printf.blue("[+] Esta é uma versão compilada para Project Bloodi!!!", false);
            Printf.blue("[+] https://github.com/luisfeliperm", false);
            Printf.info("\n\n\n Iniciando servidor...", false);
            Thread.Sleep(5000);
            Console.Clear();

            Console.Title      = "PointBlank - Auth";
            SaveLog.aplication = "auth";
            SaveLog.checkDirectorys();

            StringBuilder txtHeader = new StringBuilder();

            txtHeader.Append(@"=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=").Append('\n');
            txtHeader.Append(@"             S E R V E R     A U T H").Append('\n');
            txtHeader.Append(@"").Append('\n');
            txtHeader.Append(@" + [UDP3 Private]").Append('\n');
            txtHeader.Append(@" + Release 2019").Append('\n');
            txtHeader.Append(@" + ...Version: 4.0.0").Append('\n');
            txtHeader.Append(@" + Distro @luisfeliperm").Append('\n');
            txtHeader.Append(@" + [email protected]").Append('\n');
            txtHeader.Append(@"=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=");
            Console.ForegroundColor = ConsoleColor.Red;
            Console.WriteLine(txtHeader.ToString());

            // Validações
            System.Reflection.Assembly assembly    = System.Reflection.Assembly.GetExecutingAssembly();
            FileVersionInfo            fileVersion = FileVersionInfo.GetVersionInfo(assembly.Location);

            if (!Compatible.Check(fileVersion.FileVersion, "auth") || !ServerLicense.check() || !ServerPasswd.Compare(args))
            {
                Console.ReadKey();
                return;
            }

            // Threads Essentials
            ConfigGA.Load();
            ConfigMaps.Load();
            ServerConfig.Load();
            EventLoader.LoadAll();
            DirectxMD5.Load();
            BasicInventoryXML.Load();
            ServersXML.Load();
            MissionCardXML.LoadBasicCards(2);
            MapsXML.Load();
            ShopManager.Load(2);
            CupomEffectManager.LoadCupomFlags();
            MissionsXML.Load();
            Auth_SyncNet.Start();
            bool started = LoginManager.Start();

            if (ConfigGA.isTestMode)
            {
                Printf.info("[WARN] Modo teste ligado", false);
            }

            Printf.info("[INFO] Started in " + DateTime.Now.ToString("yy/MM/dd HH:mm:ss"), false);

            if (started)
            {
                cpuMonitor.updateRAM2();
            }
            Process.GetCurrentProcess().WaitForExit();
        }
 public void CloseShop()
 {
     ShopManager.OnOpenShop();
     StartCoroutine(OpenOrCloseShop(1));
 }
Example #35
0
    public void ShopTransactionConfirmed(string _shopItemId)
    {
        ShopManager shopManager = null;

        if (GameObject.Find("PopUpShop") != null)
        {
            shopManager = GameObject.Find("PopUpShop").GetComponent <ShopManager>();
        }
        ShopItemID = _shopItemId;
        Debug.Log(_shopItemId);


        GameObject go = GameObject.Find("CanvasBG/MainMenu/ButtonsHolder/ItemsSlider");

        switch (ShopItemID)
        {
        case "RemoveAds":
            RemoveAds = 2;
            GameData.SetPurchasedItems();

//			WebelinxCMS.Instance.FlurryEvent("TotalInAppsBought", "InappBought", "RemoveAds");
            break;



        case "UnlockFirst10":
            //AnimiranjeDodavanjaZvezdica(500,null,"");
            UnlockFirst10 = 2;
            GameData.SetPurchasedItems();
            GameData.SetUnlocekedVehicles();
            if (go != null)
            {
                go.GetComponent <ItemsSlider>().SetCarPanels();
            }
            //		WebelinxCMS.Instance.FlurryEvent("TotalInAppsBought", "InappBought", "SmallCoinPack");

            break;

        case "UnlockFirst16":
            UnlockFirst10 = 2;
            UnlockFirst16 = 2;
            GameData.SetPurchasedItems();
            GameData.SetUnlocekedVehicles();
            if (go != null)
            {
                go.GetComponent <ItemsSlider>().SetCarPanels();
            }


            //	WebelinxCMS.Instance.FlurryEvent("TotalInAppsBought", "InappBought", "MediumCoinPack");
            break;

        case "UnlockAll":
            UnlockFirst10 = 2;
            UnlockFirst16 = 2;
            UnlockAll     = 2;
            GameData.SetPurchasedItems();
            GameData.SetUnlocekedVehicles();
            if (go != null)
            {
                go.GetComponent <ItemsSlider>().SetCarPanels();
            }

            //		WebelinxCMS.Instance.FlurryEvent("TotalInAppsBought", "InappBought", "SmallCoinPack");
            break;

        case "UnlockAll_RemoveAds":
            UnlockFirst10       = 2;
            UnlockFirst16       = 2;
            UnlockAll           = 2;
            RemoveAds           = 2;
            UnlockAll_RemoveAds = 2;
            GameData.SetPurchasedItems();
            GameData.SetUnlocekedVehicles();



            if (go != null)
            {
                go.GetComponent <ItemsSlider>().SetCarPanels();
            }
//			WebelinxCMS.Instance.FlurryEvent("TotalInAppsBought", "InappBought", "LargeCoinPack");
            break;

        case "SpecialOffer":
            Debug.Log("Special offer bought");
            UnlockFirst10       = 2;
            UnlockFirst16       = 2;
            UnlockAll           = 2;
            RemoveAds           = 2;
            UnlockAll_RemoveAds = 2;
            GameData.SetPurchasedItems();
            GameData.SetUnlocekedVehicles();



            if (go != null)
            {
                go.GetComponent <ItemsSlider>().SetCarPanels();
            }
            //	 WebelinxCMS.Instance.FlurryEvent("TotalInAppsBought", "InappBought", "LargeCoinPack");
            break;
        }
        ShopItemID = "";



        if (shopManager != null)
        {
            shopManager.SetShopItems();
        }
    }
 public void OnCategoryChanged()
 {
     ShopManager.ChangeCategory(shopOptions.categoryDropDown.options[shopOptions.categoryDropDown.value].text);
 }
Example #37
0
 // Use this for initialization
 void Start()
 {
     ItemDescription = GameObject.FindGameObjectWithTag("ShopItemDescription");
     shopManager     = FindObjectOfType(typeof(ShopManager)) as ShopManager;
 }
 private void OnCategoryChanged_UICallback(int category)
 {
     ShopManager.ChangeCategory(shopOptions.categoryDropDown.options[category].text);
 }
Example #39
0
 // Use this for initialization
 void Start()
 {
     shopManager = GameObject.FindWithTag("ShopManager").GetComponent <ShopManager>();
 }
Example #40
0
 private void Start()
 {
     shopManager = FindObjectOfType <ShopManager>();
 }
Example #41
0
 private void Awake()
 {
     _instance = this;
 }
Example #42
0
 public void Start()
 {
     shopManager = FindObjectOfType <ShopManager>();
 }
Example #43
0
    // Use this for initialization
    void Start()
    {
        inputManager = InputManager.Instance;

        gameManager = gameObject.GetComponent<GameManager>();
        spawnManager = gameObject.GetComponent<EnemySpawnManager>();

        mainCamera = GameObject.FindGameObjectWithTag("MainCamera").GetComponent<Camera>();

        inputManager.Mouse_Moved += ProcessMousePosition;

        playerInfo = GameObject.FindGameObjectWithTag("Player").GetComponent<PlayerBehaviour>();

        //Get the HUD, populate player health and game stats
        HUDBar = mainCamera.transform.FindChild("HUDBar").gameObject;

        for (int i = 0; i < playerInfo.Health; i++)
        {
            Vector3 newBlipLocalPosition = new Vector3(healthBlipStartPos.x, healthBlipStartPos.y, 0);

            GameObject newHealthBlip = GameObject.Instantiate(Resources.Load("Prefabs/Health_Blip") ) as GameObject;

            float blipWidth = newHealthBlip.GetComponent<SpriteRenderer>().bounds.extents.x * 2;

            newBlipLocalPosition.x += blipWidth * i;

            newHealthBlip.transform.parent = HUDBar.transform;

            newHealthBlip.transform.localPosition = newBlipLocalPosition;

            healthBlips.Add(newHealthBlip);
        }

        waveNumDisplay[0] = HUDBar.transform.FindChild("Wave_Ones").gameObject;
        waveNumDisplay[1] = HUDBar.transform.FindChild("Wave_Tens").gameObject;
        waveNumDisplay[2] = HUDBar.transform.FindChild("Wave_Hundreds").gameObject;

        enemyNumDisplay[0] = HUDBar.transform.FindChild("Enemies_Ones").gameObject;
        enemyNumDisplay[1] = HUDBar.transform.FindChild("Enemies_Tens").gameObject;
        enemyNumDisplay[2] = HUDBar.transform.FindChild("Enemies_Hundreds").gameObject;

        moneyNumDisplay[0] = HUDBar.transform.FindChild("Money_Ones").gameObject;
        moneyNumDisplay[1] = HUDBar.transform.FindChild("Money_Tens").gameObject;
        moneyNumDisplay[2] = HUDBar.transform.FindChild("Money_Hundreds").gameObject;

        crosshair = GameObject.Find("Crosshair");

        gameOverPanel = HUDBar.transform.FindChild("GameOverPanel").gameObject;
        scoreSubmissionStatus = gameOverPanel.transform.FindChild("SubmissionStatus").gameObject;
        gameOverScoreDisplay[0] = gameOverPanel.transform.FindChild("Score_Ones").gameObject;
        gameOverScoreDisplay[1] = gameOverPanel.transform.FindChild("Score_Tens").gameObject;
        gameOverScoreDisplay[2] = gameOverPanel.transform.FindChild("Score_Hundreds").gameObject;

        numberSprites = Resources.LoadAll<Sprite>("Sprites/UI/UI_Numbers");

        ShowHideGameOver(false);

        shopManager = HUDBar.transform.FindChild("ShopDisplay").GetComponent<ShopManager>();
        shopManager.ShowHideShop(false, false);

        breakTimePanel = HUDBar.transform.FindChild("WaveTimeDisplay").gameObject;
        breakTimeDisplay[0] = breakTimePanel.transform.FindChild("Seconds_Ones").gameObject;
        breakTimeDisplay[1] = breakTimePanel.transform.FindChild("Seconds_Tens").gameObject;

        gameManager.GameOverEvent += OnGameOver;
    }
Example #44
0
 void Start()
 {
     shopManger = shopManagerObject.GetComponent<ShopManager>();
 }
Example #45
0
 void Awake()
 {
     instance = this;
     DontDestroyOnLoad(gameObject);
     shops = new List<GameObject>();
 }
Example #46
0
 public WorkersViewModel(ShopManager shopManager) : base(shopManager)
 {
     Title = "Список работников";
 }