少年修仙传客户端代码仓库
lcy
2024-12-16 a39c35fc6449430cd02bccb681c4a0a880e46cd9
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
using vnxbqy.UI;
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
 
public class TaskType : MonoBehaviour
{
    [SerializeField] List<int> MysteriousTaskID = new List<int>();
    TaskModel m_TaskModel;
    TaskModel taskmodel { get { return m_TaskModel ?? (m_TaskModel = ModelCenter.Instance.GetModel<TaskModel>()); } }
    public bool m_TypeBool = true;
    public int TaskID = 0;
    void Start()
    {
 
    }
 
 
    void Update()
    {
 
    }
    public void IsMysteriousTask()
    {
 
        if (MysteriousTaskID.Contains(TaskID))
        {
            if (this.gameObject.GetComponent<FunctionUnlockFlyObjectTarget>() != null)
            {
                this.gameObject.GetComponent<FunctionUnlockFlyObjectTarget>().IdList = new int[]{104 };
                this.gameObject.GetComponent<FunctionUnlockFlyObjectTarget>().Z_UnLockType = FunctionUnlockType.Normal;
                FunctionUnlockFlyObjectTargetCenter.Register(FunctionUnlockType.Normal, new int[] { 104 }, this.gameObject.GetComponent<FunctionUnlockFlyObjectTarget>());
            }
            else
            {
                FunctionUnlockFlyObjectTarget functionUnlockFlyObjectTarget = this.gameObject.AddComponent<FunctionUnlockFlyObjectTarget>();
                functionUnlockFlyObjectTarget.IdList= new int[] { 104 };
                functionUnlockFlyObjectTarget.Z_UnLockType = FunctionUnlockType.Normal;
                FunctionUnlockFlyObjectTargetCenter.Register(FunctionUnlockType.Normal, new int[] { 104 }, functionUnlockFlyObjectTarget);
            }
 
        }
        else
        {
            if (this.gameObject.GetComponent<FunctionUnlockFlyObjectTarget>() != null)
            {
                DestroyObject(this.gameObject.GetComponent<FunctionUnlockFlyObjectTarget>());
            }
 
        }
 
 
    }
 
    public void IsGameObjectName(int TaskID)
    {
        if (taskmodel.allMissionDict.ContainsKey(TaskID))
        {
            switch (taskmodel.allMissionDict[TaskID].Type)
            {
                case 0://主线
                    this.gameObject.name = "Main_" + TaskID;
                    break;
                case 1://支线
                case 2:
                case 4:
                case 5:
                case 17:
                    this.gameObject.name = "Branch_" + TaskID;
                    break;
                case 3://本源法宝
                    this.gameObject.name = "SourceFB_" + TaskID;
                    break;//成就任务
                case 15:
                    this.gameObject.name = "Achievement_" + TaskID;
                    break;
                case 6://赏金
                case 7:
                case 8:
                case 9:
                case 10:
                    this.gameObject.name = "MoneyReward_" + TaskID;
                    break;
                case 11://仙盟
                case 12:
                    this.gameObject.name = "FairyAu_" + TaskID;
                    break;
            }
        }
    }
 
    public void  ClearTaskName()
    {
        this.gameObject.name = "Task_PoolObject";
    }
}