2021년 4학년 1학기 기업연계프로젝트2 컴퓨터소프트웨어공학과 <원광투어팀> 팀장 : 송유진 팀원 : 김나영, 이경희, 한유진
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

31 lines
837 B

5 years ago
  1. using System.Collections;
  2. using System.Collections.Generic;
  3. using UnityEngine;
  4. public class Turn_Move : MonoBehaviour {
  5. public int TurnX;
  6. public int TurnY;
  7. public int TurnZ;
  8. public int MoveX;
  9. public int MoveY;
  10. public int MoveZ;
  11. public bool World;
  12. // Use this for initialization
  13. void Start () {
  14. }
  15. // Update is called once per frame
  16. void Update () {
  17. if (World == true) {
  18. transform.Rotate(TurnX * Time.deltaTime,TurnY * Time.deltaTime,TurnZ * Time.deltaTime, Space.World);
  19. transform.Translate(MoveX * Time.deltaTime, MoveY * Time.deltaTime, MoveZ * Time.deltaTime, Space.World);
  20. }else{
  21. transform.Rotate(TurnX * Time.deltaTime,TurnY * Time.deltaTime,TurnZ * Time.deltaTime, Space.Self);
  22. transform.Translate(MoveX * Time.deltaTime, MoveY * Time.deltaTime, MoveZ * Time.deltaTime, Space.Self);
  23. }
  24. }
  25. }