Esempio n. 1
0
 void DrawEditUI()
 {
     GUILayout.Label("事件类型 : " + mCurEvet.ToString());
     mCurEvet.eventName   = EditorGUILayout.TextField("事件名称", mCurEvet.eventName);
     mCurEvet.triggerTime = EditorGUILayout.FloatField("触发时间", mCurEvet.triggerTime);
     if (mCurEvet is ShowEffectEvent)
     {
         ShowEffectEvent effectEvent = (ShowEffectEvent)mCurEvet;
         effectEvent.effectName    = EditorGUILayout.TextField("特效资源名", effectEvent.effectName);
         effectEvent.startPosition = EditorGUILayout.Vector3Field("初始位置", effectEvent.startPosition);
     }
     else if (mCurEvet is PlayAudioEvent)
     {
         PlayAudioEvent mAudioEvent = mCurEvet as PlayAudioEvent;
         mAudioEvent.audioName = EditorGUILayout.TextField("音效资源名", mAudioEvent.audioName);
     }
     else if (mCurEvet is SetVelocityEvent)
     {
         SetVelocityEvent velocityEvent = mCurEvet as SetVelocityEvent;
         velocityEvent.velocity = EditorGUILayout.Vector3Field("设置速度", velocityEvent.velocity);
     }
     else if (mCurEvet is AiActionEvent)
     {
         AiActionEvent actionEvent = mCurEvet as AiActionEvent;
         actionEvent.actiomType = (EAiActionType)EditorGUILayout.EnumPopup("AI行为类型", actionEvent.actiomType);
     }
 }
Esempio n. 2
0
 void CreateEvent(AIClipEvent clipEvent)
 {
     if (onCreate != null)
     {
         onCreate(clipEvent);
         //初始名为赋值为类型名
         clipEvent.eventName = clipEvent.ToString();
         mCurEvet            = clipEvent;
         onCreate            = null;
     }
     else
     {
         Debug.LogError("没有创建回调");
     }
 }
Esempio n. 3
0
 void CreateEvent(AIClipEvent clipEvent)
 {
     if (onCreate != null)
     {
         onCreate(clipEvent);
         //初始名为赋值为类型名
         clipEvent.eventName = clipEvent.ToString();
         mCurEvet = clipEvent;
         onCreate = null;
     }
     else
     {
         Debug.LogError("没有创建回调");
     }
 }