Ejemplo n.º 1
0
    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>();
        }
    }
 internal static global::System.Runtime.InteropServices.HandleRef getCPtr(CForwardRenderer obj)
 {
     return((obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr);
 }
Ejemplo n.º 3
0
 internal static global::System.Runtime.InteropServices.HandleRef getCPtr(CForwardRenderer obj)
 {
     return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr;
 }
Ejemplo n.º 4
0
    void InitMesh()
    {
        if (!hasInit)
        {
            if (gameObject.transform.GetParent() != null)
            {
                hasInit = true;

                camInMapIcon = gameObject.transform.GetParent().gameObject;
                camInMapMesh = camInMapIcon.RequireComponent<CForwardRenderer>();
                originalColor = camInMapMesh.GetMaterial().GetColor();

                GameObject cameraCam = Common.GetSurveillancePlayerStaticCameraCam();
                camScript = GetScript<CameraCam>(cameraCam);
                ocuCam = Common.GetSurveillancePlayerCam();

                sound = gameObject.RequireComponent<CSound>();

                camInMapSelector = Common.GetCameraInMapSelector().RequireComponent<CForwardRenderer>();
                camInMapSelector.setEnabled(false);

                notActiveCamColor1 = new Color(0.1f, 0.1f, 0.1f, 1.0f);
                disabledCamColor1 = new Color(SharpMocha.YELLOW);
                enabledCamColor1 = new Color(SharpMocha.GREEN);

                isVisible = isvisible;
                isActive = isactive; // To call the set functions
                if (isactive)
                    isEnabled = isenabled;
            }
        }
    }