2DProject 및 Sprite 생성

1. 2DProject 생성
2. Sprite 및 AnimationController
This commit is contained in:
Mingu Kim
2025-01-25 00:43:18 +09:00
commit 20c7e2ba3a
1179 changed files with 172652 additions and 0 deletions

39
Assets/Controller.cs Normal file
View File

@@ -0,0 +1,39 @@
using UnityEngine;
public class Controller : MonoBehaviour
{
// 유니티 오브젝트는 GameObject 단위.
// GameObject는 Componect를 소유하고 있다.
// 소유 vs 상속 >> GameObject는 Componect를 소유하고 있는 개념
// Start is called once before the first execution of Update after the MonoBehaviour is created
void Start()
{
// 디자인 패턴
// 유니티는 컴포넌트 패턴을 취하고 있다.
var position = transform.position;
Matrix4x4 positionMatrix= Matrix4x4.Translate(position);
var scale = transform.localScale;
var rotation = transform.rotation;
// 행렬
// x, y, z 값을 행렬로 변환해 컴퓨터에 전달을 해준다.
Matrix4x4 matrix = transform.localToWorldMatrix;
// 게임오브젝트 하나가 행렬을 가지고 있고.
// 카메라가 행렬을 가지고 있다.
Matrix4x4 cameraMatrix = Camera.main.cameraToWorldMatrix;
Matrix4x4 result = cameraMatrix * matrix;
}
// Update is called once per frame
void Update()
{
}
}