
#~1.30 unity 복습 #프로잭트 생성 순서 프로젝트를 열고 1. 레이아웃 설정 2. 플랫폼 변경 3. 해상도 설정 씬만들어 저장 리소스 프로젝트 넣기 리소스 배치 스크립트 작성 #vector 벡터 - 위치 벡터 A + B = C (좌표) - 방향 벡터 B - A = C (A 에서 B 까지의 방향 벡터) magnitude Returns the length of this vector (Read Only). https://docs.unity3d.com/ScriptReference/Vector3.html *두 점사이의 거리 float dist=Vector3.Distance(other.position, transform.position) ->Returns the distance between a and b..

using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace ListInventory { internal class Inventory { List weapons; public int capacity; public int Count { get; set; } public Inventory(int capacity) { this.capacity = capacity; this.weapons=new List(); //Console.WriteLine(weapons); } public void AddItem(Weapon weapon) //매개변수 { Wea..

using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace Inventory3 { internal class App { //1.AddItem 아이템 추가 //2.GetItemCount 들어있는 아이템 갯수 출력 //3.PrintItems 인벤토리 시각화 //4.FintItemId 인덱스의 id 로 name과 damage 정보 불러오기 //5.Arrange 인덱스 요소를 제거한 후 정렬해준다 public App() { Inventory inventory = new Inventory(5); Console.WriteLine(); inventory..

using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace ConsoleApp8 { internal class App { //1.(1차원)배열을 이용한 인벤토리 만들기 연습 1 public App() { //1.Item 클래스를 만들고 속성(name)를 부여하자 //2.Inventory 클래스를 만들고 Item 인스턴스를 생성하고 //3.Inventory 에서 만든 배열(intventory 필드)에 넣어보자(AddItem 메서드를 통해) //4.Inventory.PrintItems 로 들어있는 아이템 인스턴스 출력 //5.FindItemBy..