ing System.Collections.Generic;
public class GameObjectPool
{
protected Queue<GameObject> mDefautQueue;
protected int mRefillTiming = 5;
protected int mCnt...
protected int mMaxNumber = 20;
protected GameObject mTargetPrefab;
protected GameObject mParentObj;
public void initQueue( GameObject parentObj_, GameOb
playmaker:pmexam1_hierarchy_2.png|}}
* **MovingObject** : 이동할 오브젝트
* **Position** : 오브젝트가 이동할 경로들의 부모... 동할지, 랜덤하게 선택하게 이동할지 결정.
* **MsgRecver** : MovingObject의 메시지를 받을 서브 오브젝트.
===== 씬 화면 =====
| {{:languag... ker:pmexam1_gameview_1.png|}} | 움직일 오브젝트, **MovingObject** |
| {{:language:unity:4-playmaker:pmexam1_gamev... 모름
===== PlayMaker FSM 추가 =====
게임 오브젝트 **MovingObject**에 새로운 FSM 추가.
(PlayMaker 태그가 붙어 있는 스샷 추가)
====
===== 간단한 프레임 구성 =====
<code>
DebugWindow : GameObject
DW_Bkgnd : UISlicedSprite 로 배경 이미지를 윈도우 크기만큼 늘... * DW_Title 에
* Box Collider를 추가
* UIDragObject 스크립트를 추가한다.
* UIDragObject 에 드래그 이동을 할 오브젝트를 Target 항목에 설정한다.
* 인스펙터에서 DebugWindow Object를 **UIDragObject**의 **Target** 항목에 추가한다.
실행 결과는,
enpick-1.jpg|}}
====== 사용할 변수 ======
* didPickObject : 게임오브젝트가 선택 되었는가?
* pickedGameObject : 선택한 게임 오브젝트 저장
* mouseX, mouseY : 마우스가 클릭된 화면상의 위치
* isDebu... ty:playmaker:pm-screenpick-3.jpg|}}
====== 'checkObject' state ======
- Screen Pick : 전제 조건이 있어서 헤매는 부... *가 설정되지 않으면, 오브젝트를 얻어오지 않았다.</color>
* didPickObject와 pickedGameObject 에 확인된 오브젝트를 저장한다.
- Game Obje
Text2D.cs 를 FloatingTextLabel 라벨이 추가한다.
* TargetObject에 따라다닐 오브젝트를 추가 ( 위에서 만든, 'objTest'를 추가 )
* Worl... a mainCamera;
public Camera guiCamera;
public GameObject prefab;
public void fire( Vector3 clickedPos_ )
{
GameObject _gameObj = Instantiate( prefab, clickedPos_, Quaternion.identity ) as GameObject;
// No mean yet, just align as child
SomeTool
com/Documentation/ScriptReference/EditorGUILayout.ObjectField.html|EditorGUILayout.ObjectField]]
====== Button 과 같은 이벤트 리시버를 인스펙터에 추가 ======
UnityEvent 로 public... e csharp>
// Create a new prefab for the atlas
Object prefab = (go != null) ? go : PrefabUtility.CreateEmptyPrefab(prefabPath);
// Create a new game object for the atlas
string atlasName = prefabPath.Repl