void Start()
    {
        targetBuildingBehaviour = GetComponent <UserDefinedTargetBuildingBehaviour>();

        //将class CubeController注册到事件system
        targetBuildingBehaviour.RegisterEventHandler(this);
    }
    void Start()
    {
        m_TargetBuildingBehaviour = GetComponent <UserDefinedTargetBuildingBehaviour>();

        if (m_TargetBuildingBehaviour)
        {
            m_TargetBuildingBehaviour.RegisterEventHandler(this);
            Debug.Log("Registering User Defined Target event handler.");
        }

        m_FrameQualityMeter = FindObjectOfType <FrameQualityMeter>();
        m_TrackableSettings = FindObjectOfType <TrackableSettings>();
        m_QualityDialog     = FindObjectOfType <QualityDialog>();

        if (m_QualityDialog)
        {
            m_QualityDialog.GetComponent <CanvasGroup>().alpha = 0;
        }
        textobj  = GameObject.Find("wordobj");
        musicobj = GameObject.Find("music");
        status   = GameObject.Find("status");
        tempObj  = GameObject.Find("TargetBuilderCanvas");
        obj      = tempObj.GetComponent <rectangle>();
        //   tm = textobj.GetComponent<TextMesh>();
        //tm.text = "hello";
        //textobj.SetActive(false);
        // print(textobj);
        // print(textobj.GetComponent<TextMesh>().text);
    }
示例#3
0
    public void Start()
    {
        _targetBuilder = GetComponent<UserDefinedTargetBuildingBehaviour>();

        if (_targetBuilder != null)
            _targetBuilder.RegisterEventHandler(this);
    }
示例#4
0
    public void Start()
    {
        takePhoto = GameObject.Find("takePhoto");
        //viewGraphs = GameObject.Find("viewGraphs");
        editGraph = GameObject.Find("editGraph");
        //shareGraph = GameObject.Find("shareGraph");
        backBtn    = GameObject.Find("backBtn");
        form       = GameObject.Find("Form");
        loadScreen = GameObject.Find("LoadScreen");

        backBtn.SetActive(false);
        form.SetActive(false);
        //shareGraph.SetActive(false);
        editGraph.SetActive(false);
        loadScreen.SetActive(false);

        mTargetBuildingBehaviour = GetComponent <UserDefinedTargetBuildingBehaviour>();
        if (mTargetBuildingBehaviour)
        {
            mTargetBuildingBehaviour.RegisterEventHandler(this);
            Debug.Log("Registering User Defined Target event handler.");
        }

        mTrackableSettings = FindObjectOfType <TrackableSettings>();
        mQualityDialog     = FindObjectOfType <QualityDialog>();
        if (mQualityDialog)
        {
            mQualityDialog.gameObject.SetActive(false);
        }
    }
示例#5
0
    public ImageTargetBehaviour targetBehaviour;      // public so we can assign in editor

    void Start()
    {
        udt_targetBuildingBehavior = GetComponent <UserDefinedTargetBuildingBehaviour>(); // get UserDefinedTargetingBehaior from current Game Object
        if (udt_targetBuildingBehavior)
        {                                                                                 // if behavior is found (!== null)
            udt_targetBuildingBehavior.RegisterEventHandler(this);                        // register this class as our event handler
        }
    }
示例#6
0
 // Use this for initialization
 void Start()
 {
     m_TargetBuildingBehaviour = this.GetComponent <UserDefinedTargetBuildingBehaviour>();
     if (m_TargetBuildingBehaviour != null)
     {
         m_TargetBuildingBehaviour.RegisterEventHandler(this);
     }
 }
示例#7
0
 void Start()
 {
     udt_targetBuildingBehaviour = GetComponent <UserDefinedTargetBuildingBehaviour>(); // get UserDefinedTargetBuildingBehaviour from currrent game object.
     if (udt_targetBuildingBehaviour)                                                   // UserDefinedTargetBuildingBehaviour has been found
     {
         udt_targetBuildingBehaviour.RegisterEventHandler(this);
     }
 }
示例#8
0
 // Start is called before the first frame update
 void Start()
 {
     udt_targetBuildingBehavior = GetComponent<UserDefinedTargetBuildingBehaviour>();
     if (udt_targetBuildingBehavior) //UserDefinedTargetBuildBehaviour has been found
     {
         udt_targetBuildingBehavior.RegisterEventHandler(this);
     }
 }
示例#9
0
    void Start()
    {
        brush       = GameObject.Find("brush");
        stick       = GameObject.Find("Cylinder");
        ARbutton    = GameObject.Find("BuildButton");
        Titlebar    = GameObject.Find("TitleBar");
        paintButton = GameObject.Find("paintButton");


        blue   = GameObject.Find("blueColor");
        green  = GameObject.Find("greenColor");
        red    = GameObject.Find("redColor");
        eraser = GameObject.Find("eraser");


        brush.SetActive(false);
        stick.SetActive(false);
        paintButton.SetActive(false);
        blue.SetActive(false);
        green.SetActive(false);
        red.SetActive(false);
        eraser.SetActive(false);

        m_TargetBuildingBehaviour = GetComponent <UserDefinedTargetBuildingBehaviour>();

        if (m_TargetBuildingBehaviour)
        {
            m_TargetBuildingBehaviour.RegisterEventHandler(this);
            Debug.Log("Registering User Defined Target event handler.");
        }

        m_FrameQualityMeter = FindObjectOfType <FrameQualityMeter>();
        m_TrackableSettings = FindObjectOfType <TrackableSettings>();
        m_QualityDialog     = FindObjectOfType <QualityDialog>();
        m_InfoMesssage      = FindObjectOfType <InfoMessage>();
        // titlebar = GameObject.Find("TitleBar");

        frameLow  = GameObject.Find("Low");
        frameMed  = GameObject.Find("Med");
        frameHigh = GameObject.Find("High");

        qualityTitle = GameObject.Find("Title");

        if (qualityTitle)
        {
            qualityTitle.SetActive(true);
        }

        if (m_InfoMesssage)
        {
            m_InfoMesssage.GetComponent <CanvasGroup>().alpha = 1;
        }

        if (m_QualityDialog)
        {
            m_QualityDialog.GetComponent <CanvasGroup>().alpha = 0;
        }
    }
    /// <summary>
    /// Registers this component as a handler for UserDefinedTargetBuildingBehaviour events
    /// </summary>
    public void Start()
	{
        mTargetBuildingBehaviour = GetComponent<UserDefinedTargetBuildingBehaviour>();
        if (mTargetBuildingBehaviour)
        {
            mTargetBuildingBehaviour.RegisterEventHandler(this);
            Debug.Log ("Registering to the events of IUserDefinedTargetEventHandler");
        }
	}
示例#11
0
 void Start()
 {
     mUseTargetBehavior = this.GetComponent <UserDefinedTargetBuildingBehaviour>();
     if (mUseTargetBehavior)
     {
         mUseTargetBehavior.RegisterEventHandler(this);
     }
     frameQualityDisplay = FindObjectOfType <FrameQuality>();
 }
示例#12
0
 private void Start()
 {
     _targetBuildingBehaviour = GetComponent <UserDefinedTargetBuildingBehaviour>();
     if (_targetBuildingBehaviour)
     {
         _targetBuildingBehaviour.RegisterEventHandler(this);
         Debug.Log("Registering User Defined Target event handler.");
     }
 }
 void Start()
 {
     mTargetBuildingBehaviour = GetComponent <UserDefinedTargetBuildingBehaviour> ();
     if (mTargetBuildingBehaviour)
     {
         mTargetBuildingBehaviour.RegisterEventHandler(this);
     }
     mTrackableSettings = FindObjectOfType <TrackableSettings> ();
 }
    }///

    public void Init()
    {
        mTargetBuildingBehaviour = GetComponent <UserDefinedTargetBuildingBehaviour>();
        if (mTargetBuildingBehaviour)
        {
            mTargetBuildingBehaviour.RegisterEventHandler(this);
            Debug.Log("Registering to the events of IUserDefinedTargetEventHandler");
        }
    }
示例#15
0
 void Start()
 {
     UDT_BuildingBehaviour = GetComponent <UserDefinedTargetBuildingBehaviour>();
     if (UDT_BuildingBehaviour != null)
     {
         UDT_BuildingBehaviour.RegisterEventHandler(this);
     }
     _farmequalitymeter = FindObjectOfType <FrameQualityMeter>();
 }
示例#16
0
 void Start()
 {
     m_UserDefinedTarget = this.GetComponent <UserDefinedTargetBuildingBehaviour>();//获取挂载这个脚本的物体上的UserDefinedTargetBuildingBehaviour脚本
     m_FrameQuality      = ImageTargetBuilder.FrameQuality.FRAME_QUALITY_NONE;
     if (m_UserDefinedTarget != null)
     {
         m_UserDefinedTarget.RegisterEventHandler(this);
     }
 }
 // Use this for initialization
 void Start()
 {
     mTargetBuildingBehaviour = GetComponent<UserDefinedTargetBuildingBehaviour>();
     if (mTargetBuildingBehaviour)
     {
         mTargetBuildingBehaviour.RegisterEventHandler(this);
     }
     VuforiaBehaviour.Instance.RegisterVuforiaStartedCallback(OnVuforiaStarted);
     VuforiaBehaviour.Instance.RegisterOnPauseCallback(OnPaused);
 }
示例#18
0
 private void Start()
 {
     targetBehaviour            = GetComponent <ImageTargetBehaviour>();
     targetBehaviour.enabled    = false;
     udt_targetBuildingBehavior = GetComponent <UserDefinedTargetBuildingBehaviour>(); //get UserDefinedTargetBuilding from current gameObject4
     if (udt_targetBuildingBehavior)                                                   //if not null
     {
         udt_targetBuildingBehavior.RegisterEventHandler(this);
     }
 }
示例#19
0
 // Use this for initialization
 void Start()
 {
     mTargetBuildingBehaviour = GetComponent <UserDefinedTargetBuildingBehaviour>();
     if (mTargetBuildingBehaviour)
     {
         mTargetBuildingBehaviour.RegisterEventHandler(this);
     }
     VuforiaBehaviour.Instance.RegisterVuforiaStartedCallback(OnVuforiaStarted);
     VuforiaBehaviour.Instance.RegisterOnPauseCallback(OnPaused);
 }
    /// <summary>
    /// Registers this component as an event handler at the UserDefinedTargetBuildingBehaviour
    /// </summary>
    void Start()
    {
        // intialize the ErrorMsg class
        ErrorMsg.Init();

        mTargetBuildingBehaviour = GetComponent <UserDefinedTargetBuildingBehaviour>();
        if (mTargetBuildingBehaviour)
        {
            mTargetBuildingBehaviour.RegisterEventHandler(this);
        }
    }
    private void Start()
    {
        UserDefinedTargetBuildingBehaviour userDefinedTargetBuildingBehaviour = GetComponent <UserDefinedTargetBuildingBehaviour>();

        if (userDefinedTargetBuildingBehaviour != null)
        {
            userDefinedTargetBuildingBehaviour.RegisterEventHandler(this);
        }

        // disable this marker at the start
        GetComponentInChildren <ImageTargetBehaviour>().enabled = false;
    }
    /// <summary>
    /// Registers this component as a handler for UserDefinedTargetBuildingBehaviour events
    /// </summary>
    public void Init()
    {
        mTargetBuildingBehaviour = GetComponent<UserDefinedTargetBuildingBehaviour>();
        if (mTargetBuildingBehaviour)
        {
            mTargetBuildingBehaviour.RegisterEventHandler(this);
            Debug.Log ("Registering to the events of IUserDefinedTargetEventHandler");
        }

        mNewUserDefinedTargetButton = MakeUIButton();
        mNewUserDefinedTargetButton.TappedOn += OnTappedOnNewTargetButton;
    }
示例#23
0
    void Start()
    {
        m_TargetBuildingBehaviour = GetComponent <UserDefinedTargetBuildingBehaviour>();

        if (m_TargetBuildingBehaviour)
        {
            m_TargetBuildingBehaviour.RegisterEventHandler(this);
            Debug.Log("Registering User Defined Target event handler.");
        }

        m_TrackableSettings = FindObjectOfType <TrackableSettings>();
    }
示例#24
0
    /// <summary>
    /// Registers this component as a handler for UserDefinedTargetBuildingBehaviour events
    /// </summary>
    public void Init()
    {
        mTargetBuildingBehaviour = GetComponent <UserDefinedTargetBuildingBehaviour>();
        if (mTargetBuildingBehaviour)
        {
            mTargetBuildingBehaviour.RegisterEventHandler(this);
            Debug.Log("Registering to the events of IUserDefinedTargetEventHandler");
        }

        mNewUserDefinedTargetButton           = MakeUIButton();
        mNewUserDefinedTargetButton.TappedOn += OnTappedOnNewTargetButton;
    }
示例#25
0
        private void Start()
        {
            _targetBuildingBehaviour = GetComponent <UserDefinedTargetBuildingBehaviour>();

            if (_targetBuildingBehaviour)
            {
                _targetBuildingBehaviour.RegisterEventHandler(this);
                Debug.Log("Registering User Defined Target event handler.");
            }
            VuforiaARController.Instance.RegisterVuforiaStartedCallback(OnVuforiaStarted);
            VuforiaARController.Instance.RegisterOnPauseCallback(OnPaused);
        }
示例#26
0
    void Start()
    {
        m_TargetBuildingBehaviour = GetComponent <UserDefinedTargetBuildingBehaviour>();

        if (m_TargetBuildingBehaviour)
        {
            m_TargetBuildingBehaviour.RegisterEventHandler(this);
            Debug.Log("Registering User Defined Target event handler.");
        }

        m_FrameQualityMeter = FindObjectOfType <FrameQualityMeter>();
    }
示例#27
0
    void Start()
    {
        m_TargetBuildingBehaviour = GetComponent <UserDefinedTargetBuildingBehaviour>();
        debugMessage = GetComponent <UDTMessageBehavior> ();

        if (m_TargetBuildingBehaviour)
        {
            m_TargetBuildingBehaviour.RegisterEventHandler(this);
            Debug.Log("Registering User Defined Target event handler.");
            debugMessage.SetDebugText("Registering User Defined Target event handler.");
        }

        m_FrameQualityMeter = FindObjectOfType <FrameQualityMeter>();
        m_TrackableSettings = FindObjectOfType <TrackableSettings>();
    }
示例#28
0
    public void Start()
    {
        mTargetBuildingBehaviour = GetComponent <UserDefinedTargetBuildingBehaviour>();
        if (mTargetBuildingBehaviour)
        {
            mTargetBuildingBehaviour.RegisterEventHandler(this);
            Debug.Log("Registering User Defined Target event handler.");
        }

        mTrackableSettings = FindObjectOfType <TrackableSettings>();

        GameObject BuilderBtn = GameObject.Find("TargetBuilderUI/TargetBuilderCanvas/BuildPanel/BuildButton");

        BuilderBtnImg = BuilderBtn.GetComponent <ui.Image>();
    }
示例#29
0
    void Start()
    {
        mTargetBuildingBehaviour = GetComponent <UserDefinedTargetBuildingBehaviour>();
        if (mTargetBuildingBehaviour)
        {
            mTargetBuildingBehaviour.RegisterEventHandler(this);
            Debug.Log("Registering User Defined Target event handler.");
        }

        TargetCreated = false;

        if (!(udtFrameQualityIndicator = GameObject.Find("UDTFrameQualityIndicator")))
        {
            Debug.Log("<color=yellow>ALERT: The UDT qualityIndicator is null and can't be displayed.</color>");
        }
    }
示例#30
0
    public void Start()
    {
        mTargetBuildingBehaviour = GetComponent <UserDefinedTargetBuildingBehaviour>();
        if (mTargetBuildingBehaviour)
        {
            mTargetBuildingBehaviour.RegisterEventHandler(this);
            Debug.Log("Registering User Defined Target event handler.");
        }

        mTrackableSettings = FindObjectOfType <TrackableSettings>();
        mQualityDialog     = FindObjectOfType <QualityDialog>();
        if (mQualityDialog)
        {
            mQualityDialog.gameObject.SetActive(false);
        }
    }
示例#31
0
    void Start()
    {
        m_TargetBuildingBehaviour = GetComponent <UserDefinedTargetBuildingBehaviour>();

        if (m_TargetBuildingBehaviour)
        {
            m_TargetBuildingBehaviour.RegisterEventHandler(this);
            Debug.Log("Registering User Defined Target event handler.");
        }

        m_FrameQualityMeter = FindObjectOfType <FrameQualityMeter>();
        m_QualityDialog     = FindObjectOfType <QualityDialog>();

        if (m_QualityDialog)
        {
            m_QualityDialog.GetComponent <CanvasGroup>().alpha = 0;
        }
    }
示例#32
0
    void Start()
    {
        m_TargetBuildingBehaviour = GetComponent <UserDefinedTargetBuildingBehaviour>();

        if (m_TargetBuildingBehaviour)
        {
            m_TargetBuildingBehaviour.RegisterEventHandler(this);
            Debug.Log("Registering User Defined Target event handler.");
        }

        measureDistance = FindObjectOfType <MeasureDistance>();

        m_QualityDialog = FindObjectOfType <QualityDialog>();

        if (m_QualityDialog)
        {
            //hiding Quality message at the begining if its enabled
            m_QualityDialog.GetComponent <CanvasGroup>().alpha = 0;
        }
    }
示例#33
0
 void Start()
 {
     buildingBehaviour = GetComponent <UserDefinedTargetBuildingBehaviour> ();
     buildingBehaviour.RegisterEventHandler(this);
 }