==구현목록== 0 : lock , 1 : open , 2 , current , 3 : complete (State) 에 따라 버튼 활성화 비활성화 default mode = 0 mode 1 = 클릭시 스테이지 오픈 mode 2 = 클릭시 스테이지 클리어 (별은 하나씩 증가) 이후 다음 스테이지 mode = 1 스테이지의 갯수가 18개를 넘어가면 다음페이지에 생성(다음 content 그리드) 유저의 상태 저장 (어느 스테이지까지 언락했고 몇개의 별을 획득하였는지 유저의 총 별갯수 / 스테이지 최대 별 갯수 UI 업데이트 코드 using System.Collections; using System.Collections.Generic; using UnityEngine; public class StageMain..
소리 조심 (배경음악이...;;) 코드 using Newtonsoft.Json; using System.Collections; using System.Collections.Generic; using System.IO; using UnityEngine; public class MissionMain : MonoBehaviour { public UIMissionDirector uIMissionDirector; private void Start() { MissionDataManager.instance.LoadData(); string path = string.Format("{0}/mission_info.json", Application.persistentDataPath); if (File.Exists(path)..
애니메이터로 제어한 부분 별의 이동 및 스케일 조절 bg 및 리본 알파 조절 및 생성 스크립트를 이용하여 제어한 부분 별이 도착했을때 해당 별의 자식오브젝트인 파티클 활성화 (코루틴 이용) 별이 전부 도착시 폭죽 (비스므리한) 효과 (코루틴 이용) 폭죽이 전부 터지고 나오는 마무리 효과 (코루틴 이용) 애니메이션 시작전 오브젝트 비활성화. 유니티 유저 인터페이스 에서 작업시 주의할점 애니메이터에 직접 오브젝트를 넣어 조절할시에는 key로 관리되기 때문에 이름이 중복인 오브젝트들은 하나만 제어가능 만약 두개 이상의 애니메이터에 등록된 하나의 오브젝트가 있다면 해당 오브젝트는 동작시 부모 애니메이터의 애니메이션을 따르는걸로 추정 ( 내 케이스에서는 스크립트로도 제어중이었기 때문에 우선 순위 부분은 좀더 확인..
캐릭터가 특정 z좌표인 월드좌표의 z까지 이동하면 멈추게 하는 코드 코루틴을 사용하여 제어 using System.Collections; using System.Collections.Generic; using UnityEngine; public class Masaki : MonoBehaviour { Coroutine routine; // Start is called before the first frame update void Start() { } // 코루틴을 정의하는 방법 IEnumerator Move() { while(true) { //if () // while 문 멈추려면 //{ // break; //} this.transform.Translate(new Vector3(0, 0, 3) * 1 * ..
PlayerContorller script using System.Collections; using System.Collections.Generic; using UnityEngine; public class PlayerController : MonoBehaviour { // Start is called before the first frame update void Start() { } public float radius; // Update is called once per frame void Update() { if (Input.GetKeyDown(KeyCode.LeftArrow)) { if(this.transform.position.x < -7f) { this.transform.position = ne..
코드에 들어가기 전 오늘 배운 내용 1. 프로젝트 생성후 해야하는것 레이아웃 설정 플랫폼 변경 해상도 설정 씬만들기 (GameScene) Textures 폴더에 리소스 넣기 리소스 배치 GameObject.find("게임 오브젝트명 문자열로") - 생성되어있는 오브젝트만 불러올수 있다. awake - 인스턴스가 생성될때 start 보다 먼저 호출된다. AudioSource : 컴포넌트 this.GetComponent().Play(); 로 사용 ( 유니티 컴포넌트 UI상에 Play On Awake 체크시 인스턴스가 생성되면 바로 재생됨) Input.GetMouseButtonDown &Input.GetMouseButton &Input.GetMouseButtonUp 각각 마우스를 누르면 & 마우스를 누르는 동..