// Use this for initialization void Start() { hl = GameObject.FindGameObjectWithTag("effect").GetComponent <Heallight>(); sctu = GameObject.Find("CoinShooter").GetComponent <SootingCoinsToUI>(); pb = GameObject.Find("PauseButton").GetComponent <PauseButton>(); cl = GameObject.Find("ColForStation").GetComponent <ColforLand>(); sb = GameObject.Find("SaveButton").GetComponent <SaveButton>(); ewb = GameObject.Find("ExitWButton").GetComponent <ExitWButton>(); cb = GameObject.Find("MazeCreator").GetComponent <CreateBlocks>(); }
// Use this for initialization void Start() { cuolt = GameObject.FindGameObjectWithTag("CoinUIsOnLeftTop").GetComponent <CoinUIOnLeftTop>(); cd = GameObject.FindGameObjectWithTag("Cha1").GetComponent <CharacterData>(); cm = GameObject.FindGameObjectWithTag("Cha1").GetComponent <CharMove>(); hl = GameObject.FindGameObjectWithTag("effect").GetComponent <Heallight>(); sccu = GameObject.Find("SavingCoinCounter").GetComponent <SavingCoinCounterUI>(); wc = GameObject.Find("GameSaveWindow").GetComponent <WindowCol>(); cl = GameObject.Find("ColForStation").GetComponent <ColforLand>(); sb = GameObject.Find("SaveButton").GetComponent <SaveButton>(); }
// Use this for initialization void Start() { cl = GameObject.Find("ColForStation").GetComponent <ColforLand>(); wc = GameObject.Find("GameSaveWindow").GetComponent <WindowCol>(); sd = GameObject.FindGameObjectWithTag("station").GetComponent <StationData>(); cuolt = GameObject.FindGameObjectWithTag("CoinUIsOnLeftTop").GetComponent <CoinUIOnLeftTop>(); sctu = GameObject.Find("CoinShooter").GetComponent <SootingCoinsToUI>(); cd = GameObject.FindGameObjectWithTag("Cha1").GetComponent <CharacterData>(); hl = GameObject.FindGameObjectWithTag("effect").GetComponent <Heallight>(); CurrentSprite = this.gameObject.GetComponent <SpriteRenderer>().sprite; }
// Use this for initialization void Start() { col = gameObject.GetComponent <Collider2D>(); //팝업 창 콜라이더 colw = GameObject.Find("ColForWindows").GetComponent <Collider2D>(); //팝업 창을 밑에서 받쳐주는 콜라이더 eb = GameObject.Find("ExitWButton"); sb = GameObject.Find("SaveButton"); //위치(스테이션) 저장하기 버튼 cl = GameObject.Find("ColForStation").GetComponent <ColforLand>(); rig = gameObject.GetComponent <Rigidbody2D>(); //팝업 창 강체 material = new PhysicsMaterial2D(); //팝업 창 콜라이더의 바뀔 메터리얼 startposition = this.transform.position; rig.gravityScale = 0; }
// Use this for initialization void Start() { L = false; R = false; PresKey = false; leftboost = 0.0f; rightboost = 0.0f; upboost = 0.0f; gravity = 0.07f; rot = 0.0f; check = 0.0f; cd = GameObject.FindGameObjectWithTag("Cha1").GetComponent <CharacterData>(); cl = GameObject.FindGameObjectWithTag("legcol").GetComponent <ColforLand>(); cdp = GameObject.FindGameObjectWithTag("stationpoint").GetComponent <CalDistancePlayer>(); hl = GameObject.FindGameObjectWithTag("effect").GetComponent <Heallight>(); }
private void OnMouseUp() { cl = GameObject.Find("ColForStation").GetComponent <ColforLand>(); if (cl.g != null) { pressed = true; forasct = true; hl.golightkeep = true; // cl.wa = false; this.gameObject.GetComponent <BoxCollider2D>().enabled = false; } this.gameObject.GetComponent <SpriteRenderer>().sprite = CurrentSprite; this.transform.Translate(0, 0.3f, 0); }
void Start() { heallight = GameObject.FindGameObjectWithTag("effect").GetComponent <Renderer>(); gep = GameObject.FindGameObjectWithTag("station").GetComponent <GiveEnergy2Player>(); cdp = GameObject.FindGameObjectWithTag("stationpoint").GetComponent <CalDistancePlayer>(); cd = GameObject.FindGameObjectWithTag("Cha1").GetComponent <CharacterData>(); cm = GameObject.FindGameObjectWithTag("Cha1").GetComponent <CharMove>(); sccu = GameObject.Find("SavingCoinCounter").GetComponent <SavingCoinCounterUI>(); wc = GameObject.Find("GameSaveWindow").GetComponent <WindowCol>(); cl = GameObject.Find("ColForStation").GetComponent <ColforLand>(); sb = GameObject.Find("SaveButton").GetComponent <SaveButton>(); sctu = GameObject.Find("CoinShooter").GetComponent <SootingCoinsToUI>(); asct = GameObject.Find("AddOrSubCoinsText"); A = GameObject.FindGameObjectWithTag("legpoint"); v = this.transform.position; callwa = true; }
// Use this for initialization void Start() { L = false; R = false; PresKey = false; leftboost = 0.0f; rightboost = 0.0f; upboost = 0.0f; gravity = 4f * Rt; //0.07 rot = 0.0f; check = 0.0f; cd = GameObject.FindGameObjectWithTag("Cha1").GetComponent <CharacterData>(); cl = GameObject.FindGameObjectWithTag("legcol").GetComponent <ColforLand>(); cdp = GameObject.FindGameObjectWithTag("stationpoint").GetComponent <CalDistancePlayer>(); hl = GameObject.FindGameObjectWithTag("effect").GetComponent <Heallight>(); pc = GameObject.FindGameObjectWithTag("Cha1").GetComponent <PauseCtrl>(); pb = GameObject.Find("PauseButton").GetComponent <PauseButton>(); StartTime = Time.realtimeSinceStartup; }
// Use this for initialization void Start() { cointrans = GameObject.FindGameObjectWithTag("coinuionlefttop").GetComponent <Transform>(); coinrender = GameObject.FindGameObjectWithTag("coinuionlefttop").GetComponent <Renderer>(); numberrender = GameObject.FindGameObjectWithTag("cointextuionlefttop").GetComponent <MeshRenderer>(); addsubnumberrender = GameObject.Find("AddOrSubCoinsText").GetComponent <MeshRenderer>(); gep = GameObject.FindGameObjectWithTag("station").GetComponent <GiveEnergy2Player>(); cdp = GameObject.FindGameObjectWithTag("stationpoint").GetComponent <CalDistancePlayer>(); cd = GameObject.FindGameObjectWithTag("Cha1").GetComponent <CharacterData>(); cm = GameObject.FindGameObjectWithTag("Cha1").GetComponent <CharMove>(); sb = GameObject.Find("SaveButton").GetComponent <SaveButton>(); asct = GameObject.Find("AddOrSubCoinsText").GetComponent <AddSubCoinsText>(); pc = GameObject.FindGameObjectWithTag("Cha1").GetComponent <PauseCtrl>(); cl = GameObject.Find("ColForStation").GetComponent <ColforLand>(); A = GameObject.FindGameObjectWithTag("legpoint"); ewb = GameObject.Find("ExitWButton").GetComponent <ExitWButton>(); v = this.transform.position; coinrender.material.color = new Vector4(coinrender.material.color.r, coinrender.material.color.g, coinrender.material.color.b, 0f); numberrender.material.color = new Vector4(numberrender.material.color.r, numberrender.material.color.g, numberrender.material.color.b, 0f); addsubnumberrender.material.color = new Vector4(addsubnumberrender.material.color.r, addsubnumberrender.material.color.g, addsubnumberrender.material.color.b, 0f); totalcoins = 0; }
private void OnMouseUp() { cl = GameObject.Find("ColForStation").GetComponent <ColforLand>(); if (cl.g != null && cd.coins + cuolt.totalcoins >= 25) { pressed = true; if (cd.coins > 0) { sctu.goshoot = true; } hl.golightkeep = true; cl.g.occup = true; cl.g.check = true; // cl.wa = false; cuolt.totalcoins -= 25; //저장 비용 소모 this.gameObject.GetComponent <BoxCollider2D>().enabled = false; } this.gameObject.GetComponent <SpriteRenderer>().sprite = CurrentSprite; this.transform.Translate(0, 0.3f, 0); }