2023/11/29 6

[Giant vs Human 팀프로젝트, Mobile] 죽은 후 일정 시간 후 리스폰

cube로 죽은 후에 리스폰하는 걸 만들어봤다. using System.Collections; using System.Collections.Generic; using UnityEngine; using UnityEngine.UI; public class TestRespawn : MonoBehaviour { [SerializeField] private Button btnSuicide; [SerializeField] private GameObject playerGo; [SerializeField] private Slider slider; private bool onRespawn = false; // Start is called before the first frame update void Start() { t..

[Giant vs Human 팀프로젝트, Mobile] 대포가 주변에 있으면 대포발사 버튼이 활성화되고 버튼을 누르면 포탄이 발사

대포 근처에 도달하게되면 공격버튼이 활성화된다. using System.Collections; using System.Collections.Generic; using UnityEngine; using UnityEngine.UI; public class TestTowerAround : MonoBehaviour { [SerializeField] private Transform towerTr; [SerializeField] private Button btnTowerAttack; [SerializeField] private Transform bulletTr; [SerializeField] private GameObject bulletGo; private void Start() { this.btnTowerAtta..

[Giant vs Human 팀프로젝트, Mobile] 조이스틱을 통한 이동, 버튼을 누르면 공격

using System.Collections; using System.Collections.Generic; using UnityEngine; using UnityEngine.UI; public class TestJoystickMove : MonoBehaviour { [SerializeField] private VariableJoystick joystick; [SerializeField] private Rigidbody rBody; [SerializeField] private float speed = 3f; [SerializeField] private Button btnAttack; [SerializeField] private GameObject bulletGo; [SerializeField] privat..

[Giant vs Human 팀프로젝트, Meta Quest, VR, Oculus] UI 작업 - 게임시작 시 Start버튼 따라다니기, 남은 거리 보여주기 및 남은 시간 보여주기

그래서 머리가 움직여도 계속 얼굴 앞을 따라다니게 만들어준다. using System.Collections; using System.Collections.Generic; using TMPro; using UnityEngine; public class TestCountDownDistance : MonoBehaviour { [SerializeField] private Transform giantTr; //거인 위치 [SerializeField] private Transform endTr; // 목적지 [SerializeField] private TMP_Text countDownTxt; //남은시간 [SerializeField] private TMP_Text distanceTxt; //남은거리 [Seriali..

[Giant vs Human 팀프로젝트, Meta Quest, VR, Oculus] Haptic

Haptic 기능에서 이제 추가로 원하는 작업이 무엇이든 닿으면 진동이 울리게하는게 목표였다. Pointaable Unity Event Wrapper로 Select 되었을 때 진동기능을 해주었다. using System.Collections; using System.Collections.Generic; using UnityEngine; public class TestHaptic : MonoBehaviour { public void OnSelect() { this.vibratorSensor(); } private void OnTriggerEnter(Collider other) { this.vibratorSensor(); } private void vibratorSensor() { float primaryI..