//public static HelpPipeCon Instance; // private static HelpPipeCon _instance; // // /// ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // /// // // Static singleton property // public static HelpPipeCon Instance // { // // Here we use the ?? operator, to return 'instance' if 'instance' does not equal null // // otherwise we assign instance to a new component and return that // get // { // if(_instance == null) // { // GameObject obj = new GameObject (); // obj.hideFlags = HideFlags.HideAndDontSave; // _instance = obj.AddComponent<HelpPipeCon> (); // } // // return _instance; // } // } /// ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // Use this for initialization void Awake () { Instance = this; helpPopupCon = GameObject.Find("Popup_Help").GetComponent<HelpPopupCon>(); ts = TextScript.Instance; helpState = 0; efm = EffectSoundManagerScript.Instance; go_HState = new GameObject[12]; for(int i=0; i<12; i++) { go_HState[i] = GameObject.Find("HStage"+i); } // Debug.Log("1"); // gd = GlobalData.Instance; // gameCon = GameCon.Instance;//GameObject.Find ("GameCon").GetComponent<GameCon>(); go_popup = GameObject.Find("Popup_Help"); gd = GlobalData.Instance; gd.setTileNum(0, true); // help_PipeIndex = 173; // setHelpPipe(help_PipeIndex); // // //// TweenPosition twPosition = TweenPosition.Begin(go_popup, 0.3f, new Vector3(0, 0, 0)); //// twPosition.method = UITweener.Method.BounceIn; }
// Use this for initialization void Awake () { pd = PlayerData.Instance; //sm = SoundManagerScript.Instance; efm = EffectSoundManagerScript.Instance; scrollBar = GameObject.Find ("ScrollBar"); //loadNorm_N_Score (); // sm = SoundManagerScript.Instance; // sm.playSnd (); go_HotMenuBase = GameObject.Find ("HotMenuBase"); go_HotMenu = GameObject.Find ("HotMenu"); go_FillRect_HotMenu = GameObject.Find ("FillRect_HotMenu"); go_FillRect_HotMenu.SetActive (false); select_planet = 0; go_Planet = new GameObject[PLANET_SIZE]; createPlanet (); setScrollBarValue (); }
// Use this for initialization void Awake () { bTimerStart = false; timer = 0; gameCon = GameObject.Find ("GameCon").GetComponent<GameCon> (); pd = PlayerData.Instance; efm = EffectSoundManagerScript.Instance; }
// Use this for initialization void Awake () { efm = EffectSoundManagerScript.Instance; //timer = 0; id = 0; tick = 0; bAni = false; uis = this.GetComponent<UISprite> (); }
// Use this for initialization void Start () { pd = PlayerData.Instance; efm = EffectSoundManagerScript.Instance; GameCon.bgNum = Random.Range (0, 7); GameCon.setBgAtlasSet (GameCon.bgNum); setBg (); GameObject.Find ("text_gemValue").GetComponent<UILabel>().text = string.Format("{0:N0}", pd.gem); GameObject.Find ("text_goldValue").GetComponent<UILabel>().text = string.Format("{0:N0}", pd.gold); }
// Use this for initialization void Awake () { pd = PlayerData.Instance; if (pd == null) { Debug.Log ("pd = PlayerData.Instance;" + pd); } efm = EffectSoundManagerScript.Instance; scrollBar = GameObject.Find ("ScrollBar"); go_Minimap_popup = GameObject.Find("Popup_MiniMap"); go_Minimap_popup.transform.localPosition = new Vector3(0, 800, 0); // sm = SoundManagerScript.Instance; //sm.playSnd (); go_HotMenuBase = GameObject.Find ("HotMenuBase"); go_HotMenu = GameObject.Find ("HotMenu"); go_FillRect_HotMenu = GameObject.Find ("FillRect_HotMenu"); go_FillRect_HotMenu.SetActive (false); go_Stage = new GameObject[20]; go_StagePopup = GameObject.Find ("Popup_Stage"); selectIndex = 0; //Debug.Log ("PlayerData.nowPlanet: "+PlayerData.nowPlanet); createState (); setScrollBarValue (); go_mini = new GameObject[144]; for(int i=0; i<144; i++) { go_mini[i] = GameObject.Find("mini"+i); go_mini[i].transform.localPosition = new Vector3(-1800, 1800, 0); } }
// Use this for initialization void Awake () { efm = EffectSoundManagerScript.Instance; ts = TextScript.Instance; scrollBar = GameObject.Find ("ScrollBar"); helpPopupCon = GameObject.Find("Popup_Help").GetComponent<HelpPopupCon>(); //hpc.InitPopup(); go_Popup_Help = GameObject.Find("Popup_Help"); GameCon.bgNum = Random.Range (0, 7); GameCon.setBgAtlasSet (GameCon.bgNum); setBg (); // buy pop-up Popup_Panel_Buy_Obj = GameObject.Find ("Popup_Panel_Buy"); Popup_Panel_Buy_Obj.SetActive (false); //info popup Initialize..................................................................... Popup_Panel_Obj = GameObject.Find ("Popup_Info"); Popup_Panel_Obj.SetActive (false); Popup_Panel_OK_Obj = GameObject.Find ("Popup_Info_OK"); Popup_Panel_OK_Obj.SetActive (false); popupState = 0; //no popup //end info popup Initialize..................................................................... pd = PlayerData.Instance; btnIndex = 0; //tempBuyCount = new int[PlayerData.PIPE_ITEM_MAX] ; item = new GameObject[PlayerData.PIPE_ITEM_MAX]; posCount = new GameObject[PlayerData.PIPE_ITEM_MAX]; posMaxCount = new GameObject[PlayerData.PIPE_ITEM_MAX]; costLabel = new GameObject[PlayerData.PIPE_ITEM_MAX]; cursorObj = new GameObject[PlayerData.PIPE_ITEM_MAX]; itemContainer = new GameObject[PlayerData.PIPE_ITEM_MAX]; gd = GlobalData.Instance; gd.setTileNum(0, true); GameCon.setAtlasSet (GlobalData.baseTileNum); uia = Resources.Load<UIAtlas> (GameCon.basePipeAtlasPath); Vector3 v3pos; for (int i=0; i<PlayerData.PIPE_ITEM_MAX; i++) { item [i] = GameObject.Find ("Item" + i); v3pos = item[i].transform.localPosition; v3pos.x = 30 + 390*i; item[i].transform.localPosition = v3pos; if(i < pd.invenOpenLevel) { setItemValue(i); } else { item [i].SetActive(false); } } // Debug.Log ("pd.invenOpenLevel:"+pd.invenOpenLevel); // for (int i=0; i<pd.invenOpenLevel; i++) { // setItemValue(i); // } totalCostLabel = GameObject.Find ("totalCostLabel"); goldLabel = GameObject.Find ("goldLabel"); }
// Use this for initialization void Awake () { efm = EffectSoundManagerScript.Instance; scrollBar = GameObject.Find ("Scroll Bar"); // GoldImg = GameObject.Find ("GoldImg"); // GemImg = GameObject.Find ("GemImg"); uia = Resources.Load<UIAtlas> ("Atlases/Shop"); go_timeBase6Hour = GameObject.Find ("TimeBase6Hour"); go_timeBase6Hour.SetActive (false); go_timeBase24Hour = GameObject.Find ("TimeBase24Hour"); go_timeBase24Hour.SetActive (false); GameCon.bgNum = Random.Range (0, 7); GameCon.setBgAtlasSet (GameCon.bgNum); setBg (); // buy pop-up Popup_Panel_Buy_Obj = GameObject.Find ("Popup_Panel_Buy"); Popup_Panel_Buy_Obj.SetActive (false); Popup_Panel_Buy5_Obj = GameObject.Find ("Popup_Panel_Buy5"); Popup_Panel_Buy5_Obj.SetActive (false); Popup_Panel_Buy1_Obj = GameObject.Find ("Popup_Panel_Buy1"); Popup_Panel_Buy1_Obj.SetActive (false); Popup_Panel_Buy2_Obj = GameObject.Find ("Popup_Panel_Buy2"); Popup_Panel_Buy2_Obj.SetActive (false); Popup_Panel_Buy3_Obj = GameObject.Find ("Popup_Panel_Buy3"); Popup_Panel_Buy3_Obj.SetActive (false); Popup_Panel_Buy4_Obj = GameObject.Find ("Popup_Panel_Buy4"); Popup_Panel_Buy4_Obj.SetActive (false); Popup_Panel_OK_Obj = GameObject.Find ("Popup_Info_OK"); Popup_Panel_OK_Obj.SetActive (false); pd = PlayerData.Instance; selected_itemIndex = 0; //Popup_Panel_Obj = GameObject.Find ("Popup_Panel"); //infoTextLabel_Obj = Popup_Panel_Obj.transform.FindChild ("infoTextLabel").gameObject; //Popup_Panel_Obj.SetActive (false); popupState = 0; //no popup //Popup_Panel_OK_Obj = GameObject.Find ("Popup_Panel_OK"); //infoTextLabel_OK_Obj = Popup_Panel_OK_Obj.transform.FindChild ("infoTextLabel").gameObject; //Popup_Panel_OK_Obj.SetActive (false); item = new GameObject[PlayerData.CONSUME_ITEM_MAX]; itemContainer = new GameObject[PlayerData.CONSUME_ITEM_MAX]; itemPlate = new GameObject[PlayerData.CONSUME_ITEM_MAX]; // costLabel = new GameObject[PlayerData.CONSUME_ITEM_MAX]; // posLabel = new GameObject[PlayerData.CONSUME_ITEM_MAX]; // tempLabel = new GameObject[PlayerData.CONSUME_ITEM_MAX]; // cursorObj = new GameObject[PlayerData.CONSUME_ITEM_MAX]; Vector3 v3pos; for (int i=0; i<PlayerData.CONSUME_ITEM_MAX; i++) { item [i] = GameObject.Find ("Item" + i); v3pos = item[i].transform.localPosition; v3pos.x = 30 + 390*i; item[i].transform.localPosition = v3pos; setItemValue(i); } // tempCount = new int[PlayerData.CONSUME_ITEM_MAX]; // // for (int i=0; i<PlayerData.CONSUME_ITEM_MAX; i++) { // tempCount[i] = 0; // } // // tempCost = 0; }
// Use this for initialization void Awake () { InventoryItemButtonObj = GameObject.Find("InventoryButton"); InventoryItemButtonObj.SetActive(false); ConveyorItemButtonObj = GameObject.Find("conveyorButton"); Pan_inventoryScrollView = GameObject.Find ("Panel_inventoryScrollView"); go_FillRect_Screen = GameObject.Find("FillRect_Screen"); go_FillRect_Screen.SetActive(false); float resolWidth = Screen.width; // Debug.Log("resolWidth: "+resolWidth); float resolHeight = Screen.height; // Debug.Log("resolHeight: "+resolHeight); float ratio1 = resolWidth/resolHeight; // Debug.Log("ratio1: "+ratio1); float gameWidth = 800 * ratio1; // Debug.Log("gameWidth: "+gameWidth); float ratio = gameWidth/1280; float tmpWidth = (gameWidth - 372*ratio); Vector4 range = new Vector4(0, 0, tmpWidth, 160); //Pan_inventoryScrollView.GetComponent<UIPanel>().clipping = UIDrawCall.Clipping.SoftClip; Pan_inventoryScrollView.GetComponent<UIPanel>().baseClipRegion = range; //Pan_inventoryScrollView.GetComponent<UIPanel>().drawCallClipRange = new Vector4(0, 0, Screen.width - 360, 160); gd = GlobalData.Instance; // GameObject.Find("Prefab_Pipe").GetComponent<PipeScript>().setID(170); // GameObject.Find("Prefab_Pipe1").GetComponent<PipeScript>().setID(171); // GameObject.Find("Prefab_Pipe2").GetComponent<PipeScript>().setID(172); // GameObject.Find("Prefab_Pipe3").GetComponent<PipeScript>().setID(173); // GameObject.Find("Prefab_Pipe4").GetComponent<PipeScript>().setID(64); // GameObject.Find("Prefab_Pipe5").GetComponent<PipeScript>().setID(65); // Instance = this; efm = EffectSoundManagerScript.Instance; pd = PlayerData.Instance; gd.setTileNum(0, true); go_Popup_Help = GameObject.Find("Popup_Help"); helpPopupCon = GameObject.Find("Popup_Help").GetComponent<HelpPopupCon>(); ts = TextScript.Instance; uiSlider_Loading = GameObject.Find ("loading_Slider").GetComponent<UISlider> (); uiSlider_Loading.value = 0; bJustOneTimeCoroutine = false; go_fade = GameObject.Find("Anchor_Center_Fade"); bLoading = true; loading_state = 0; }