Exemple #1
0
 private void Awake()
 {
     if (helloARController == null)
     {
         helloARController = FindObjectOfType <GoogleARCore.Examples.HelloAR.HelloARController>();
     }
 }
Exemple #2
0
 /// <summary>
 /// The Unity Awake() method.
 /// </summary>
 public void Awake()
 {
     // Enable ARCore to target 60fps camera capture frame rate on supported devices.
     // Note, Application.targetFrameRate is ignored when QualitySettings.vSyncCount != 0.
     if (!Instance)
     {
         Instance = this;
     }
     Application.targetFrameRate = 60;
 }
Exemple #3
0
 public void onbackButtonClilcked()
 {
     currentPanel.SetActive(false);
     homePanel.SetActive(true);
     currentPanel = homePanel;
     ARController = GameObject.Find("HelloAR Controller").GetComponent <GoogleARCore.Examples.HelloAR.HelloARController>();
     ARController.petObject.GetComponent <FollowGameObject>().followAllowed = false;
     Destroy(ARController.foodObject);
     Destroy(ARController.toyObject);
     //ARController.foodObject.SetActive(false);
     //ARController.toyObject.SetActive(false);
 }
Exemple #4
0
        public void Start()
        {
            if (instance != null && instance != this)
            {
                Destroy(this.gameObject);
                return;//Avoid doing anything else
            }

            instance = this;
            DontDestroyOnLoad(this.gameObject);
            Debug.Log("Starting " + this.name);
        }
Exemple #5
0
 public void onHomeWalkButtonClicked()
 {
     currentPanel.SetActive(false);
     walkPanel.SetActive(true);
     currentPanel = walkPanel;
     if (firstInWalkPanel)
     {
         string str = "Move and the cat will follow you";
         GameObject.Find("Canvas").GetComponent <TextController>().showInfo(str, 4f);
         firstInWalkPanel = false;
     }
     ARController = GameObject.Find("HelloAR Controller").GetComponent <GoogleARCore.Examples.HelloAR.HelloARController>();
     ARController.petObject.GetComponent <FollowGameObject>().followAllowed = true;
 }
Exemple #6
0
 public void onMoodMoodButtonClicked()
 {
     ARController          = GameObject.Find("HelloAR Controller").GetComponent <GoogleARCore.Examples.HelloAR.HelloARController>();
     ARController.SetModel = "toy";
     Debug.Log("playing clicked");
 }