Esempio n. 1
0
    //void Update()
    //{


    //}
    /// <summary>
    /// 设置焦点为第一个btn
    /// </summary>
    public void SetFirstBtnOnNode()
    {
        m_key.setCurKey(UpLevel.GetComponent <Button>());
        UpLevel.transform.Find("Text").GetComponent <Text>().color = ColorTypeChange.Instance.HexColorToColor("f99629");
        Sold.transform.Find("Text").GetComponent <Text>().color    = Color.white;
        Recover.transform.Find("Text").GetComponent <Text>().color = Color.white;
        Move.transform.Find("Text").GetComponent <Text>().color    = Color.white;
    }
Esempio n. 2
0
    public override bool onEnter()
    {
        m_key = new BuyChildKey();
        m_key.init(this);
        var _key = m_key as BuyChildKey;

        m_key.registerCallBack(this.UpLevel.GetComponent <Button>(), btnOnUpLevelClick);
        m_key.registerCallBack(this.Sold.GetComponent <Button>(), btnOnSoldClick);
        m_key.registerCallBack(this.Recover.GetComponent <Button>(), btnOnRecoverClick);
        m_key.registerCallBack(this.Move.GetComponent <Button>(), btnOnMoveClick);
        UpLevel.transform.Find("Text").GetComponent <Text>().color = ColorTypeChange.Instance.HexColorToColor("f99629");

        m_key.RegisterOnKeyChangedEvent(UpLevel.GetComponent <Button>(), btnOnEnter, btnOnExit);
        m_key.RegisterOnKeyChangedEvent(Sold.GetComponent <Button>(), btnOnEnter, btnOnExit);
        m_key.RegisterOnKeyChangedEvent(Recover.GetComponent <Button>(), btnOnEnter, btnOnExit);
        m_key.RegisterOnKeyChangedEvent(Move.GetComponent <Button>(), btnOnEnter, btnOnExit);
        p = BattleManager.getMe().leftPlayer;

        //ColorUtility.TryParseHtmlString("f99629", out selectColor);
        // text = transform.Find("Text").GetComponent<Text>();
        return(true);
    }