Пример #1
0
    //-----------------------------------------------------
    void Awake()
    {
        m_bgImgMgr = m_backgroundImg.GetComponent<BgImgManager>();
        if(m_bgImgMgr == null) Debug.LogError(DTAG+"BgImgManager"+PC.MISSING_REF);
        if(m_mode2D   == null) Debug.LogError(DTAG+"Mode2D"      +PC.MISSING_REF);
        if(m_mainCam  == null) Debug.LogError(DTAG+"MainCam"     +PC.MISSING_REF);
        if(m_lineTex  == null) Debug.LogError(DTAG+"Line texture"+PC.MISSING_REF);

        m_vertexTex      = (Texture2D) Resources.Load("tracage/OS_DOT_ADD");
        m_vertexTex_Sub  = (Texture2D) Resources.Load("tracage/OS_DOT_SUB");
        m_tmpLineTex     = (Texture2D) Resources.Load("tracage/OS_TRACE_ADD");
        m_tmpLineTex_Sub = (Texture2D) Resources.Load("tracage/OS_TRACE_SUB");

        GameObject GUITexLoupe = GameObject.Find("Background/loupe/GUITexLoupe");
        _loupeGUI = GUITexLoupe.GetComponent<LoupeGUI>();

        m_ignoreClick      = true;
        m_opengl           = SystemInfo.graphicsDeviceVersion.Contains("OpenGL");

        m_lines            = new List<Line>();
        m_lineStarted      = false;
        m_tmpLine          = null;
        m_selectedLine     = null;

        m_loupeActive      = false;
        m_loupeClickTime   = 0;
        m_loupeTex         = new Texture2D(64, 64, TextureFormat.RGB24, false);
        m_loupeGUI         = GUITexLoupe.GetComponent<GUITexture>();
        m_loupeRenderTex   = null;
        m_loupeGUI.texture = m_loupeTex;
        m_aaBkup		   = QualitySettings.antiAliasing;

        m_outlineStyle = new GUIStyle(m_textStyle);
        m_outlineStyle.normal.textColor = m_textOutlineColor;

        this.enabled       = false;
    }
Пример #2
0
		// Use this for initialization
		void Start ()
		{

			_oldMaterial = new Hashtable();
			mainNode = GameObject.Find("MainNode");
			mainScene = GameObject.Find("MainScene");
			camPivot = GameObject.Find("camPivot");

			rotationbtn = new animatedGUI (0.02f, animatedGUI.TypeOfGUI.repeatButton);
			rotationbtn.loadFrom ("AnimatedBtns/rotationBtn");
			mainCamera = Camera.main;
			rotateBG.width = UIRotate;
			rotateBG.height = UIRotate;
			UIbackground = new Rect (/*Screen.width - (1.1f*UIRotate)*/0, (Screen.height/2)- ((1.1f*UIRotate)/2), (1.1f*UIRotate), (1.1f*UIRotate));
			_iosShadows = GameObject.Find("iosShadows");

			hud = mainScene.GetComponent<GUIMenuMain>();
			_imgMgr = GameObject.Find("backgroundImage").GetComponent<BgImgManager>();

			m_rotateAllInit = false;
			m_moveStart = false;
			
		//	GameObject gameobjet =  GameObject.Find("mainCam");
		//	if(gameobjet!=null)
		//		_mode2D = (MonoBehaviour) gameobjet.transform.GetComponent("mode2D");
		}