예제 #1
0
		private void _OnQuestSelected(DiaQuestSelectWiz wiz, object[] args)
		{
			DiaQRewardAction action = args[0] as DiaQRewardAction;
			EditorWindow ed = args[1] as EditorWindow;
			action.questIdent = wiz.selected.IdentString;
			action.questName = wiz.selected.name;
			wiz.Close();
			ed.Repaint();
		}
예제 #2
0
		private void _OnNodePropsQuestSelected(DiaQuestSelectWiz wiz, object[] args)
		{
			if (currNode != null)
			{
				switch (currNode.type)
				{
					case DiaQNode.Type.GiveQuest:
					{
						currNode.data[0] = wiz.selected.IdentString;
						currNode.CachedString = wiz.selected.name;
						EditorUtility.SetDirty(asset);
					} break;

					case DiaQNode.Type.Dialogue:
					{
						currNode.data[1] = wiz.selected.IdentString;
						currNode.CachedString = wiz.selected.name;
						EditorUtility.SetDirty(asset);
					} break;

					case DiaQNode.Type.SendMessage:
					{
						currNode.data[2] = wiz.selected.IdentString;
						currNode.CachedString = wiz.selected.name;
						EditorUtility.SetDirty(asset);
					} break;

					case DiaQNode.Type.DebugLog:
					{
						currNode.data[0] = wiz.selected.IdentString;
						currNode.CachedString = wiz.selected.name;
						EditorUtility.SetDirty(asset);					
					} break;

					case DiaQNode.Type.SetVariable:
					{
						currNode.data[1] = wiz.selected.IdentString;
						currNode.CachedString = wiz.selected.name;
						EditorUtility.SetDirty(asset);
					} break;

					case DiaQNode.Type.UpdateCondition:
					{
						currNode.data[1] = wiz.selected.IdentString;
						currNode.CachedString = wiz.selected.name;
						EditorUtility.SetDirty(asset);
					} break;

					case DiaQNode.Type.QuestCheck:
					{
						currNode.data[0] = wiz.selected.IdentString;
						currNode.CachedString = wiz.selected.name;
						EditorUtility.SetDirty(asset);
					} break;

					case DiaQNode.Type.GiveReward:
					{
						currNode.data[0] = wiz.selected.IdentString;
						currNode.CachedString = wiz.selected.name;
						EditorUtility.SetDirty(asset);
					} break;
				}
			}
			wiz.Close();
			Repaint();
		}
예제 #3
0
		// ============================================================================================================

		private static void _OnSelectedQuest(DiaQuestSelectWiz wiz, object[] args)
		{
			DiaQDecisionTest t = args[0] as DiaQDecisionTest;
			EditorWindow ed = args[1] as EditorWindow;
			DiaQAsset asset = args[2] as DiaQAsset;
			if (t != null)
			{
				t.s_opt1 = new string[2];
				t.s_opt1[0] = wiz.selected.IdentString;
				t.s_opt1[1] = wiz.selected.name;
			}
			wiz.Close();
			if (ed != null) ed.Repaint();
			if (asset != null) EditorUtility.SetDirty(asset);
		}