using System.Collections;
[System.Serializable]
public class ITem{
public int price;
public Vector3 spawnPos;
}
public class Testcube : MonoBehaviour {
[Range(0, 100)]
public int HP = 50;
[HideInInspector]
public int MP = 100;
[SerializeField]
private int AP = 50;
public ITem item;
public Vector3 spawnPos;
// Use this for initialization
void Start () {
}
// Update is called once per frame
void Update () {
}
void OnDrawGizmos(){
Gizmos.color = new Color(255, 0, 0, 127);
for(int x = 0; x < 4; x++){
Gizmos.DrawLine(new Vector3(x, 0, 0), new Vector3(x, 0, 0));
Gizmos.DrawLine(new Vector3(0, x, 0), new Vector3(0, x, 0));
}
Gizmos.DrawIcon(transform.position, "Crab");
Gizmos.DrawSphere(transform.position, 2);
Gizmos.color = Color.blue;
Gizmos.DrawWireSphere(transform.position, 4);
}
}
'Computer Language > 유니티' 카테고리의 다른 글
SkinnedMeshRenderer (0) | 2014.06.27 |
---|---|
GUI 씬 전환 (0) | 2014.06.23 |
[ContextMenu("Arrange")] 활용법 (0) | 2014.06.23 |
진행중 gamecontroller (0) | 2014.06.10 |
바둑 주석 (0) | 2014.05.29 |