Example #1
0
        public bool Equals(Player p)
        {
            if (p is null)
            {
                return(false);
            }

            if (ReferenceEquals(this, p))
            {
                return(true);
            }

            return(Nick.Equals(p.Nick) && Name.Equals(p.Name) && Class.Equals(p.Class) &&
                   Level.Equals(p.Level) && UHost.Equals(p.UHost) && Pos.Equals(p.Pos));
        }
Example #2
0
    void Start()
    {
        printCodeTimes = 0;
        preInputState = InputEx.inputEnable;
        mouseIcon = GameObject.Find("Canvas/mouse icon").GetComponent<RectTransform>();
        calcTitle = GameObject.Find("Canvas/Calc/Input/Title").GetComponent<Text>();
        calcContent = GameObject.Find("Canvas/Calc/Input/Content").GetComponent<Text>();
        calcPassword = GameObject.Find("Canvas/Calc/Input/Password").GetComponent<Text>();
        dlgCalc = GameObject.Find("Canvas/Calc");
        calcPassword.text = calcTitle.text = calcContent.text = string.Empty;
        if (GameData.controlCode &&
            GameData.GetInstance().remainMins <= 0)
        {
            tipPrintCode.SetActive(true);
            tipPrintCode.transform.FindChild("Text").GetComponent<Text>().text = strClearAccoutTip[GameData.GetInstance().language];
        }
        else
            tipPrintCode.SetActive(false);
        InitMain();

        if (GameData.GetInstance().deviceIndex == 1)
        {
            host = GameObject.Find("NetworkObject").GetComponent<UHost>();
        }

        GameEventManager.PrintCodeSuccess += PrintCodeSuccess;
        GameEventManager.PrintCodeFail += PrintCodeFail;
    }
Example #3
0
 private void Init()
 {
     host = GameObject.Find("NetworkObject").GetComponent<UHost>();
     //        CalcRemainTime();
 }