// Use this for initialization void Start() { currentSelect = this.GetComponent <selection>(); segment = btSize; posMoveBt = new Rect(leftMargin, topMargin, btSize, btSize); posSummonBt = new Rect(leftMargin, topMargin + segment, btSize, btSize); posAttackBt = new Rect(leftMargin, topMargin + segment * 2, btSize, btSize); posSkillBt = new Rect(leftMargin, topMargin + segment * 3, btSize, btSize); posDefenseBt = new Rect(leftMargin, topMargin + segment * 4, btSize, btSize); posEndTurnBt = new Rect(leftMargin, topMargin + segment * 5, btSize, btSize); MainGuiShow = false; mousePos = new Vector2(); mainStyle.font = MainFont; mainStyle.normal.textColor = Color.white; mainStyle.fontSize = 20; subStyle = new GUIStyle(mainStyle); subStyle.fontSize = 16; subStyle.normal.textColor = new Color(.8f, .8f, .8f, 1.0f); subStyle.onHover.textColor = Color.white; players = this.GetComponent <RoundCounter>(); numIcon = this.GetComponent <NumIconVault>(); infoUI = this.GetComponent <InfoUI>(); chessUI = this.GetComponent <MainInfoUI>(); InSecondTutor = false; init = GameObject.Find("InitStage").transform.GetComponent <InitStage>(); }
private void Awake() { if (Instance == null) { Instance = this; } }
protected virtual void Start() { player = FindObjectOfType <Player>(); anim = GetComponent <Animator>(); listOfTheLiving = FindObjectOfType <ListOfTheLiving>(); board = FindObjectOfType <Tilemap>().GetComponent <Board>(); infoUI = FindObjectOfType <InfoUI>(); }
// Use this for initialization void Start() { iconVault = transform.GetComponent <InfoUI>(); pillars = GameObject.Find("Pillars").transform; Rect zeroGFRect = new Rect(startX, startY, gfWidth, gfHeight); print("this is level, " + Application.loadedLevelName); playerData = GameObject.Find("PlayerData").transform; if (playerData != null) { guardians = playerData.GetComponent <GuardianStorage>(); dataLength = guardians.Guardians.Count; guardianArray = new GuardianUIData[dataLength]; skillArray = new Transform[guardians.SkillVault.Count]; guardians.SkillVault.CopyTo(skillArray, 0); skillRects = new Rect[guardians.SkillVault.Count]; for (int i = 0; i < dataLength; i++) { Transform gf = guardians.Guardians[i] as Transform; guardianArray[i] = new GuardianUIData(gf); Rect gfRect = new Rect(startX + interWidth * i, startY, gfWidth, gfHeight); guardianArray[i].DragRect = gfRect; guardianArray[i].OriginRect = gfRect; guardianArray[i].TrueOriginRect = gfRect; } for (int i = 0; i < guardians.SkillVault.Count; i++) { skillRects[i] = new Rect(1080.0f, 140.0f + 26.0f * i, 168.0f, 20.0f); } } gStyle.alignment = TextAnchor.MiddleCenter; gStyle.font = StringStyle; gStyle.fontSize = 20; gStyle.normal.textColor = Color.white; bStyle.alignment = TextAnchor.UpperLeft; bStyle.font = StringStyle; bStyle.fontSize = 18; bStyle.normal.textColor = Color.white; cStyle.alignment = TextAnchor.UpperLeft; cStyle.font = StringStyle; cStyle.fontSize = 16; cStyle.normal.textColor = new Color(0.75f, 0.75f, 0.75f, 1.0f); cStyle.wordWrap = true; for (int i = 0; i < infoRects.Length; i++) { infoRects[i] = new Rect(infoStartRect.x, infoStartRect.y + 28.0f * i, infoStartRect.width, infoStartRect.height); staticRects[i] = new Rect(176.0f, infoStartRect.y + 28.0f * i, 40.0f, 20.0f); } for (int i = 0; i < 5; i++) { passiveRects[i] = new Rect(156.0f + i * 22.0f, infoRects[8].y, 20.0f, 20.0f); } }
private void Start() { // Ensure the interface and projectile component are attached to the ball m_interface = GetComponent <InfoUI>(); Assert.IsNotNull(m_interface, "ERROR: InfoUI is not attached!"); m_projectile = GetComponent <ProjectileComponent>(); Assert.IsNotNull(m_projectile, "ERROR: ProjectileComponent is not attached!"); // Update the HUD with starting information m_interface.OnRequestUpdateUI(m_iGoals, m_iMisses, m_projectile.m_fLaunchPower, m_projectile.m_iVerticalAngle, m_projectile.m_iHorizontalAngle, m_bGoalScored); }
private void SetComponents() { ui_Components = new UI_Component[] { new MessageLogUI(), new InfoUI(), new BarUI("HealthBar") // new DynamicUIMenu("InventoryUI"), //new DynamicUIMenu("MiniMenuUI") }; barUI = (BarUI)ui_Components[2]; infoUI = (InfoUI)ui_Components[1]; }
// Use this for initialization void Start() { infoUI = GameObject.Find("OVRCameraRig/TrackingSpace/CenterEyeAnchor/InfoUI").GetComponent <InfoUI>(); goDevice = GameObject.Find("OVRCameraRig/TrackingSpace").GetComponent <GoDevice>(); pointManager = GetComponent <PointManager>(); timeManager = GetComponent <TimeManager>(); nowPhase = Phase.StartPhase; holdTime = holdTimeMax; instantInfoBoad = Instantiate(infoBoad, boadSpowner.transform.position, boadSpowner.transform.rotation); instantInfoBoad.name = "InfoBoad"; instantInfoBoad.GetComponent <InfoBoad>().WriteInfo(InfoBoad.ruleText); enemySpowner = GameObject.Find("EnemySpowner").GetComponent <EnemySpowner>(); }
public void HandleHowtoPlay() { G4.LogEvent("PressButton", "HowtoPlayButton", "HasPressed", 1); // Builder Hit with all Event parameters. G4.LogEvent(new EventHitBuilder() .SetEventCategory("PressButton") .SetEventAction("HowtoPlayButton") .SetEventLabel("HasPressed") .SetEventValue(1)); Debug.Log("Sent"); MainPauseUI.SetActive(false); InfoUI.SetActive(true); }
// Use this for initialization void Start() { territoryStart = new Rect(Screen.width-350.0f, 6.0f, 28.0f, 28.0f); allMaps = GameObject.Find("Maps").transform.childCount; iconVault = transform.GetComponent<InfoUI>(); rc = transform.GetComponent<RoundCounter>(); mainInfoUI = transform.GetComponent<MainInfoUI>(); numberStyle[0] = new GUIStyle(); numberStyle[1] = new GUIStyle(); numberStyle[0].font = Number; numberStyle[1].font = Number; numberStyle[0].normal.textColor = new Color(0.8f,0.8f,0.8f,1.0f); numberStyle[1].normal.textColor = new Color(0.8f,0.8f,0.8f,1.0f); numberStyle[0].fontSize = 24; numberStyle[1].fontSize = 20; }
// Use this for initialization void Start() { territoryStart = new Rect(Screen.width - 350.0f, 6.0f, 28.0f, 28.0f); allMaps = GameObject.Find("Maps").transform.childCount; iconVault = transform.GetComponent <InfoUI>(); rc = transform.GetComponent <RoundCounter>(); mainInfoUI = transform.GetComponent <MainInfoUI>(); numberStyle[0] = new GUIStyle(); numberStyle[1] = new GUIStyle(); numberStyle[0].font = Number; numberStyle[1].font = Number; numberStyle[0].normal.textColor = new Color(0.8f, 0.8f, 0.8f, 1.0f); numberStyle[1].normal.textColor = new Color(0.8f, 0.8f, 0.8f, 1.0f); numberStyle[0].fontSize = 24; numberStyle[1].fontSize = 20; }
// Use this for initialization void Start() { leftChess = null; rightChess = null; leftInfoWin = new Rect(0, Screen.height - 170, 500, 154); rightInfoWin = new Rect(Screen.width - leftInfoWin.width, leftInfoWin.y, 500, 154); leftChessPos = new Rect(0, Screen.height - 310, 250, 250); rightChessPos = new Rect(Screen.width - leftChessPos.width, leftChessPos.y, 250, 250); mirrorRect = new Rect(0, 0, -1, 1); posLeftTitle = new Rect(250.0f, Screen.height - leftInfoWin.height - 15, 250, 30); posRightTitle = new Rect(Screen.width - rightInfoWin.width + 30, posLeftTitle.y, posLeftTitle.width, posLeftTitle.height); posLeftContent = new Rect(posLeftTitle.x, posLeftTitle.y + 45, iconWidth, iconWidth); posRightContent = new Rect(Screen.width - rightInfoWin.width + 30, posLeftContent.y, iconWidth, iconWidth); posAChessList = new Rect(105, Screen.height - 55, 40, 40); posBChessList = new Rect(Screen.width - 155, Screen.height - 55, 40, 40); titleStyle = new GUIStyle(); titleStyle.font = Title; titleStyle.fontSize = 28; titleStyle.normal.textColor = Color.white; manaStyle = new GUIStyle(); manaStyle.font = Number; manaStyle.fontSize = 36; manaStyle.normal.textColor = new Color(1.0f, 1.0f, 1.0f, 0.5f); numberStyle[0] = new GUIStyle(); numberStyle[1] = new GUIStyle(); numberStyle[2] = new GUIStyle(); numberStyle[0].font = Number; numberStyle[1].font = Number; numberStyle[2].font = Number; numberStyle[0].normal.textColor = new Color(0.5f, 0.5f, 0.5f, 1.0f); numberStyle[1].normal.textColor = new Color(0.5f, 0.5f, 0.5f, 1.0f); numberStyle[2].normal.textColor = new Color(0.5f, 0.5f, 0.5f, 1.0f); numberStyle[0].fontSize = 24; numberStyle[1].fontSize = 30; numberStyle[2].fontSize = 44; iconVault = transform.GetComponent <InfoUI>(); rc = transform.GetComponent <RoundCounter>(); roundStyle = new GUIStyle(manaStyle); roundStyle.fontSize = 48; roundStyle.alignment = TextAnchor.MiddleCenter; roundStyle.normal.textColor = new Color(1.0f, 1.0f, 1.0f, 0.8f); }
private static void UpdateTextUI() { InfoUI.SetCameraText(cameras[currentCameraIndex].transform.root.gameObject.name); }
// Use this for initialization void Start() { currentSelect = this.GetComponent<selection>(); segment = btSize; posMoveBt =new Rect(leftMargin,topMargin,btSize,btSize); posSummonBt = new Rect(leftMargin,topMargin+segment,btSize,btSize); posAttackBt = new Rect(leftMargin,topMargin+segment*2,btSize,btSize); posSkillBt = new Rect(leftMargin,topMargin+segment*3,btSize,btSize); posDefenseBt = new Rect(leftMargin,topMargin+segment*4,btSize,btSize); posEndTurnBt = new Rect(leftMargin,topMargin+segment*5,btSize,btSize); MainGuiShow = false; mousePos = new Vector2(); mainStyle.font = MainFont; mainStyle.normal.textColor = Color.white; mainStyle.fontSize = 20; subStyle = new GUIStyle(mainStyle); subStyle.fontSize = 16; subStyle.normal.textColor = new Color(.8f,.8f,.8f,1.0f); subStyle.onHover.textColor = Color.white; players = this.GetComponent<RoundCounter>(); numIcon = this.GetComponent<NumIconVault>(); infoUI = this.GetComponent<InfoUI>(); chessUI = this.GetComponent<MainInfoUI>(); InSecondTutor = false; init = GameObject.Find("InitStage").transform.GetComponent<InitStage>(); }
// Use this for initialization void Start() { leftChess = null; rightChess = null; leftInfoWin = new Rect(0,Screen.height-170,500,154); rightInfoWin = new Rect(Screen.width-leftInfoWin.width, leftInfoWin.y,500,154); leftChessPos = new Rect(0,Screen.height-310, 250,250); rightChessPos = new Rect(Screen.width-leftChessPos.width, leftChessPos.y,250,250); mirrorRect = new Rect(0,0,-1,1); posLeftTitle = new Rect(250.0f,Screen.height-leftInfoWin.height-15,250,30); posRightTitle = new Rect(Screen.width - rightInfoWin.width+30, posLeftTitle.y,posLeftTitle.width,posLeftTitle.height); posLeftContent = new Rect(posLeftTitle.x, posLeftTitle.y+45,iconWidth,iconWidth); posRightContent = new Rect(Screen.width - rightInfoWin.width+30,posLeftContent.y,iconWidth,iconWidth); posAChessList = new Rect(105,Screen.height-55,40,40); posBChessList = new Rect(Screen.width-155,Screen.height-55,40,40); titleStyle = new GUIStyle(); titleStyle.font = Title; titleStyle.fontSize = 28; titleStyle.normal.textColor = Color.white; manaStyle = new GUIStyle(); manaStyle.font = Number; manaStyle.fontSize = 36; manaStyle.normal.textColor = new Color(1.0f,1.0f,1.0f,0.5f); numberStyle[0] = new GUIStyle(); numberStyle[1] = new GUIStyle(); numberStyle[2] = new GUIStyle(); numberStyle[0].font = Number; numberStyle[1].font = Number; numberStyle[2].font = Number; numberStyle[0].normal.textColor = new Color(0.5f,0.5f,0.5f,1.0f); numberStyle[1].normal.textColor = new Color(0.5f,0.5f,0.5f,1.0f); numberStyle[2].normal.textColor = new Color(0.5f,0.5f,0.5f,1.0f); numberStyle[0].fontSize = 24; numberStyle[1].fontSize = 30; numberStyle[2].fontSize = 44; iconVault = transform.GetComponent<InfoUI>(); rc = transform.GetComponent<RoundCounter>(); roundStyle = new GUIStyle(manaStyle); roundStyle.fontSize = 48; roundStyle.alignment = TextAnchor.MiddleCenter; roundStyle.normal.textColor = new Color(1.0f,1.0f,1.0f,0.8f); }
void Awake() { Instance = this; }
// Use this for initialization void Start() { iconVault = transform.GetComponent<InfoUI>(); pillars = GameObject.Find("Pillars").transform; Rect zeroGFRect = new Rect(startX, startY, gfWidth, gfHeight); print("this is level, "+Application.loadedLevelName); playerData = GameObject.Find("PlayerData").transform; if(playerData!=null){ guardians = playerData.GetComponent<GuardianStorage>(); dataLength = guardians.Guardians.Count; guardianArray = new GuardianUIData[dataLength]; skillArray = new Transform[guardians.SkillVault.Count]; guardians.SkillVault.CopyTo(skillArray,0); skillRects = new Rect[guardians.SkillVault.Count]; for(int i=0; i<dataLength; i++){ Transform gf = guardians.Guardians[i] as Transform; guardianArray[i] = new GuardianUIData(gf); Rect gfRect = new Rect(startX+interWidth*i, startY, gfWidth, gfHeight); guardianArray[i].DragRect = gfRect; guardianArray[i].OriginRect = gfRect; guardianArray[i].TrueOriginRect = gfRect; } for(int i=0; i<guardians.SkillVault.Count; i++){ skillRects[i] = new Rect(1080.0f, 140.0f+26.0f*i, 168.0f, 20.0f); } } gStyle.alignment = TextAnchor.MiddleCenter; gStyle.font = StringStyle; gStyle.fontSize = 20; gStyle.normal.textColor = Color.white; bStyle.alignment = TextAnchor.UpperLeft; bStyle.font = StringStyle; bStyle.fontSize = 18; bStyle.normal.textColor = Color.white; cStyle.alignment = TextAnchor.UpperLeft; cStyle.font = StringStyle; cStyle.fontSize = 16; cStyle.normal.textColor = new Color(0.75f,0.75f,0.75f,1.0f); cStyle.wordWrap = true; for(int i=0; i<infoRects.Length; i++){ infoRects[i] = new Rect(infoStartRect.x, infoStartRect.y+28.0f*i, infoStartRect.width, infoStartRect.height); staticRects[i] = new Rect(176.0f, infoStartRect.y+28.0f*i, 40.0f, 20.0f); } for(int i=0; i<5; i++){ passiveRects[i] = new Rect(156.0f+i*22.0f, infoRects[8].y, 20.0f, 20.0f); } }
private void Start() { mapManager = MapManager.instance; infoUI = (InfoUI)UI_Manager.instance.GetUIComponent("InfoUI"); }
public static void UpdateTextUI(string text) { InfoUI.SetCameraText(text); }
void Start() { pc = GetComponent <PlayerControl>(); RequestDecision(); info = GameObject.Find("Text").GetComponent <InfoUI>(); }