Пример #1
0
 private void OnDisable()
 {
     lidclient.Shutdown();
     lidclient.DebugMessage   -= OnDebugMessage;
     lidclient.UnknownMessage -= OnUnknownMessage;
     lidclient = null;
 }
Пример #2
0
 private void Start()
 {
     m_guimaster          = (GUI3dMaster)Object.FindObjectOfType(typeof(GUI3dMaster));
     m_inventory          = (InventoryGUI)Object.FindObjectOfType(typeof(InventoryGUI));
     m_client             = (LidClient)Object.FindObjectOfType(typeof(LidClient));
     m_craftableItems     = new List <ItemDef> [m_btnPages.Length];
     m_craftableItemTypes = new List <int> [m_btnPages.Length];
     m_itemList           = new string[m_btnPages.Length];
     for (int i = 0; i < m_btnPages.Length; i++)
     {
         m_craftableItems[i]     = new List <ItemDef>();
         m_craftableItemTypes[i] = new List <int>();
         m_itemList[i]           = string.Empty;
     }
     m_txtItems.text = string.Empty;
     for (int j = 0; j < 254; j++)
     {
         ItemDef itemDef = Items.GetItemDef(j);
         if (Items.IsCraftable(j) && itemDef.ident != null)
         {
             m_craftableItems[itemDef.rankReq].Add(itemDef);
             m_craftableItemTypes[itemDef.rankReq].Add(j);
             string reference = m_itemList[itemDef.rankReq];
             reference = reference + LNG.Get(itemDef.ident) + "\n";
         }
     }
     ActivatePage(0);
 }
Пример #3
0
 private void OnEnable()
 {
     if (null == m_client)
     {
         m_client = Object.FindObjectOfType <LidClient>();
     }
 }
 private void Start()
 {
     m_client = (LidClient)Object.FindObjectOfType(typeof(LidClient));
     if (Global.isSteamActive)
     {
         m_waitForResult = SteamInventory.GetAllItems(out m_resultHandle);
     }
 }
Пример #5
0
    private void Start()
    {
        int num  = (int)((float)Screen.width * m_length);
        int num2 = 25;
        int num3 = (int)((float)Screen.width * m_xOffset);
        int num4 = (int)((float)Screen.height * m_yOffset);

        m_chatRect = new Rect(num3, num4, num, num2);
        m_client   = (LidClient)Object.FindObjectOfType(typeof(LidClient));
    }
Пример #6
0
 private void Start()
 {
     if (Global.isServer)
     {
         Object.Destroy(this);
     }
     else
     {
         m_client = (LidClient)Object.FindObjectOfType(typeof(LidClient));
     }
 }
 private void Start()
 {
     m_client     = Object.FindObjectOfType <LidClient>();
     m_objectsOn  = base.transform.Find("active");
     m_objectsOff = base.transform.Find("inactive");
     if (null != m_exlMarkPrefab)
     {
         GameObject gameObject = (GameObject)Object.Instantiate(m_exlMarkPrefab, base.transform.position + Vector3.up * 4f, Quaternion.Euler(270f, 0f, 0f));
         gameObject.transform.parent = m_objectsOn;
     }
     UpdateGameObjects();
 }
Пример #8
0
    private void OnDisable()
    {
        UIManager.instance.btn_Back.SetActive(false);

        UIManager.instance.btn_Disconnect.GetComponent <Button>().onClick.RemoveListener(btn_Disconnect_Click);
        UIManager.instance.btn_Connect.GetComponent <Button>().onClick.RemoveListener(btn_Connect_Click);
        UIManager.instance.btn_Back.GetComponent <Button>().onClick.RemoveListener(btn_Back_Click);
        lidclient.Connected             -= OnConnected;
        lidclient.Disconnected          -= OnDisconnected;
        lidclient.OnNetworkDebugMessage -= OnNetworkDebug;
        lidclient = null;
    }
 private void Start()
 {
     m_client                = (LidClient)UnityEngine.Object.FindObjectOfType(typeof(LidClient));
     m_guimaster             = (GUI3dMaster)UnityEngine.Object.FindObjectOfType(typeof(GUI3dMaster));
     m_caseOpenGui           = (CaseOpeningGUI)UnityEngine.Object.FindObjectOfType(typeof(CaseOpeningGUI));
     m_steamInventoryHandler = (SteamInventoryHandler)UnityEngine.Object.FindObjectOfType(typeof(SteamInventoryHandler));
     if (Global.isSteamActive)
     {
         m_GameOverlayActivated = Callback <GameOverlayActivated_t> .Create(OnGameOverlayActivated);
     }
     RequestSteamInventory();
 }
Пример #10
0
    private void Start()
    {
        if (Global.isServer)
        {
            Object.DestroyImmediate(this);
            return;
        }
        GameObject gameObject = (GameObject)Object.Instantiate(m_chatLabel, base.transform.position + m_addVector, Quaternion.Euler(55f, 0f, 0f));

        gameObject.transform.parent = base.transform;
        m_label  = gameObject.GetComponent <ChatLabel>();
        m_client = (LidClient)Object.FindObjectOfType(typeof(LidClient));
    }
Пример #11
0
    private void OnEnable()
    {
        lidclient = new LidClient();
        lidclient.OnNetworkDebugMessage += OnNetworkDebug;
        lidclient.Connected             += OnConnected;
        lidclient.Disconnected          += OnDisconnected;
        UIManager.instance.btn_Connect.GetComponent <Button>().onClick.AddListener(btn_Connect_Click);
        UIManager.instance.btn_Disconnect.GetComponent <Button>().onClick.AddListener(btn_Disconnect_Click);
        UIManager.instance.btn_Back.GetComponent <Button>().onClick.AddListener(btn_Back_Click);

        UIManager.instance.btn_Disconnect.SetActive(false);
        UIManager.instance.btn_Back.SetActive(true);
    }
Пример #12
0
    private void Awake()
    {
        if (Global.isServer)
        {
            Object.DestroyImmediate(this);
            return;
        }
        m_isMale = ((!(null != m_bodyPrefab) || !m_bodyPrefab.name.Contains("female")) ? true : false);
        GameObject gameObject = SetupPart(m_bodyPrefab, base.transform, false);

        if (null != gameObject)
        {
            m_bodyRenderer = gameObject.GetComponentInChildren <SkinnedMeshRenderer>();
            if (null != m_bodyTexture)
            {
                m_bodyRenderer.material.mainTexture = m_bodyTexture;
            }
            else
            {
                m_bodyTexture = m_bodyRenderer.material.mainTexture;
            }
            m_boneHand.bone = gameObject.transform.Find(m_boneHand.name);
            m_boneArm.bone  = gameObject.transform.Find(m_boneArm.name);
            m_boneBody.bone = gameObject.transform.Find(m_boneBody.name);
            m_boneHead.bone = gameObject.transform.Find(m_boneHead.name);
            if (null != m_boneBody.bone && null != m_rucksackPrefab)
            {
                GameObject gameObject2 = SetupPart(m_rucksackPrefab, m_boneBody.bone, false);
                gameObject2.transform.localPosition = new Vector3(0.11f, -0.14f, 0f);
                gameObject2.transform.localRotation = Quaternion.Euler(270f, 90f, 0f);
            }
            if (null != m_boneHead.bone)
            {
                m_boneHead.lookPart = SetupPart(m_headPrefab, m_boneHead.bone, false);
                m_boneHead.lookPart.transform.localPosition = new Vector3(-0.04f, 0.02f, 0f);
                m_boneHead.lookPart.transform.localRotation = Quaternion.Euler(0f, 270f, 180f);
                m_headRenderer = m_boneHead.lookPart.GetComponentInChildren <Renderer>();
                m_headTexture  = m_headRenderer.material.mainTexture;
            }
            m_animator = gameObject.GetComponentInChildren <Animator>();
            m_animator.runtimeAnimatorController = m_animController;
            m_animator.Rebind();
        }
        m_client  = (LidClient)Object.FindObjectOfType(typeof(LidClient));
        m_lastPos = base.transform.position;
        m_sound   = GetComponent <CharSounds>();
        ChangeHandItem(m_defaultHandItemType);
        ChangeHeadItem(m_defaultHeadItemType);
        ChangeBodyItem(m_defaultBodyItemType);
        ChangeSkin(m_defaultSkinItemType);
    }
Пример #13
0
 private void Start()
 {
     m_client         = (LidClient)UnityEngine.Object.FindObjectOfType(typeof(LidClient));
     m_vignetteEffect = GetComponent <Vignetting>();
     m_overlayEffect  = GetComponent <ScreenOverlay>();
     if (2 > QualitySettings.GetQualityLevel())
     {
         SSAOEffect component = GetComponent <SSAOEffect>();
         if (null != component)
         {
             UnityEngine.Object.Destroy(component);
         }
     }
 }
Пример #14
0
 private void OnEnable()
 {
     pnl_Disconnect.SetActive(false);
     uimanager = UIManager.GetInstance;
     btn_Back.GetComponent <Button>().onClick.AddListener(btn_Back_Click);
     uimanager.ShowOrHideBtnBack(true);
     lidclient = new LidClient();
     lidclient.DebugMessage   += OnDebugMessage;
     lidclient.UnknownMessage += OnUnknownMessage;
     lidclient.Connected      += OnConnected;
     lidclient.Disconnected   += OnDisconnected;
     btn_Connect.GetComponent <Button>().onClick.AddListener(btn_Connect_Click);
     btn_Disconnect.GetComponent <Button>().onClick.AddListener(btn_Disconnect_Click);
 }
Пример #15
0
 private void Start()
 {
     m_guimaster        = (GUI3dMaster)UnityEngine.Object.FindObjectOfType(typeof(GUI3dMaster));
     m_client           = (LidClient)UnityEngine.Object.FindObjectOfType(typeof(LidClient));
     m_displayTexts     = new TextMesh[m_displayItems.Length];
     m_displayRenderers = new MeshCollider[m_displayItems.Length];
     m_displayDefIds    = new int[m_displayItems.Length];
     m_gui.SetActive(true);
     for (int i = 0; i < m_displayItems.Length; i++)
     {
         m_displayTexts[i]     = m_displayItems[i].GetComponentInChildren <TextMesh>();
         m_displayRenderers[i] = m_displayItems[i].GetComponentInChildren <MeshCollider>();
     }
     m_gui.SetActive(false);
 }
Пример #16
0
 private void Start()
 {
     m_path            = new NavMeshPath();
     m_client          = (LidClient)UnityEngine.Object.FindObjectOfType(typeof(LidClient));
     m_inventory       = (InventoryGUI)UnityEngine.Object.FindObjectOfType(typeof(InventoryGUI));
     m_communicator    = (QmunicatorGUI)UnityEngine.Object.FindObjectOfType(typeof(QmunicatorGUI));
     m_itemGui         = (ItemGUI)UnityEngine.Object.FindObjectOfType(typeof(ItemGUI));
     m_popupGui        = (PopupGUI)UnityEngine.Object.FindObjectOfType(typeof(PopupGUI));
     m_repairNpcs      = (RepairingNpc[])UnityEngine.Object.FindObjectsOfType(typeof(RepairingNpc));
     m_tooltipText     = m_tooltip.GetComponentInChildren <TextMesh>();
     m_tooltipHudRText = m_tooltipHudR.GetComponentInChildren <TextMesh>();
     m_tooltipHudLText = m_tooltipHudL.GetComponentInChildren <TextMesh>();
     ResetTarget();
     m_buySellPos = m_invalidPos;
 }
Пример #17
0
    private void Start()
    {
        float num  = 1.77777779f / ((float)Screen.width / (float)Screen.height);
        float num2 = ((float)Screen.width / (float)Screen.height / 1.77777779f + 1f) * 0.5f;
        int   num3 = (int)((float)Screen.width * m_length * num);
        int   num4 = 25;
        int   num5 = (int)((float)Screen.width * m_xOffset * num2);
        int   num6 = (int)((float)Screen.height * m_yOffset);

        m_chatRect   = new Rect(num5, num6, num3, num4);
        m_client     = (LidClient)Object.FindObjectOfType(typeof(LidClient));
        m_qmunicator = GetComponent <QmunicatorGUI>();
        m_unreadMsgIndicator.SetActive(false);
        m_unreadMsgIndicator2.SetActive(false);
    }
Пример #18
0
    private void Start()
    {
        m_guimaster     = (GUI3dMaster)UnityEngine.Object.FindObjectOfType(typeof(GUI3dMaster));
        m_client        = (LidClient)UnityEngine.Object.FindObjectOfType(typeof(LidClient));
        m_dayNightCycle = (DayNightCycle)UnityEngine.Object.FindObjectOfType(typeof(DayNightCycle));
        Vector3 localPosition = m_guiRoot.localPosition;

        m_zOffset = localPosition.z;
        if (null != m_volumeSlider)
        {
            m_volumeSlider.value = PlayerPrefs.GetFloat("prefVolume", 1f);
        }
        if (null != m_hintsToggle)
        {
            m_hintsToggle.isOn = ((PlayerPrefs.GetInt("prefHints", 1) == 1) ? true : false);
        }
        ActivateGui(m_activeApp);
    }
Пример #19
0
    private void Start()
    {
        m_freezeTime = Time.time + m_timeTillFreeze;
        m_client     = (LidClient)Object.FindObjectOfType(typeof(LidClient));
        if (!(null != m_client))
        {
            return;
        }
        Vector3 nearbyExplosion = m_client.GetNearbyExplosion(base.transform.position);

        if (Vector3.zero != nearbyExplosion)
        {
            Rigidbody[] componentsInChildren = GetComponentsInChildren <Rigidbody>();
            Rigidbody[] array = componentsInChildren;
            foreach (Rigidbody rigidbody in array)
            {
                rigidbody.AddExplosionForce(m_explosionForce, nearbyExplosion - Vector3.up, 10f);
            }
        }
    }
Пример #20
0
 private void OnEnable()
 {
     m_page = 0;
     m_invitedSteamIds.Clear();
     m_client = UnityEngine.Object.FindObjectOfType <LidClient>();
     if (null != m_client)
     {
         m_charData.Clear();
         for (int i = 0; i < m_client.m_playerData.Length; i++)
         {
             if (m_client.m_playerData[i].name != null && 1 < m_client.m_playerData[i].name.Length)
             {
                 m_charData.Add(m_client.m_playerData[i]);
             }
         }
     }
     else if (m_charData.Count == 0)
     {
         for (int j = 0; j < 90; j++)
         {
             CharData item = default(CharData);
             item.name = "Ethan " + j + " the very very great!";
             item.aid  = (ulong)(1337 + j);
             m_charData.Add(item);
         }
     }
     UpdateList();
     if (null != m_pageText)
     {
         m_pageText.text = "Page: <color=\"white\">";
         int num = (m_charData.Count - 1) / 36 + 1;
         for (int k = 0; k < num; k++)
         {
             TextMesh pageText = m_pageText;
             pageText.text = pageText.text + " " + (k + 1);
         }
         m_pageText.text += "</color>";
     }
     m_descriptionText.text = ((!m_invitePartyMode) ? LNG.Get("PLAYERS_ONLINE_DESC") : LNG.Get("PLAYERS_INVITE_DESC"));
 }
Пример #21
0
 private void Awake()
 {
     Application.runInBackground = true;
     Application.targetFrameRate = 100;
     Debug.Log(Environment.CommandLine);
     if (!Application.isEditor)
     {
         if (Environment.CommandLine.Contains("-batchmode"))
         {
             LidServer lidServer = (LidServer)UnityEngine.Object.FindObjectOfType(typeof(LidServer));
             lidServer.enabled           = true;
             lidServer.m_shutdownIfEmpty = Environment.CommandLine.Contains("-killonempty");
         }
         else
         {
             LidClient lidClient = (LidClient)UnityEngine.Object.FindObjectOfType(typeof(LidClient));
             lidClient.enabled = true;
         }
     }
     Screen.showCursor = true;
     Cursor.SetCursor(m_cursor, m_cursorOffset, CursorMode.Auto);
 }
 private void Start()
 {
     m_inCustomIp.text  = "127.0.0.1";
     m_client           = (LidClient)Object.FindObjectOfType(typeof(LidClient));
     m_txtFootNote.text = "Immune version: v1.0.1 || I.C.E version: v0.0.3b.";
     if (Application.isEditor && m_testMode)
     {
         m_steamId    = 13376uL;
         m_pwHash     = Util.Md5(m_steamId + "Version_0_4_8_B");
         m_playerName = "Hube'rt";
     }
     else if (SteamManager.Initialized)
     {
         Global.isSteamActive = true;
         CSteamID steamID = SteamUser.GetSteamID();
         m_steamId    = steamID.m_SteamID;
         m_pwHash     = Util.Md5(m_steamId + "Version_0_4_8_B");
         m_playerName = SteamFriends.GetPersonaName();
         SteamUserStats.RequestCurrentStats();
     }
     RedrawList();
     RefreshServers();
 }
Пример #23
0
 private void Start()
 {
     m_client = (LidClient)Object.FindObjectOfType(typeof(LidClient));
 }
	private void Start()
	{
		m_client = (LidClient)Object.FindObjectOfType(typeof(LidClient));
		m_msgBar = GetComponent<MessageBarGUI>();
		m_inventoryGui = (InventoryGUI)Object.FindObjectOfType(typeof(InventoryGUI));
	}
Пример #25
0
 private void Start()
 {
     m_guimaster   = (GUI3dMaster)Object.FindObjectOfType(typeof(GUI3dMaster));
     m_client      = (LidClient)Object.FindObjectOfType(typeof(LidClient));
     m_quitGameGui = (QuitGameGUI)Object.FindObjectOfType(typeof(QuitGameGUI));
 }
Пример #26
0
 private void Start()
 {
     m_client     = (LidClient)Object.FindObjectOfType(typeof(LidClient));
     m_startScale = m_barHealth.localScale;
     UpdateMissions(null);
 }
Пример #27
0
 private void Start()
 {
     m_client            = (LidClient)Object.FindObjectOfType(typeof(LidClient));
     m_markerStartOffset = m_mapMarker.localPosition;
 }