Esempio n. 1
0
 public void StartBuilding()
 {
     try
     {
         circleHand.SpawnCircle(4f, CircleTypes.ObjectSelection, CheckIfCorrect, Canceled);
         hand.SpawnInBuildParticles(spawnParticlesHere == null ? transform.position : spawnParticlesHere.position);
     }
     catch { }
 }
Esempio n. 2
0
 public void TeleportToLocation(Vector3 pos)
 {
     if (canTeleport)
     {
         changelocation.transform.position = pos;
         canTeleport = false;
         circleHandler.SpawnCircle(1.8f, CircleTypes.Teleportation, SetCanTeleportAgain, SetCanTeleportAgain);
     }
 }
Esempio n. 3
0
    public void Raycast()
    {
        if (Input.GetMouseButtonDown(0))
        {
            Ray ray = mcamera.ScreenPointToRay(Input.mousePosition);

            RaycastHit hit;

            if (Physics.Raycast(ray.origin, ray.direction, out hit, 20))
            {
                if (hit.transform.tag == "CubeInfo")
                {
                    cubeText.text = cubeInfo.StringInfo + "\n" + cubeInfo.FloatInfo.ToString();
                    infoImage.rectTransform.position = Camera.main.WorldToScreenPoint(hit.transform.position + new Vector3(0, 0, 1.5f));
                }
                else
                {
                    changelocation.transform.position = hit.point;
                    canTeleport = false;
                    circleHandler.SpawnCircle(1.8f, CircleTypes.Teleportation, SetCanTeleportAgain, SetCanTeleportAgain);
                }
            }
        }
    }