Exemplo n.º 1
0
        public MarkerInstance move(Guid id, Vector3 location)
        {
            MarkerInstance instance = get(id);

            instance.SetLocation(location);
            return(instance);
        }
Exemplo n.º 2
0
        public Guid remove(Guid id)
        {
            MarkerInstance instance = get(id);

            Destroy(instance.GameObject);
            Instances.Remove(id);

            return(id);
        }
Exemplo n.º 3
0
        public MarkerInstance get(Guid id)
        {
            MarkerInstance instance = Instances[id];

            if (instance != null)
            {
                return(instance);
            }
            throw new KeyNotFoundException("Could not find the instance");
        }
Exemplo n.º 4
0
        public void place(float[] inputCoordinates, GameObject prefab = null)
        {
            if (prefab == null)
            {
                prefab = Prefab;
            }

            if (prefab != null)
            {
                RaycastHit     hit        = raycaster.getHit(inputCoordinates, LayerMask, MaxDistance, ViewCamera);
                GameObject     gameObject = Instantiate(prefab, hit.point, Quaternion.identity);
                MarkerInstance instance   = new MarkerInstance(gameObject, hit.point);
                Instances[instance.id] = instance;
            }
        }