public CFontRenderer GetSubtitleFont()
 {
     if (subtitle == null)
     {
         subtitle = GameObject.GetGameObjectByName(subtitleName).RequireComponent<CFontRenderer>();
         subtitle.setEnabled(false);
     }
     return subtitle;
 }
    public void OnStart()
    {
        sound = gameObject.RequireComponent<CSound>();

        pinPadDisplay = gameObject.RequireComponent<CFontRenderer>();
        pinPadDisplay.mText = "---";
        pinPadDisplayBg = gameObject.transform.GetParent().gameObject.RequireComponent<CMeshRenderer>();
        baseDisplayColor = pinPadDisplayBg.GetMaterial().GetColor();

        GameObject door = GameObject.GetGameObjectByName(doorName);
        if (door != null)
            doorScript = GetScript<DoorMain>(door);
        // doorTop = GameObject.GetGameObjectByName(doorBtmName);
        // doorBtm = GameObject.GetGameObjectByName(doorTopName);

        playerMouse = GetScript<Mouse>(Common.GetStealthPlayerMouse() );
        player = Common.GetStealthPlayer();
        playerScript = GetScript<FirstPersonPlayer>(player);
    }
    void Init()
    {
        if (!isInit)
        {
            isInit = true;

            defaultColor = SharpMocha.WHITE;
            defaultColor.a = alphaValue;
            greenColor = SharpMocha.GREEN;
            greenColor.a = alphaValue;
            redColor = SharpMocha.RED;
            redColor.a = alphaValue;

            GameObject controller = GameObject.GetGameObjectByName(Common.prefix + "PuzzleRoom3", false);
            if (controller != null)
                controllerScript = GetScript<DeathPanelController>(controller);
            else
                Logger.Log("Unable to find DeathPanelController");

            GameObject obj = Common.GetChildByName(gameObject, Common.prefix + "DeathPanelScreen");
            screen = obj.RequireComponent<CForwardRenderer>();
            obj = Common.GetChildByName(gameObject, Common.prefix + "DeathPanelText");
            numberText = obj.RequireComponent<CFontRenderer>();
        }
    }
示例#4
0
        void Init()
        {
            if (hasInit == true)
                return;

            //we assume on first update that the editor subsystem is valid
            GameObject tooltip = GameObject.From(ObjectFactory.getInstance().MakeNewGameObject("EditorMouseTooltip", EditorSubsystem.getInstance().GetEditorState(), true));
            mouseTooltipText = tooltip.RequireComponent<CFontRenderer>();
            mouseTooltipText.mPerspective = false;
            mouseTooltipText.mFontSize = 12;
            GameObject status = GameObject.From(ObjectFactory.getInstance().MakeNewGameObject("EditorStatusTooltip", EditorSubsystem.getInstance().GetEditorState(), true));
            editorStatusText = status.RequireComponent<CFontRenderer>();
            editorStatusText.mPerspective = false;
            editorStatusText.mFontSize = 25;
            editorStatusText.mFontScale = 0.5f;

            hasInit = true;

            //first time script reload when editor in progress
            MochaScriptSystem.ScriptSubsystemManaged.getInstance().Reload();
        }
示例#5
0
 public void OnStart()
 {
     fontComp = gameObject.RequireComponent<CFontRenderer>();
 }
示例#6
0
 internal static global::System.Runtime.InteropServices.HandleRef getCPtr(CFontRenderer obj)
 {
     return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr;
 }
 public void OnStart()
 {
     font = gameObject.RequireComponent<CFontRenderer>();
     text = "[live] recording...";
 }
 internal static global::System.Runtime.InteropServices.HandleRef getCPtr(CFontRenderer obj)
 {
     return((obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr);
 }
    public void OnStart()
    {
        sound = gameObject.RequireComponent<CSound>();

        consoleText = Common.GetSurveillancePlayerConsoleText().RequireComponent<CFontRenderer>();
        // consoleText.mFontSize = 60;
        // consoleText.mFontScale = 0.0024f;

        mBlinkingTimer = 0.0f;
        consoleText.mText = "";
        firstLineTextToDisplay = "";
        btmTextToDisplay = "";

        playerMouse = GetScript<Mouse>(Common.GetStealthPlayerMouse());
        player = Common.GetStealthPlayer();
        mBlinkingLight = GetScript<OcuConsoleBlinkingLight>(Common.GetConsoleBlinkingLight());

        mCenterPosForText = Common.GetConsoleCam().transform.position; // console: -10, 25
        mCenterPosForText.Z = consoleText.gameObject.transform.position.z;

        mExtraTexts = new List<GameObject>();

        if (mColorOfText == null || mColorOfText.Comp(SharpMocha.BLACK))
        {
            mColorOfText = mDColorOfText;
        }

        mHeaderTextObj = ObjectFactory.getInstance().Instantiate(Common.nameForFixedWidthText);
        mHeaderTextObj.SetName("ConsoleHeaderText");
        Vector3 headerPos = mCenterPosForText;
        headerPos.X -= 3.3f; //-13.40, 26.8
        headerPos.Y += 1.8f;
        mHeaderTextObj.transform.SetPosition(headerPos);
        mHeaderFont = mHeaderTextObj.GetComponent<CFontRenderer>();
        mHeaderFont.mText = "";
        mHeaderFont.mJustification = CFontRenderer.FONT_JUSTIFICATION.LEFT_JUSTIFIED;

        ChangeHeader(defaultHeaderText);

        mNextMessageTimer = 0.0f;
        mMessageQueue = new LinkedList<Tuple<String, float, bool> >();
        QueueMessage("System Initializing...", 0.0f, false, false);
        QueueMessage("Enabling Camera Systems.", 0.7f, false, false);
        QueueMessage("Enabling Map Systems.", 0.4f, false, false);
        QueueMessage("Enabling Door Security Systems.", 0.3f, false, false);
        QueueMessage("System Ready.", 0.7f, false, false);

        mTextToDisplay.AddFirst("> ");
        UpdateConsoleTextFromQueue();
        hasConsoleTextChanged = 0;
    }
示例#10
0
    public static void Reset()
    {
        isPaused = false;
        isOptions = false;

        pauseScreen = null;
        pauseScreenScript = null;
        stealth_player = null;
        stealthPlayerScript = null;
        stealthPlayerMesh = null;
        stealthPlayerCamera = null;
        stealthPlayerCamScript = null;
        stealthPlayerMouse = null;
        surveillancePlayerCam = null;
        surveillancePlayerStaticCameraCam = null;
        cameraCamScript = null;
        surveillancePlayerMouse = null;
        surveillancePlayerConsoleScreen = null;
        consoleScreenScript = null;
        surveillancePlayerConsoleText = null;
        surveillancePlayerConsoleCam = null;
        surveillancePlayerConsoleBlinkingLight = null;
        stealthPlayerFadeScreen = null;
        stickCam = null;
        stickCamInMap = null;
        stickCamInMapArea = null;
        stickyCamScript = null;
        camInMapSelector = null;
        noiseStatic = null;
        rcCar = null;
        rcCarCam = null;
        rcCarCamInMap = null;
        rcCarJoystick = null;

        camInMap = null;
        camInMapArea = null;
        camInWorld = null;

        cameraScreen = null;
        mapScreen = null;

        pauseOptionsScreen = null;
        fullscreenX = null;
        muteX = null;
        volumeFont = null;
    }
示例#11
0
 public static CFontRenderer GetMenuVolumeFont()
 {
     if (volumeFont == null)
     {
         GameObject obj = GameObject.GetGameObjectByName(prefix + "VolumeText");
         volumeFont = obj.RequireComponent<CFontRenderer>();
     }
     return volumeFont;
 }