doSomething.cs 743 B

12345678910111213141516171819202122232425262728293031323334
  1. using System.Collections;
  2. using System.Collections.Generic;
  3. using UnityEngine;
  4. using System.Runtime.InteropServices;
  5. public class doSomething : MonoBehaviour
  6. {
  7. bool active;
  8. public GameObject gameObjectA;
  9. // Start is called before the first frame update
  10. void Start()
  11. {
  12. }
  13. // Update is called once per frame
  14. void Update()
  15. {
  16. }
  17. public void forwardTow()
  18. {
  19. //GameObject gameObject = GameObject.Find("GameObject");
  20. gameObjectA.transform.position = new Vector3(gameObjectA.transform.position.x, gameObjectA.transform.position.y, gameObjectA.transform.position.z - 1);
  21. }
  22. public void openCamera()
  23. {
  24. gameObjectA.GetComponent<CameraTest>().ToOpenCamera();
  25. }
  26. }