示例#1
0
 public void StartBuilding()
 {
     try
     {
         circleHand.SpawnCircle(4f, CircleTypes.ObjectSelection, CheckIfCorrect, Canceled);
         hand.SpawnInBuildParticles(spawnParticlesHere == null ? transform.position : spawnParticlesHere.position);
     }
     catch { }
 }
示例#2
0
 public void TeleportToLocation(Vector3 pos)
 {
     if (canTeleport)
     {
         changelocation.transform.position = pos;
         canTeleport = false;
         circleHandler.SpawnCircle(1.8f, CircleTypes.Teleportation, SetCanTeleportAgain, SetCanTeleportAgain);
     }
 }
示例#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);
                }
            }
        }
    }