Exemplo n.º 1
0
    private void Start()
    {
        GlobalVars.Instance.DropedWeaponAllClear();
        GlobalVars.Instance.ApplyAudioSource();
        GlobalVars.Instance.SwitchFlashbang(bVis: false, Vector3.zero);
        InitializeFirstPerson();
        battleChat = GetComponent <BattleChat>();
        radar      = GetComponent <Radar>();
        timer      = GetComponent <BndTimer>();
        BrickManManager.Instance.OnStart();
        VfxOptimizer.Instance.SetupCamera();
        delayLoad = true;
        deltaTime = 0f;
        bndWall   = bndWallObject.GetComponent <BndWall>();
        GameObject gameObject = GameObject.Find("Main");

        if (gameObject != null)
        {
            ShooterTools component = gameObject.GetComponent <ShooterTools>();
            if (component != null)
            {
                component.DoBuff();
            }
        }
    }
Exemplo n.º 2
0
    public void DoOption(Room room)
    {
        float y    = crdOptionLT.y;
        int   num  = BndTimer.BuildPhaseTime(room.timelimit) / 60;
        int   num2 = BndTimer.BattlePhaseTime(room.timelimit) / 60;
        int   num3 = BndTimer.Repeat(room.timelimit);

        LabelUtil.TextOut(new Vector2(optionLX, y), StringMgr.Instance.Get("BUILD_PHASE_TIME"), "MiniLabel", Color.white, GlobalVars.txtEmptyColor, TextAnchor.MiddleCenter);
        GUI.Box(new Rect(optionRX - crdBox.x * 0.5f, y - crdBox.y * 0.5f, crdBox.x, crdBox.y), string.Empty, "BoxTextBg");
        LabelUtil.TextOut(new Vector2(optionRX, y), num.ToString() + StringMgr.Instance.Get("MINUTES"), "MiniLabel", clrValue, GlobalVars.txtEmptyColor, TextAnchor.MiddleCenter);
        y += diff_y;
        LabelUtil.TextOut(new Vector2(optionLX, y), StringMgr.Instance.Get("SHOOT_PHASE_TIME"), "MiniLabel", Color.white, GlobalVars.txtEmptyColor, TextAnchor.MiddleCenter);
        GUI.Box(new Rect(optionRX - crdBox.x * 0.5f, y - crdBox.y * 0.5f, crdBox.x, crdBox.y), string.Empty, "BoxTextBg");
        LabelUtil.TextOut(new Vector2(optionRX, y), num2.ToString() + StringMgr.Instance.Get("MINUTES"), "MiniLabel", clrValue, GlobalVars.txtEmptyColor, TextAnchor.MiddleCenter);
        y += diff_y;
        LabelUtil.TextOut(new Vector2(optionLX, y), StringMgr.Instance.Get("BND_REPEAT"), "MiniLabel", Color.white, GlobalVars.txtEmptyColor, TextAnchor.MiddleCenter);
        GUI.Box(new Rect(optionRX - crdBox.x * 0.5f, y - crdBox.y * 0.5f, crdBox.x, crdBox.y), string.Empty, "BoxTextBg");
        LabelUtil.TextOut(new Vector2(optionRX, y), num3.ToString() + StringMgr.Instance.Get("TIMES_UNIT"), "MiniLabel", clrValue, GlobalVars.txtEmptyColor, TextAnchor.MiddleCenter);
        y += diff_y;
        LabelUtil.TextOut(new Vector2(optionLX, y), StringMgr.Instance.Get("KILL_COUNT"), "MiniLabel", Color.white, GlobalVars.txtEmptyColor, TextAnchor.MiddleCenter);
        GUI.Box(new Rect(optionRX - crdBox.x * 0.5f, y - crdBox.y * 0.5f, crdBox.x, crdBox.y), string.Empty, "BoxTextBg");
        LabelUtil.TextOut(new Vector2(optionRX, y), room.goal.ToString() + StringMgr.Instance.Get("KILL"), "MiniLabel", clrValue, GlobalVars.txtEmptyColor, TextAnchor.MiddleCenter);
        y += diff_y;
        if (isRoom)
        {
            LabelUtil.TextOut(new Vector2(optionLX, y), StringMgr.Instance.Get("WEAPON_OPTION"), "MiniLabel", Color.white, GlobalVars.txtEmptyColor, TextAnchor.MiddleCenter);
            GUI.Box(new Rect(optionRX - crdBox.x * 0.5f, y - crdBox.y * 0.5f, crdBox.x, crdBox.y), string.Empty, "BoxTextBg");
            string text = (room.weaponOption >= 0 && room.weaponOption < weaponOptions.Length) ? StringMgr.Instance.Get(weaponOptions[room.weaponOption]) : string.Empty;
            LabelUtil.TextOut(new Vector2(optionRX, y), text, "MiniLabel", clrValue, GlobalVars.txtEmptyColor, TextAnchor.MiddleCenter);
            y += diff_y;
        }
        Color byteColor2FloatColor = GlobalVars.Instance.GetByteColor2FloatColor(25, 179, 0);

        LabelUtil.TextOut(new Vector2(crdOptionLT.x, y), StringMgr.Instance.Get("BREAK_INTO") + " : " + ((!room.isBreakInto) ? "off" : "on"), "MiniLabel", byteColor2FloatColor, GlobalVars.txtEmptyColor, TextAnchor.MiddleCenter);
        y += diff_y2;
        if (isRoom)
        {
            LabelUtil.TextOut(new Vector2(crdOptionLT.x, y), StringMgr.Instance.Get("TEAM_BALANCE") + " : " + ((!RoomManager.Instance.TeamBalance) ? "off" : "on"), "MiniLabel", byteColor2FloatColor, GlobalVars.txtEmptyColor, TextAnchor.MiddleCenter);
            y += diff_y2;
            if (BuildOption.Instance.AllowBuildGunInDestroyPhase())
            {
                LabelUtil.TextOut(new Vector2(crdOptionLT.x, y), StringMgr.Instance.Get("USE_BUILD_GUN") + " : " + ((!RoomManager.Instance.UseBuildGun) ? "off" : "on"), "MiniLabel", byteColor2FloatColor, GlobalVars.txtEmptyColor, TextAnchor.MiddleCenter);
                y += diff_y2;
            }
        }
    }