일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | |||||
3 | 4 | 5 | 6 | 7 | 8 | 9 |
10 | 11 | 12 | 13 | 14 | 15 | 16 |
17 | 18 | 19 | 20 | 21 | 22 | 23 |
24 | 25 | 26 | 27 | 28 | 29 | 30 |
31 |
- union find
- Two Points
- 그래프
- Trie
- String
- Dijkstra
- Brute Force
- 스토어드 프로시저
- two pointer
- 다익스트라
- DP
- Hash
- SQL
- binary search
- 이진탐색
- Stored Procedure
- MYSQL
- Today
- Total
목록분류 전체보기 (425)
codingfarm
0. 개요정의 : 여러가지 기능들을 그룹화 한 것용도 : 이름 충돌 방지, 코드 유지보수 용이차이점 : 추상화 레벨의 수준과 목적1. 패키지(Package)소스 코드 파일(.java)과 클래스(.class)를 논리적으로 묶는 단위클래스, 인터페이스 등의 자바 타입을 논리적으로 묶기 위한 이름 공간Java의 기본적인 네임스페이스이자 폴더 구조 단위.같은 패키지에 있는 클래스들은 기본 접근제한자(default) 로도 접근 가능.🎯 주된 목적네임스페이스 충돌 방지→ 동일한 클래스명이 여러 라이브러리에 있어도 구분 가능코드 조직화→ 관련 기능끼리 폴더 구조로 묶어 유지보수 용이접근 제어→ default 접근 제한자는 같은 패키지 내에서만 접근 가능src/ └── com/ └── example/ ..
1. 개요민감한(sensitive) 데이터를 사용자로부터 숨기는 설계방식을 지칭방법클래스의 변수나 메서드를 private로 선언한다.private 변수에 읽고/쓰기를 수행 하기 위해서, get/set 메서드를 제공한다public class Person { private String name; // private = restricted access // Getter public String getName() { return name; } // Setter public void setName(String newName) { this.name = newName; }}
1. 개요정의 : 클래스와 클래스의 멤버(필드, 메소드)에 부가적인 의미를 부여하는 예약어특징제어자의 종류에 따라 적용 가능 한 대상(class, attribute, method, constructor)이 다름적용 대상에 따라 기능적 의미가 조금씩 다름종류접근 제어자(Access Modifier) : 접근 수준을 통제ex) public, protected, privateNon-Access Modifier : 이외의 기능들을 통제ex) static, final, abstract 2. 접근 제어자(Access Modifier)classpublic : 다른 클래스에서 접근 가능default : 동일 패키지에 있는 클래스만 접근 가능attribute, method, constructorpublic : 모든 클..
https://www.w3schools.com/java/java_type_casting.asp W3Schools.comW3Schools offers free online tutorials, references and exercises in all the major languages of the web. Covering popular subjects like HTML, CSS, JavaScript, Python, SQL, Java, and many, many more.www.w3schools.com 특정 원시타입(Primitive Type)을 다른 타입으로 전환하는 기술Java에는 2가지 캐스팅 방식이 존재한다.Widening Casting (automatically) - converting a small..
1. split#include #include #include using namespace std;vector split(const string& str, char delimiter) { vector result; size_t start = 0; // 시작 인덱스 size_t end; while ((end = str.find(delimiter, start)) != string::npos) { result.push_back(str.substr(start, end - start)); // 부분 문자열 추출 start = end + 1; // 다음 시작 지점으로 이동 } // 마지막 토큰 처리 result.push_back(str.substr..
C++ 코드로순열, 중복순열, 조합, 중복조합을 구현하는 코드는 아래와 같다.#includeusing namespace std;void PrintArr(int *arr, int arrSize){ for (int i = 0; i

유니티 프로젝트가 저장된 폴더의 용량이 너무 크게 나와서 확인해보니, Library 폴더가 대부분을 차지하고 있음을 확인하였다. 정체https://discussions.unity.com/t/what-is-library-folder/922186https://docs.unity3d.com/530/Documentation/Manual/BehindtheScenes.html오피셜 문서의 설명은 아래와 같다.Unity reads and processes any files that you add to the Assets folder, converting the contents of the file to internal game-ready versions of the data. The actual asset files..
https://www.youtube.com/watch?v=JxP-kqstMAY&ab_channel=%EB%B2%A0%EB%A5%B4%EC%9D%98%EA%B2%8C%EC%9E%84%EA%B0%9C%EB%B0%9C%EC%9C%A0%ED%8A%9C%EB%B8%8C
USING LERP WITH DELTA-TIME https://www.construct.net/en/blogs/ashleys-blog-2/using-lerp-delta-time-924 Recently on the forums came up the question of how to use dt (delta time) correctly with lerp. This turned out to be a surprisingly tricky question, and is a good demonstration of how knowledge of maths comes in handy when designing games. Just to recap, lerp(a, b, x) is a system expression tha..
3D 2가지 방법 사용가능 Ray 사용 카메라에서 마우스를 향하는 ray와 plane을 상호작용하여 얻은 좌표에 오브젝트를 위치시킨다 게임이 플레이 되는 floor에 오브젝트 위치 가능 ScreenToWorldPoint 함수 사용 카메라에 투영되는 평면상에 오브젝트 위치 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 using System.Collections; using System.Collections.Generic; using UnityEngine; public class MouseChaser : MonoBehaviour { public Transform ob1, ob2; Vect..
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 using System.Collections; using System.Collections.Generic; using UnityEngine; using UnityEngine.UI; using UnityEngine.EventSystems; public class UIItem : MonoBehaviour, IPointerDownHandler, IPointerClickHandler, IPointerUpHandler, IPointerExitHandler, IPointerEnterHandler, IBeginDragHandl..

1. 렌더 엔진 쉐이더 작업전에는 우선 어느 Render Engine을 사용할지 부터 결정해야 한다. (각 렌더엔진 간에 머터리얼이 호환되는 부분도 있지만, 결국 각각의 엔진에 맞게끔 material을 설정해주어야 하므로) Eevee : PBR material, 물리기반 매터리얼을 실시간으로 표시가능 Workbench : solid shading 과 비슷한 프리뷰용 렌더엔진, lighting과 material이 적용 X Cycles : 느리지만 더 정확한 렌더엔진, 본 포스팅에서 사용 뷰포트 쉐이딩 모드 설정한 렌더엔진으로 실시간 렌더링 결과를 뷰 포트에 출력하기 단축키 Z를 누르면 여러가지 뷰포트 모드가 나오며, 그 중 Rendered 를 선택한다. 2. Material 1. Material Slot ..
Unit 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 1..
보호되어 있는 글입니다.

https://docs.unity3d.com/Manual/AnimationSection.html 0. 애니메이션 유니티의 애니메이션 기능에는 여러가지 기능이 제공됨 리타겟팅 런타임 시 애니메이션 가중치 제어 애니메이션 재생 내에서의 이벤트 호출 FSM 구조 및 전환 얼굴 애니메이션을 위한 혼합 모양 등 1. 아바타 모델 파일(FBX, COLLADA 등)을 임포트한 후, Model Importer 옵션의 Rig 탭에서 Rig을 지정할 수 있습니다. 휴머노이드 https://docs.unity3d.com/Manual/AvatarCreationandSetup.html#:~:text=See%20in%20Glossary.,%2C%20arms%2C%20head%20and%20body. 인간형 캐릭터의 관절 애니메이..

https://docs.unity3d.com/ScriptReference/AI.NavMeshAgent.html 유니티에서 자체적으로 제공해주는 경로찾기기능이다. 발판 역할을 할 plane과 장애물이 될 cube들이 놓여 있다. 2개의 오브젝트 모두 Navigation Static을 활성화 하고 Navigation Area를 상자는 "Not Walkable"로, 판자는 Walkable로 설정한다. Bake 탭에서 하단의 "Bake" 버튼을 누르면 navmesh가 설정된다. NavMeshAgent 컴포넌트를 가진 게임 오브젝트는 위의 navmesh 위에서 경로를 찾을 수 있게 된다. 기본적인 활용법은 아래와 같다. 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 2..

데미지를 입는 오브젝트가 있다고 하자. 이 오브젝트에 총알이 닿으면, 충돌체의 종류에 알맞은 이벤트가 발생할것이다. 생명체의 경우엔 데미지를 입은 후, HP가 바닥너면 죽어서 사라질것이다. 장애물은 파괴되어 산산이 흩어질것이다. 게이트라면 문이 열릴것이다. 그리고 각 오브젝트는 자신들이 총알에 닿았을때 발동시킬 함수를 다 가지고 있다. 총알은 자신과 닿은 오브젝트의 종류를 파악한 후, switch 문으로 분기점을 형성하여 각기 다른 함수를 호출해도 된다. 하지만 총알은 자신이 닿은 오브젝트가 무엇인지 신경 쓰지 않고 그냥 파괴 효과를 주는것이 더 효율 적일것이다. 이런 경우, 상속이 매우 유용히 쓰일 수 있다. 총알의 경우 충돌이 발생했을 때, 상대방에게 IDamageable 컴포넌트가 있는지만 조사하여..
쿨타임 1 2 3 4 5 6 7 8 float msBetweenFire, nextTime; public void Fire() { if(Time.time > nextTime){ nextTime = Time.time + msBetweenFire / 1000; /* functions */ } } Colored by Color Scripter cs
1 2 3 4 5 6 public Unit unit; public Transform spawner; public void Spawn(){ Unit newUnit = Instantiate(unit, spawner.position, spawner.rotation) as Unit; } Colored by Color Scripter cs
트랜스 폼 1 2 3 4 5 6 7 8 9 10 Vector3 velocity; public void Move(Vector3 _velocity) { velocity = _velocity; } public void Update() { transform.Translate(velocity * Time.deltaTime); } Colored by Color Scripter cs 물리엔진 1 2 3 4 5 6 7 8 9 10 11 12 13 14 Vector3 velocity; Rigidbody myRigidbody; void Start() { myRigidbody = GetComponent (); } public void Move(Vector3 _velocity) { velocity = _velocity; } ..