void Start() { Sound = GetComponent <AudioSource>(); GazeMover = GetComponent <MoveByGaze>(); InputManager.Instance.PushFallbackInputHandler(gameObject); }
// Desactive tous les composant du moveByGaze public void DeactivateElements(GameObject go) { if (once) { moveByGaze = go.GetComponent <MoveByGaze>(); spatialMapping = go.GetComponent <SpatialMappingCollisionDetector>(); placeByTap = go.GetComponent <PlaceByTap>(); rigidbody = go.GetComponent <Rigidbody>(); moveByGaze.enabled = false; spatialMapping.enabled = false; placeByTap.enabled = false; rigidbody.detectCollisions = false; once = false; } }