| 일 | 월 | 화 | 수 | 목 | 금 | 토 |
|---|---|---|---|---|---|---|
| 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 |
- 오블완
- readonly
- 유니티
- C#
- removeAll
- Simulation
- 크루스칼
- 유니티 sparkmain(clone)
- raycast
- unity korea
- sparkmain(clone) 무한생성
- list clear
- 드롭다운
- 너비탐색
- navisworks api
- 티스토리챌린지
- Unity
- 트리구조
- unity sparkmain(clone)
- 습관형성 #직장인자기계발 #오공완
- sparkmain(clone)
- 디지털트윈
- dropdown
- GetComponent
- 행동트리
- articulation body
- 최단거리 알고리즘
- dfs
- 최소신장트리 mst
- 깊이탐색
- Today
- Total
목록2023/11 (15)
낑깡의 게임 프로그래밍 도전기
최단거리로 가기위해 최소 길이로 해둔게 최소 신장트리using System.Collections;using System.Collections.Generic;using UnityEngine;using UnityEngine.Networking.Types;public class Node{ public string name; public Node(string name) { this.name = name; }}public class Edge{ public Node sNode; public Node eNode; public int cost; public Edge(Node sNode, Node eNode, int cost) { this.sNod..
DFS 깊이 탐색 BFS 너비 탐색 using System.Collections;using System.Collections.Generic;using UnityEditor.Search;using UnityEngine;public class Node{ public int value; public bool isVisit; public Node(int value, bool isVisit = false)//내가 여기에 인자를 넣지않으면 false를 때린다는 뜻 { this.value = value; this.isVisit = isVisit; }}public class GameManager : MonoBehaviour{ int[,] graph; ..
내 코드 using JetBrains.Annotations; using System; using System.Collections; using System.Collections.Generic; using System.Security.Cryptography; using UnityEngine; public class SortTest { public List array;//배열선언 protected const int rootindex = 1;//1로 시작해서 0번째 배열은 안쓴다 public SortTest() { array = new List();//새공간할당 array.Add(-1);//첫 0번째는 -1로 임의의 값 암거나 줌 } public virtual void Add(int value)//일단 Add..
https://www.cs.usfca.edu/~galles/visualization/ComparisonSort.html Comparison Sorting Visualization www.cs.usfca.edu using JetBrains.Annotations; using System; using System.Collections; using System.Collections.Generic; using System.Security.Cryptography; using UnityEngine; public class SortTest { public List array;//배열선언 protected const int rootindex = 1;//1로 시작해서 0번째 배열은 안쓴다 public SortTest() ..
using System.Collections; using System.Collections.Generic; using UnityEngine; using UnityEngine.UIElements; public class CompleteBinaryTree { public List array; protected const int rootIndex = 1; public CompleteBinaryTree() { array = new List(); array.Add(-1); } public virtual void Add(int value) { array.Add(value); } public virtual int Remove() { int removeValue = array[array.Count - 1]; array..
행동트리 : Behaviour TreeBT라고도 한다.BT는 논리적은 트리 구조를 사용하며 루트 노드에서 시작해 깊이 우선탐색(DFS)으로 자식 노드를 평가하고 평가 결과를 다시 부모 노드에게 반환하는 구조를 가진다.각 노드는 3가지 상태중 하나를 가질 수 있으며 그 목록은 아래와 같다.Failure(실패) Running(동작 중) Success(성공)행동 트리 구조행동트리 전체 예제 코드using System.Collections;using System.Collections.Generic;using UnityEngine;using System;using Unity.VisualScripting;public interface INode{ public enum STATE { RUN, ..
트리트리는 그래프의 일종노드들이 있고 노드간 선으로 연결되어있다면 그것을 그래프라고 부름트리는 부모에서 자식으로 방향성을 가진 그래프라서 화살표 방향을 생략할수있다(어짜피 부모에서 자식으로 가는거라)높이는 그레프의 길이깊이는 그래프가 얼마나 갈수있는가를 나타냄그래프 : 노드들이 선으로 연결되어있는 것(A*, Nav mesh에서 활용.. 가중치를 활용했다캄) 트리 : 그래프에 제약을 걸어둔 것 ㄴex) 방향 설정 간선 : 노드간을 잇는 선 레벨 : 노드들이 있는 층 형제 : 부모를 공유하는 같은 레벨의 노드 높이 : 레벨간을 이어주는 간선의 개수 깊이 : 자신을 제외한 조상노드의 개수 루트 : 최상위! 부모 서브트리 : 큰 트리 안에서 트리의 형태를 이루는 부분 (손주포함) 리프 : 자식이 없..
using System.Collections; using System.Collections.Generic; using UnityEngine; using System; public class Card { public string name; public int cost; public Card(string name, int cost) { this.name = name; this.cost = cost; } } public class Deck : List { public class DeckEnumerator : IEnumerator { List cards; public event Action onEmpty; int curIndex = -1; public DeckEnumerator(Deck deck) { cards..
매싱을 해준다? using System.Collections; using System.Collections.Generic; using UnityEngine; using System; using Unity.VisualScripting; namespace TEST { public class Dictionary { private const int defaultCapacity = 1000; public struct Entry { public enum State { None, Using } public State state; public TKey key; public TValue value; } private Entry[] table; public TValue this[TKey key] { get { return..
using System;public class Queue{ private const int DefaultCapacity = 4; private T[] array; private int head; private int tail; public Queue() { array = new T[DefaultCapacity]; head = 0; tail = 0; } public int Count { get { if (head tail) { return head == tail + 1; } else { ..