Advertisement
Imeguras

unity problem

Sep 9th, 2016
109
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.82 KB | None | 0 0
  1. using UnityEngine;
  2. using System.Collections;
  3. using System.Collections.Generic;
  4.  
  5. public class CameraUsageCoisas : MonoBehaviour {
  6. public GameObject edificio;
  7. List<string> Alertas = new List<string>();
  8. public float setX;
  9. public float setY;
  10. public float setZ;
  11.  
  12. void Start () {
  13. transform.position = new Vector3 (500,100,500);
  14.  
  15. }
  16.  
  17.  
  18. void Update () {
  19. setX = Input.mousePosition.x;
  20. setZ = Input.mousePosition.y;
  21. transform.position = new Vector3 (setX, setZ, setY);
  22. if(GameObject.Find("edificio").GetComponent<vidaEdificioScratch>().atacado == true){
  23. setX = GameObject.Find ("edificio").GetComponent<vidaEdificioScratch> ().goX;
  24. setY = GameObject.Find ("edificio").GetComponent<vidaEdificioScratch> ().goY;
  25. setZ = GameObject.Find ("edificio").GetComponent<vidaEdificioScratch> ().goZ;
  26. }
  27. }
  28. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement