Inheritance: MonoBehaviour
 public override void initialize()
 {
     gameObject = create
                  (
         Program.I().new_ui_cardDescription,
         Program.camera_main_2d.ScreenToWorldPoint(new Vector3(-256, Screen.height / 2, 600)),
         new Vector3(0, 0, 0),
         true,
         Program.ui_back_ground_2d
                  );
     picLoader             = gameObject.AddComponent <cardPicLoader>();
     picLoader.code        = 0;
     picLoader.uiTexture   = UIHelper.getByName <UITexture>(gameObject, "pic_");
     picLoader.loaded_code = -1;
     resizer     = UIHelper.getByName <UIDragResize>(gameObject, "resizer");
     underSprite = UIHelper.getByName <UITexture>(gameObject, "under_");
     description = UIHelper.getByName <UITextList>(gameObject, "description_");
     line        = UIHelper.getByName(gameObject, "line");
     UIHelper.registEvent(gameObject, "pre_", onPre);
     UIHelper.registEvent(gameObject, "next_", onNext);
     UIHelper.registEvent(gameObject, "big_", onb);
     UIHelper.registEvent(gameObject, "small_", ons);
     picSprite  = UIHelper.getByName <UITexture>(gameObject, "pic_");
     lineSprite = UIHelper.getByName <UISprite>(gameObject, "line");
     try
     {
         description.textLabel.fontSize = int.Parse(Config.Get("fontSize", "24"));
     }
     catch (System.Exception e)
     {
     }
     read();
 }
示例#2
0
    void OnInitialize()
    {
        UITextList uiTextList = _textListCollider.GetComponent <UITextList>();

        _textLabel.lineWidth = Mathf.FloorToInt(uiTextList.maxWidth);

        string versionNumString = string.Format(Localization.instance.Get("IDS_SETTING_ABOUT"), AppVersion.GetCurrentVersionString());
        string versionAppString = string.Format(Localization.instance.Get("IDS_SETTING_ABOUT2"), AppVersion.GetCurrentBuildString());

        _textLabel.text = versionNumString + "\n" + Localization.instance.Get("IDS_SETTING_CREDITS") + "\n" + versionAppString + "(" + FCDownloadManager.Instance.CurrentAssetBundleTag + ")";

        _textHeight              = _textLabel.relativeSize.y * _textLabel.transform.localScale.y;
        _textListCollider.size   = new Vector3(_textListCollider.size.x, _textHeight, _textListCollider.size.z);
        _textListCollider.center = new Vector3(_textListCollider.center.x, -_textHeight / 2.0f, _textListCollider.center.z);
        _springPanel             = _draggablePanel.gameObject.GetComponent <SpringPanel>();
        _textListPanelTrans      = _draggablePanel.gameObject.transform;

        _boardHeight2D = _draggablePanel.gameObject.GetComponent <UIPanel>().clipRange.w / 2.0f;

        _draggablePanel.ResetPosition();
        _draggablePanel.MoveRelative(new Vector3(0, -_boardHeight2D, 0));
        _isPressing = false;
        _isStarting = true;
        StartCoroutine("WaitAWhile");
    }
示例#3
0
 public void Init()
 {
     InitLabelLanguage();
     btn_close         = FindInChild <Button>("topright/btn_close");
     textList          = FindInChild <UITextList>("hylb/txt_lb");
     btn_close.onClick = CloseFarmLogView;
 }
示例#4
0
    public void OnFacebookBind(string szFacebookAccount)
    {
        PlayerPrefs.SetString("logintype", "facebook");
        PlayerPrefs.SetString("user_id", user_id);
        PlayerPrefs.SetString("user_token", user_token);

        SceneManager.instance.ShowLoadingTipPanel(true, GAME_MODE.NONE, () =>
        {
            UITextList.ClearTextList();
            //UIMgr.GetTownBasePanel().Close();
            //UIMgr.instance.Clear(UIMgr.UIType.System);
            UIMgr.ClearUI(true);

            NetworkClient.instance.DisconnectGameServer();//연결 종료
            NetData.instance.InitUserData();
            NetData.instance.ClearCharIdc();

            SceneManager.instance.ActionEvent(_ACTION.GO_LOGIN);
        });

        //option.SaveOptionData();
        //Close();
        option.SaveOptionData();
        base.Close();
    }
    private void Awake()
    {
        Global.Instance.scene = SceneType.MenuScene;//切换场景变量
        Global.Instance.activedSceneManager = this;

        //尝试获取网络端口
        try
        {
            cardClient = GameObject.FindGameObjectWithTag(Tags.Networks).GetComponent<CardClient>();
            RequestPlayerInfo();//获取角色信息
        }
        catch (Exception ex) { LogsSystem.Instance.Print(ex.ToString()); }

        //获取功能按键
        //StartButton = GameObject.Find("GameStart");

        //聊天窗初始化
        chatList = GameObject.Find("Chatting/ChattingList").GetComponent<UITextList>();
        if (chatList != null)
        {
            chatScroll = chatList.scrollBar as UIScrollBar;
            chatScroll.alpha = 0.01f;
        }

        //角色信息获取
        coinLabel = GameObject.Find("Economy/Coin/Sprite/Num").GetComponent<UILabel>();
        gemLabel = GameObject.Find("Economy/Gem/Sprite/Num").GetComponent<UILabel>();
        playerNameLabel = GameObject.Find("Head/Name").GetComponent<UILabel>();
        levelLabel = GameObject.Find("Head/Head-bg/Level").GetComponent<UILabel>();

        //信息控件获取
        //infoPanel = GameObject.Find("Frame/Background/InfoPanel");
        cardListGrid = GameObject.Find("Frame/Background/InfoPanel/CardContainer/CardList/Grid");
    }
示例#6
0
 public ItemDestribe(Transform head)
 {
     itemIcon  = head.Find("Item/Icon").GetComponent <UISprite>();
     itemName  = head.Find("Item/Label").GetComponent <UILabel>();
     itemMoney = head.Find("Gold/Label").GetComponent <UILabel>();
     itemDes   = head.GetComponent <UITextList>();
     ItemId    = -1;
 }
示例#7
0
 public static void ConsoleMessage(string str)
 {
     if (null == console)
     {
         //console = SALaunch.UIRootCamera.FindChild("ConsolePanel/Console").GetComponent<UILabel>();
         textList = SAManager.Instance.UIRootCamera.Find("ConsoleUI/Console").GetComponent <UITextList>();
     }
     textList.Add(str);
 }
示例#8
0
    // Use this for initialization
    void Start()
    {
        UITextList mytext = GetComponent <UITextList>();

        mytext.Add(contentTitle);
//		mytext.Add ("\n\t");
        mytext.Add(contents);

        mytext.Add(contents);
    }
示例#9
0
    private void Awake()
    {
        _ins = this;
        CommandRegister._ins.Register(typeof(CommandBase).Assembly);

        InitView();
        input  = _inputField;
        output = _logCat;

        submitAction = new ConsoleSubmitAction();
        escapeAction = new ConsoleCloseAction();
    }
示例#10
0
 static public int get_style(IntPtr l)
 {
     try {
         UITextList self = (UITextList)checkSelf(l);
         pushValue(l, true);
         pushEnum(l, (int)self.style);
         return(2);
     }
     catch (Exception e) {
         return(error(l, e));
     }
 }
	void Awake()
	{
		textList = TextList.GetComponentInChildren<UITextList>();
		Back_Top.width = 2000;
		Back_Top.height = (int)Screen.height/4;
		Back_Bottom.width = 2000;
		Back_Bottom.height = (int)Screen.height/4;
		TextList.width = (int)(Screen.width * 0.8f);
		goFrontPos = Screen.width /4f;
		goBackPos = Screen.width /3f;
		bFinish = false;
	}
示例#12
0
 static public int get_paragraphHistory(IntPtr l)
 {
     try {
         UITextList self = (UITextList)checkSelf(l);
         pushValue(l, true);
         pushValue(l, self.paragraphHistory);
         return(2);
     }
     catch (Exception e) {
         return(error(l, e));
     }
 }
示例#13
0
 static public int Clear(IntPtr l)
 {
     try {
         UITextList self = (UITextList)checkSelf(l);
         self.Clear();
         pushValue(l, true);
         return(1);
     }
     catch (Exception e) {
         return(error(l, e));
     }
 }
示例#14
0
 static public int get_textLabel(IntPtr l)
 {
     try {
         UITextList self = (UITextList)checkSelf(l);
         pushValue(l, true);
         pushValue(l, self.textLabel);
         return(2);
     }
     catch (Exception e) {
         return(error(l, e));
     }
 }
示例#15
0
    // Use this for initialization
    void Start()
    {
        UITextList tl = gameObject.GetComponent <UITextList> ();

        foreach (CommonUtil.LogRecord r in CommonUtil.CommonLogger.s_Records)
        {
            tl.Add(TransOrgLog(r.type, r.log));
        }

        tl.scrollBar.value = 1f;
        CommonUtil.CommonLogger.NewLogEvent += this.LogIncoming;
    }
    /* protected - Override & Unity API         */

    protected override void OnAwake()
    {
        base.OnAwake();

        _pUITextList = GetComponentInChildren <UITextList>();
        if (_pUITextList == null)
        {
            Debug.LogWarning("UITextList 가 없습니다.");
        }

        Application.logMessageReceived += OnCallbackUnity_DebugLog;
    }
示例#17
0
    private void Awake()
    {
        Global.Instance.scene = SceneType.MenuScene;//切换场景变量
        Global.Instance.activedSceneManager = this;

        //尝试获取网络端口
        try
        {
            cardClient = GameObject.FindGameObjectWithTag(Tags.Networks).GetComponent<CardClient>();
            RequestPlayerInfo();//获取角色信息
        }
        catch (Exception ex) { LogsSystem.Instance.Print(ex.ToString()); }

        //获取功能按键
        //StartButton = GameObject.Find("GameStart");

        //聊天窗初始化
        chatList = GameObject.Find("Chatting/ChattingList").GetComponent<UITextList>();
        if (chatList != null)
        {
            chatScroll = chatList.scrollBar as UIScrollBar;
            chatScroll.alpha = 0.01f;
        }

        //角色信息获取
        coinLabel = GameObject.Find("Economy/Coin/Sprite/Num").GetComponent<UILabel>();
        gemLabel = GameObject.Find("Economy/Gem/Sprite/Num").GetComponent<UILabel>();
        playerNameLabel = GameObject.Find("Head/Name").GetComponent<UILabel>();
        levelLabel = GameObject.Find("Head/Head-bg/Level").GetComponent<UILabel>();

        //信息控件获取
        //infoPanel = GameObject.Find("Frame/Background/InfoPanel");
        cardListGrid = GameObject.Find("Frame/Background/InfoPanel/CardContainer/CardList/Grid");

        //卡片背包面板
        cardInventoryPanel = GameObject.Find("CardInventory").GetComponent<UIPanel>();
        cardInventoryButtonLowlay = GameObject.Find("CardInventory/Background/Feature/Button-lowlay");
        heroInfoUsingList = GameObject.Find("CardInventory/Background/Main/HeroInfo/UsingHeros/Scroll View/Grid").GetComponent<UIGrid>();
        heroInfoInvList = GameObject.Find("CardInventory/Background/Main/HeroInfo/InvHeros/Scroll View/Grid").GetComponent<UIGrid>();
        //卡片背包标签页
        ci_PlayerInfo = GameObject.Find("CardInventory/Background/Main/PlayerInfo");
        ci_HeroInfo = GameObject.Find("CardInventory/Background/Main/HeroInfo");
        ci_GuideInfo = GameObject.Find("CardInventory/Background/Main/GuideInfo");
        ci_InvInfo = GameObject.Find("CardInventory/Background/Main/InvInfo");
        //玩家页
        pp_PlayerName = GameObject.Find("CardInventory/Background/Main/PlayerInfo/Head/PlayerName").GetComponent<UILabel>();
        pp_PlayerLevel = GameObject.Find("CardInventory/Background/Main/PlayerInfo/Head/PlayerLevel").GetComponent<UILabel>();
        pp_PlayerCoin = GameObject.Find("CardInventory/Background/Main/PlayerInfo/Head/PlayerCoin").GetComponent<UILabel>();
        pp_PlayerGem = GameObject.Find("CardInventory/Background/Main/PlayerInfo/Head/PlayerGem").GetComponent<UILabel>();
        pp_HeroGrid = GameObject.Find("CardInventory/Background/Main/PlayerInfo/CardInfo/Heros/Scroll View/Grid").GetComponent<UIGrid>();
        pp_ItemGrid = GameObject.Find("CardInventory/Background/Main/PlayerInfo/CardInfo/Items/Scroll View/Grid").GetComponent<UIGrid>();
    }
示例#18
0
        // Use this for initialization
        void Start()
        {
            Debuger.EnableLog = GD.ENABLELOG;

            tReceive = new Thread(ReceiveDatasThread);

            textList  = GetComponentInChildren <UITextList>();
            popup_端口号 = GameUtility.FindDeepChild(gameObject, "Popup_端口号").GetComponent <UIPopupList>();
            popup_波特率 = GameUtility.FindDeepChild(gameObject, "Popup_波特率").GetComponent <UIPopupList>();
            textInput = GameUtility.FindDeepChild(gameObject, "Input Field").GetComponent <UIInput>();

            EventInit();
        }
示例#19
0
 public void Init(GameObject go)
 {
     m_BaseWndObject          = go;
     m_BaseTrans              = go.transform;
     m_ScrollView.m_Grid      = new UIGrid[3];
     m_ScrollView.m_BaseChild = m_BaseTrans.GetChild(0).GetChild(0).gameObject;
     for (byte i = 0; i < 3; ++i)
     {
         m_ScrollView.m_Grid[i] = m_BaseTrans.GetChild(0).GetChild(i + 1).GetComponent <UIGrid>();
     }
     m_NoticeLabel = m_BaseTrans.GetChild(1).GetComponent <UITextList>();
     UIEventListener.Get(m_BaseTrans.GetChild(2).gameObject).onClick = onClickChangeAddress;
 }
示例#20
0
 static public int set_style(IntPtr l)
 {
     try {
         UITextList       self = (UITextList)checkSelf(l);
         UITextList.Style v;
         checkEnum(l, 2, out v);
         self.style = v;
         pushValue(l, true);
         return(1);
     }
     catch (Exception e) {
         return(error(l, e));
     }
 }
示例#21
0
 static public int Add(IntPtr l)
 {
     try {
         UITextList    self = (UITextList)checkSelf(l);
         System.String a1;
         checkType(l, 2, out a1);
         self.Add(a1);
         pushValue(l, true);
         return(1);
     }
     catch (Exception e) {
         return(error(l, e));
     }
 }
示例#22
0
 static public int set_textLabel(IntPtr l)
 {
     try {
         UITextList self = (UITextList)checkSelf(l);
         UILabel    v;
         checkType(l, 2, out v);
         self.textLabel = v;
         pushValue(l, true);
         return(1);
     }
     catch (Exception e) {
         return(error(l, e));
     }
 }
示例#23
0
 static public int set_scrollValue(IntPtr l)
 {
     try {
         UITextList self = (UITextList)checkSelf(l);
         float      v;
         checkType(l, 2, out v);
         self.scrollValue = v;
         pushValue(l, true);
         return(1);
     }
     catch (Exception e) {
         return(error(l, e));
     }
 }
示例#24
0
 static public int OnDrag(IntPtr l)
 {
     try {
         UITextList          self = (UITextList)checkSelf(l);
         UnityEngine.Vector2 a1;
         checkType(l, 2, out a1);
         self.OnDrag(a1);
         pushValue(l, true);
         return(1);
     }
     catch (Exception e) {
         return(error(l, e));
     }
 }
示例#25
0
 static public int set_paragraphHistory(IntPtr l)
 {
     try {
         UITextList   self = (UITextList)checkSelf(l);
         System.Int32 v;
         checkType(l, 2, out v);
         self.paragraphHistory = v;
         pushValue(l, true);
         return(1);
     }
     catch (Exception e) {
         return(error(l, e));
     }
 }
示例#26
0
 public override void initialize()
 {
     gameObject = create
                  (
         Program.I().new_ui_cardDescription,
         Program.camera_main_2d.ScreenToWorldPoint(new Vector3(-256, Screen.height / 2, 600)),
         new Vector3(0, 0, 0),
         true,
         Program.ui_back_ground_2d
                  );
     picLoader             = gameObject.AddComponent <cardPicLoader>();
     picLoader.code        = 0;
     picLoader.uiTexture   = UIHelper.getByName <UITexture>(gameObject, "pic_");
     picLoader.loaded_code = -1;
     resizer          = UIHelper.getByName <UIDragResize>(gameObject, "resizer");
     underSprite      = UIHelper.getByName <UITexture>(gameObject, "under_");
     description      = UIHelper.getByName <UITextList>(gameObject, "description_");
     cardShowerWidget = UIHelper.getByName <UIWidget>(gameObject, "card_shower");
     monitor          = UIHelper.getByName <UIPanel>(gameObject, "monitor");
     deckPanel        = gameObject.GetComponentInChildren <UIDeckPanel>();
     line             = UIHelper.getByName(gameObject, "line");
     UIHelper.registEvent(gameObject, "pre_", onPre);
     UIHelper.registEvent(gameObject, "next_", onNext);
     UIHelper.registEvent(gameObject, "big_", onb);
     UIHelper.registEvent(gameObject, "small_", ons);
     UIHelper.registEvent(gameObject, "wiki_", onwiki);
     UIHelper.registEvent(gameObject, "reset_", onReset);
     picSprite  = UIHelper.getByName <UITexture>(gameObject, "pic_");
     lineSprite = UIHelper.getByName <UISprite>(gameObject, "line");
     try
     {
         description.textLabel.fontSize = int.Parse(Config.Get("fontSize", "24"));
     }
     catch (System.Exception e)
     {
     }
     read();
     myGraveStr    = InterString.Get("我方墓地:");
     myExtraStr    = InterString.Get("我方额外:");
     myBanishedStr = InterString.Get("我方除外:");
     opGraveStr    = InterString.Get("[8888FF]对方墓地:[-]");
     opExtraStr    = InterString.Get("[8888FF]对方额外:[-]");
     opBanishedStr = InterString.Get("[8888FF]对方除外:[-]");
     for (int i = 0; i < quickCards.Length; i++)
     {
         quickCards[i] = deckPanel.createCard();
         quickCards[i].relayer(i);
     }
     monitor.gameObject.SetActive(false);
 }
示例#27
0
 static int Clear(IntPtr L)
 {
     try
     {
         ToLua.CheckArgsCount(L, 1);
         UITextList obj = (UITextList)ToLua.CheckObject <UITextList>(L, 1);
         obj.Clear();
         return(0);
     }
     catch (Exception e)
     {
         return(LuaDLL.toluaL_exception(L, e));
     }
 }
    //< 화면이 꺼졌다 켜졌을경우 처리
//#if !UNITY_EDITOR && UNITY_ANDROID
    public void OnApplicationPause(bool type)
    {
        if (type)
        {
            PlayerPrefs.SetString("OnApplicationPauseTime", dateTimeToUnixTime(System.DateTime.Now).ToString());
        }
        else
        {
            NativeHelper.instance.DisableNavUI();

            System.DateTime EndTime = UnixTimeToDateTime(uint.Parse(PlayerPrefs.GetString("OnApplicationPauseTime", "0")));
            EndTime = EndTime.AddMinutes(5);
            long tick = (EndTime - System.DateTime.Now).Ticks;
            if (tick <= 0)
            {
                if (instance.CurrState() != _STATE.LOGIN && SceneManager.instance.CurrState() != _STATE.START /*&& SceneManager.instance.CurrState() != _STATE.GAMEREADY*/)
                {
                    string msg   = _LowDataMgr.instance.GetStringCommon(1021);
                    string title = _LowDataMgr.instance.GetStringCommon(141);
                    string ok    = _LowDataMgr.instance.GetStringCommon(117);
                    AddPopup(0, msg, title, ok, null, null, () => {
                        ShowLoadingTipPanel(true, GAME_MODE.NONE, () =>
                        {
                            UITextList.ClearTextList();
                            NetData.instance.InitUserData();
                            NetData.instance.ClearCharIdc();

                            ActionEvent(_ACTION.GO_LOGIN);
                        });
                    }, null, null);
                    //UIMgr.instance.OpenPopup("게임을 장시간 플레이하지 않아,\n타이틀로 돌아갑니다.", () =>
                    //{
                    //SceneManager.instance.ActionEvent(_ACTION.GO_LOGIN);
                    //}, false);
                }
            }
        }

#if UNITY_ANDROID
        Object[] objects = GameObject.FindObjectsOfType(typeof(SkinnedMeshRenderer));
        foreach (SkinnedMeshRenderer s in objects)
        {
            s.sharedMesh.vertices = s.sharedMesh.vertices;
            s.sharedMesh.colors   = s.sharedMesh.colors;
            s.sharedMesh.colors32 = s.sharedMesh.colors32;
            s.sharedMesh.uv       = s.sharedMesh.uv;
        }
#endif
    }
示例#29
0
    // Use this for initialization
    void Start()
    {
        if (string.IsNullOrEmpty(mText))
        {
            return;
        }

        UITextList uilist = GetComponent <UITextList>();

        string[] lines = mText.Split('\n');
        foreach (string line in lines)
        {
            uilist.Add(line);
        }
    }
示例#30
0
        //void Awake()
        //{
        //    init();
        //}

        //private void init()
        //{
        //    this.textList = this.transform.Find("UIDebug/TextArea").GetComponent<UITextList>();
        //}

        public void log(object obj, Color136 color = Color136.Black)
        {
            if (this.textList == null)
            {
                this.textList = this.transform.Find("UIDebug/TextArea").GetComponent <UITextList>();
            }
            string content = obj.ToString();

            if (this.color136.Count == 0)
            {
                color136 = TextStyle.getColor136();
            }
            content = "[" + color136[color].HEX + "]" + content + "[-]";   //设置颜色/
            this.textList.Add(content);
        }
示例#31
0
 static int Add(IntPtr L)
 {
     try
     {
         ToLua.CheckArgsCount(L, 2);
         UITextList obj  = (UITextList)ToLua.CheckObject <UITextList>(L, 1);
         string     arg0 = ToLua.CheckString(L, 2);
         obj.Add(arg0);
         return(0);
     }
     catch (Exception e)
     {
         return(LuaDLL.toluaL_exception(L, e));
     }
 }
示例#32
0
 static int OnDrag(IntPtr L)
 {
     try
     {
         ToLua.CheckArgsCount(L, 2);
         UITextList          obj  = (UITextList)ToLua.CheckObject <UITextList>(L, 1);
         UnityEngine.Vector2 arg0 = ToLua.ToVector2(L, 2);
         obj.OnDrag(arg0);
         return(0);
     }
     catch (Exception e)
     {
         return(LuaDLL.toluaL_exception(L, e));
     }
 }
示例#33
0
 static int OnScroll(IntPtr L)
 {
     try
     {
         ToLua.CheckArgsCount(L, 2);
         UITextList obj  = (UITextList)ToLua.CheckObject <UITextList>(L, 1);
         float      arg0 = (float)LuaDLL.luaL_checknumber(L, 2);
         obj.OnScroll(arg0);
         return(0);
     }
     catch (Exception e)
     {
         return(LuaDLL.toluaL_exception(L, e));
     }
 }
示例#34
0
 private UILabel appkeyLabel;    //用来接收用户输入的appkey
 void Start()
 {
     //获得引用,赋值等操作,并将一开始不显示的组件隐藏
     trainController = TrainController.GetInstance();
     query.SetActive(false);
     trainInfoShow.SetActive(false);
     stationInfoShow.SetActive(false);
     backButton.gameObject.SetActive(false);
     nextButton.gameObject.SetActive(false);
     errorShow.SetActive(false);
     trainLabel = trainInfoShow.transform.FindChild("TrainLabel").GetComponent<UITextList>();
     stationLabel = stationInfoShow.transform.FindChild("StationLabel").GetComponent<UITextList>();
     errorLabel = errorShow.transform.FindChild("ErrorLabel").GetComponent<UILabel>();
     appkeyLabel = appkey.transform.FindChild("AppKeyInput Field/Label").GetComponent<UILabel>();
     stationModelsList = new List<StationModel>();
 }
示例#35
0
 void Start()
 {
     label = GetComponent<UITextList>();
 }
示例#36
0
		// Use this for initialization
		void Start ()
		{
				myTextList = this.GetComponent<UITextList> ();
		}
 // Use this for initialization
 void Start()
 {
     networkManager = Manager.GetComponent<NetworkManager>();
     playerList = GetComponent<UITextList>();
 }