전체 글
-
04/13 유니티 쿠키런 제작 2유니티 2021. 4. 13. 17:44
체력바 추가 죽는 애니메이션 추가 using System.Collections; using System.Collections.Generic; using UnityEngine; using UnityEngine.EventSystems; using UnityEngine.UI; public class PlayerController : MonoBehaviour { public float jumpForce = 700f; private int jumpCount = 0; private bool isGrounded = false; private bool isDoubleJump = false; private bool isSlide = false; private Rigidbody2D playerRigidbody; priva..
-
04/13 유니티 쿠키런 제작 1유니티 2021. 4. 13. 14:34
배경 이동 캐릭터 점프, 슬라이드 구현 using System.Collections; using System.Collections.Generic; using UnityEngine; using UnityEngine.EventSystems; using UnityEngine.UI; public class PlayerController : MonoBehaviour { public float jumpForce = 700f; private int jumpCount = 0; private bool isGrounded = false; private bool isDoubleJump = false; private bool isSlide = false; private Rigidbody2D playerRigidbody; pr..
-
04/11 유니티 조이스틱으로 캐릭터 이동 연습유니티 2021. 4. 12. 00:41
using System.Collections; using System.Collections.Generic; using UnityEngine; using UnityEngine.EventSystems; public class InGame : MonoBehaviour, IPointerDownHandler, IDragHandler, IPointerUpHandler { RectTransform m_rectBack; RectTransform m_rectJoystick; Transform m_trCube; float m_fRadius; float m_fSpeed = 5.0f; float m_fSqr = 0f; Vector3 m_vecMove; Vector2 m_vecNormal; bool m_bTouch = fals..
-
04/09 수업내용 메모유니티 2021. 4. 9. 18:06
04/09 닷지 프로젝트 (Dodge) 템플릿 : 3D 플랫폼 설정 : android 해상도 설정 : 1920x1080 레이아웃 설정 : custom 3D object > Plane 생성 reste transform Scale(2,1,2) Plane 크기는 20유닛 메터리얼 생성 - 쉐이더와 텍스쳐가 합쳐진 에셋 - 오브젝트의 픽셀 컬러를 결정 셰이더 - 주어진 입력에 따라 픽셀의 최종컬러를 결정하는 코드 - 질감과 빛의 의한 반사와 굴절등의 효과를 만듬 메터리얼 생성 Create > Material(Plane Color) Albedo 옆에 Color선택후 검정색으로 설정 Plane에 메터리얼 적용 벽 만들기 Cube생성 (Wall) -> reset transform Cube의 사이즈 1유닛 positi..
-
04/09 유니티 슈팅게임 연습유니티 2021. 4. 9. 15:28
미구현 게임오버 화면 점수 using System.Collections; using System.Collections.Generic; using UnityEngine; public class PlayerController : MonoBehaviour { public Rigidbody playerRigidbody; public GameObject player; public float speed = 8f; public int hp = 100; public UIController uiController; private Animation animation; private float delta; // Start is called before the first frame update void Start() { an..
-
04/08 유니티 연습유니티 2021. 4. 8. 18:15
using System.Collections; using System.Collections.Generic; using UnityEngine; public class CharacterController : MonoBehaviour { private Animation anim; private Vector3 targetPosition; public EnemyController enemy; private bool isAttack; private bool isRun; private float delta; // Start is called before the first frame update void Start() { this.anim = this.GetComponent(); } public void PlayAni..
-
04/05~7 수업내용 메모카테고리 없음 2021. 4. 7. 18:11
2021/04/05 안드로이드 스튜디오 유니티 Tags prefab rigidbody Collider 개체 동적생성 : Object.Instantiate 리소스 로드 : Resource.Load Raycast 유니티 허브 - 네이버 카페 유니티 블로그 유니티 메뉴얼 GameObject.Find 액티브되어 있는 게임오브젝트를 찾음, 활성화 되어있는 게임오브젝트만 찾기가능 게임오브젝트의 인스턴스를 찾음 프리팹 공장 충돌판정 Input.mousePosition GetConponent() GameObject.Find("car") Input.GetKeyDoen transform.Translate() Destroy Resources Instantiate Prefab Canvas -Canvas Scaler 설정 Te..
-
04/06 단일연결리스트 Add구현 및 인덱서 사용 연습C# 2021. 4. 6. 00:41
Program.cs namespace Study07 { class Program { static void Main(string[] args) { new App(); } } } App.cs using System; using System.Threading; namespace Study07 { public class App { public App() { SingleLinkedList list = new SingleLinkedList(); list.Add(new Node("A")); list.Add(new Node("B")); list.Add(new Node("C")); list.Add(new Node("D")); Console.WriteLine("단일연결리스트 3번째 요소 :" + list[2].data);..