コード例 #1
0
 void OnWizardCreate()
 {
     if (group == null && Selection.activeGameObject != null)
     {
         group = Selection.activeGameObject.GetComponent <SceneNPCGroup> ();
     }
     MapEventActionManager.CreateNewGroupAction(Selection.activeGameObject, group);
 }
コード例 #2
0
    public static void CreateNewGroupAction(GameObject target, SceneNPCGroup group)
    {
        var action = CreateAction <GenerateNewGroupAction> (target, Example.MapEventAction.Type.OPEN_NPC_GROUP, null);

        action.group = group;

        Selection.activeGameObject = action.gameObject;
    }
コード例 #3
0
 protected override void OnUpdate()
 {
     if (group != null)
     {
         objPath = MapEventHelper.GetGameObjectPath(group.transform);
     }
     else if (objPath != null)
     {
         group = GameObject.Find(objPath).GetComponent <SceneNPCGroup> ();
     }
 }
コード例 #4
0
 protected override void OnUpdate()
 {
     if (group != null)
     {
         objPath = MapEventHelper.GetGameObjectPath(group.transform);
         groupid = group.groupId;
     }
     else if (!string.IsNullOrEmpty(objPath))
     {
         group = GameObject.Find(objPath).GetComponent <SceneNPCGroup> ();
     }
     else
     {
         group = FindGroup(groupid);
     }
 }
コード例 #5
0
ファイル: MapManager.cs プロジェクト: zhejimanyu/MapEditor
    public static void CreateNPCWave(SceneNPCGroup group, int delayTime)
    {
        int sequene = group.transform.childCount + 1;
        var go      = new GameObject("波次-" + sequene);
        var wave    = go.AddComponent <SceneNPCWave>();

        wave.waveSequence = sequene;
        wave.delayTime    = delayTime;

        go.transform.SetParent(group.transform);
        go.transform.position   = selectionPosition;
        go.transform.localScale = Vector3.one;
        go.transform.rotation   = Quaternion.identity;

        _isUpdated = true;

        Selection.activeGameObject = go;
    }
コード例 #6
0
ファイル: MapManager.cs プロジェクト: zhejimanyu/MapEditor
 public static void RemoveNPCGroup(SceneNPCGroup group)
 {
     GameObject.DestroyImmediate(group.gameObject);
     _isUpdated = true;
 }