| 일 | 월 | 화 | 수 | 목 | 금 | 토 |
|---|---|---|---|---|---|---|
| 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 |
Tags
- 루아
- 루아다운로드
- N Queens Problem
- c샾 hello world
- c sharp hello world
- c언어 버블정렬
- c#온라인
- c++ 등차수열 합
- c언어 최대최소
- c샾 헬로우 월드
- 메이플스토리
- c언어 콘서트 배열
- 게임제작
- for문
- lua 다운로드
- 비주얼 스튜디오 다운로드
- lua download
- Lua 설명
- 유니티
- c언어 콘서트 배열 2번
- LUA
- 비주얼 스튜디오
- 온라인 비주얼 스튜디오
- N Queen Coordinates
- c언어 배열 programming
- 2중 반복문
- N Queen 문제
- Lua language
- C언어 달력
- Lua란
Archives
- Today
- Total
Ln Go
Item 본문
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class Item : MonoBehaviour
{
public enum Type { Ammo, Coin, Grenade, Heart, Weapon };
public Type type;
public int value;
Rigidbody rigid;
SphereCollider sphereCollider;
private void Awake()
{
rigid = GetComponent<Rigidbody>();
sphereCollider = GetComponent<SphereCollider>();
}
void Update()
{
transform.Rotate(Vector3.up * 20 * Time.deltaTime);
//Item Rotation Code
}
private void OnCollisionEnter(Collision collision)
{
//GetComponent()는 첫번째 컴포넌트를 가져옴.
if(collision.gameObject.tag == "Floor")
{
rigid.isKinematic = true;
sphereCollider.enabled = false;
}
}
}
Comments