Ejemplo n.º 1
0
 // 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>();
 }
Ejemplo n.º 2
0
 private void Awake()
 {
     if (Instance == null)
     {
         Instance = this;
     }
 }
Ejemplo n.º 3
0
 protected virtual void Start()
 {
     player          = FindObjectOfType <Player>();
     anim            = GetComponent <Animator>();
     listOfTheLiving = FindObjectOfType <ListOfTheLiving>();
     board           = FindObjectOfType <Tilemap>().GetComponent <Board>();
     infoUI          = FindObjectOfType <InfoUI>();
 }
Ejemplo n.º 4
0
    // 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);
    }
Ejemplo n.º 6
0
 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];
 }
Ejemplo n.º 7
0
 // 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>();
 }
Ejemplo n.º 8
0
    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);
    }
Ejemplo n.º 9
0
    // 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;
    }
Ejemplo n.º 10
0
    // 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;
    }
Ejemplo n.º 11
0
 // 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);
 }
Ejemplo n.º 12
0
 private static void UpdateTextUI()
 {
     InfoUI.SetCameraText(cameras[currentCameraIndex].transform.root.gameObject.name);
 }
Ejemplo n.º 13
0
 // 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>();
 }
Ejemplo n.º 14
0
 // 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);
 }
Ejemplo n.º 15
0
 void Awake()
 {
     Instance = this;
 }
Ejemplo n.º 16
0
    // 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);
        }
    }
Ejemplo n.º 17
0
 private void Start()
 {
     mapManager = MapManager.instance;
     infoUI     = (InfoUI)UI_Manager.instance.GetUIComponent("InfoUI");
 }
Ejemplo n.º 18
0
 public static void UpdateTextUI(string text)
 {
     InfoUI.SetCameraText(text);
 }
Ejemplo n.º 19
0
 void Start()
 {
     pc = GetComponent <PlayerControl>();
     RequestDecision();
     info = GameObject.Find("Text").GetComponent <InfoUI>();
 }