コード例 #1
0
    public void OnStart()
    {
        mSound = gameObject.RequireComponent<CSound>();

        // scale should be 0.221f, 0124f
        menuPointer = GameObject.GetGameObjectByName(Common.prefix + menuPointerName);
        menuPointer.transform.SetParent(null);

        Common.SetOpacityToGameObject(0.0f, menuPointer);
        menuPointerInitPos = new Vector3(-2.75f, 1.23f, -0.05f);
        menuPointer.transform.SetPosition(menuPointerInitPos);

        screenImageMesh = gameObject.RequireComponent<CDiffuseRenderer>();
        screenImageMesh.GetMaterial().SetColor(new Color(1.0f, 1.0f, 1.0f, 0.0f));

        optionsPos = new Vector3(0.0f, -90.0f, 0.0f); // Position to look at options menu
        pauseOptions = Common.GetPauseOptionsScreen().RequireComponent<CDiffuseRenderer>();
        Common.GetPauseOptionsScreen().transform.SetPosition(optionsPos);
        pauseOptions.setEnabled(false);
        GameObject pausePointerObj = Common.GetChildByName(pauseOptions.gameObject, "menuPointer");
        pauseMenuPointer = pausePointerObj.RequireComponent<CDiffuseRenderer>();
        pauseMenuPointer.setEnabled(false);
        Common.GetMenuFullscreenX().setEnabled(false); // Init all options stuff to invisible
        Common.GetMenuMuteX().setEnabled(false);
        Common.GetMenuVolumeFont().setEnabled(false);

        fadeScreen = GameObject.GetGameObjectByName(Common.prefix + fadeScreenName);
        Common.SetOpacityToGameObject(fadeOpacity, fadeScreen); // Start with full black

        optionsFadeScreen = GameObject.GetGameObjectByName(Common.prefix + optionsFadeScreenName);
        Common.SetOpacityToGameObject(fadeOpacity, optionsFadeScreen);

        mLoadingFirstTime = true;
        mPrevMainMenuState = -1;
        mMainMenuState = -1;

        mPointerPosition = new List<Vector2>();
        // 0.227, 0.115
        mPointerPosition.Add(new Vector2(-0.0753f, 0.028f));
        mPointerPosition.Add(new Vector2(-0.0753f, 0.0233f));
        mPointerPosition.Add(new Vector2(-0.0753f, 0.0186f));
        mPointerPosition.Add(new Vector2(-0.0753f, 0.0139f));
        mPointerPosition.Add(new Vector2(-0.0753f, -0.0051f)); // wrong

        mPointerPosForMainMenuConfirmation = new List<Vector2>();
        mPointerPosForMainMenuConfirmation.Add(new Vector2(-0.0693f, 0.0043f));
        mPointerPosForMainMenuConfirmation.Add(new Vector2(-0.0693f, -0.0004f));

        mPointerPosForQuitConfirmation = new List<Vector2>();
        mPointerPosForQuitConfirmation.Add(new Vector2(-0.0693f, -0.0145f));
        mPointerPosForQuitConfirmation.Add(new Vector2(-0.0693f, -0.0193f));

        mCurrPointerPos = mPointerPosition[0];

        // When going to How To Play / Options, change camera to Ortho, at (0,0,0), with 0 rotation
        // Bring up the ortho image
    }
コード例 #2
0
    public void OnStart()
    {
        mSound = gameObject.RequireComponent<CSound>();
        mSound.PlayIndependentEvent("MUSIC_HUB_LOOP.vente", false, 0);

        menuPointer = GameObject.GetGameObjectByName(Common.prefix + menuPointerName);
        Common.SetOpacityToGameObject(0.0f, menuPointer);
        menuPointerInitPos = new Vector3(-2.75f, 1.23f, -0.11f);
        menuPointer.transform.SetPosition(menuPointerInitPos);
        screenImage = GameObject.GetGameObjectByName(Common.prefix + screenImageName);
        screenImageMesh = screenImage.RequireComponent<CDiffuseRenderer>();
        fadeScreen = GameObject.GetGameObjectByName(Common.prefix + fadeScreenName);
        Common.SetOpacityToGameObject(fadeOpacity, fadeScreen); // Start with full black

        Common.GetMenuFullscreenX().setEnabled(false);
        Common.GetMenuMuteX().setEnabled(false);
        Common.GetMenuVolumeFont().setEnabled(false);

        mLoadingFirstTime = true;
        mPrevMainMenuState = -1;
        mMainMenuState = -1;
    }
コード例 #3
0
 internal static global::System.Runtime.InteropServices.HandleRef getCPtr(CDiffuseRenderer obj)
 {
     return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr;
 }
コード例 #4
0
 internal static global::System.Runtime.InteropServices.HandleRef getCPtr(CDiffuseRenderer obj)
 {
     return((obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr);
 }
コード例 #5
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;
    }
コード例 #6
0
 public static CDiffuseRenderer GetMenuMuteX()
 {
     if (muteX == null)
     {
         GameObject xObj = GameObject.GetGameObjectByName(prefix + "MuteX");
         muteX = xObj.RequireComponent<CDiffuseRenderer>();
     }
     return muteX;
 }
コード例 #7
0
 public static CDiffuseRenderer GetMenuFullscreenX()
 {
     if (fullscreenX == null)
     {
         GameObject xObj = GameObject.GetGameObjectByName(prefix + "FullscreenX");
         fullscreenX = xObj.RequireComponent<CDiffuseRenderer>();
     }
     return fullscreenX;
 }