コード例 #1
0
    //测试
    //SynopsisSystem syn;

    #endregion

    #region 生命周期

    private void Awake()
    {
        CurrentUIType.UIForms_ShowMode = UIFormShowMode.Normal;
        #region abandon
        //测试
        //bg = transform.Find("Bg").gameObject;
        //nameTxt = transform.Find("Bg/Text/name").GetComponent<Text>();
        //description = transform.Find("Bg/Text/description").GetComponent<Text>();
        //rewards = transform.Find("Bg/Text/rewards").GetComponent<Text>();
        //need = transform.Find("Bg/Text/needbig").GetComponent<Text>();
        //button = transform.Find("Bg/Text/Button").GetComponent<Button>();
        //header = transform.Find("Bg/Text/header").GetComponent<Text>();
        #endregion

        bg          = this.gameObject;
        nameTxt     = UnityHelper.FindTheChildNode(gameObject, "NameText").GetComponent <Text>();
        description = UnityHelper.FindTheChildNode(gameObject, "Description Text").GetComponent <Text>();
        need        = UnityHelper.FindTheChildNode(gameObject, "Needbig").GetComponent <Text>();
        Debug.Log(need.name);
        header = UnityHelper.FindTheChildNode(gameObject, "Title Text").GetComponent <Text>();
        Debug.Log(header.name);
        button = UnityHelper.FindTheChildNode(gameObject, "Button").GetComponent <Button>();
        Debug.Log(button.name);
        exit    = UnityHelper.FindTheChildNode(gameObject, "Exit").GetComponent <Button>();
        rewards = UnityHelper.FindTheChildNode(gameObject, "Rewards").GetComponent <Text>();
        Debug.Log(rewards.name);
        showUI      = new ShowUI();
        buttonClick = new ButtonClick();
        EventCenter.AddListener <TaskSystem, NpcSystem, TalkSystem>(EventDefine.ShowTaskButton, ShowButtonAndState);
        EventCenter.AddListener(EventDefine.Init, InitButton);
        EventCenter.AddListener <TaskSystem>(EventDefine.ShowUI, ShowPanel);
        EventCenter.AddListener <SynopsisSystem>(EventDefine.SetTaskPanel, SetTaskPanel);
        EventCenter.AddListener <SynopsisSystem, TalkSystem>(EventDefine.SetTaskPanelEndTalk, ShowTaskPanel);
    }
コード例 #2
0
 void Start()
 {
     skillUpgrade        = GetComponent <SkillUpgrade>();
     showUI              = GetComponent <ShowUI>();
     showSkill           = GetComponent <ShowSkill>();
     csm                 = GetComponent <CampsiteManager>();
     player1.upgradeLeft = 1;
     player2.upgradeLeft = 1;
     currentWave         = GameObject.FindGameObjectWithTag("AudioManager").GetComponent <AudioManager>().waveIndex;
 }
コード例 #3
0
ファイル: TaskShow.cs プロジェクト: Xdisme8120/TEST_PROJECT
    //*************

    #endregion

    #region 生命周期
    private void Awake()
    {
        list     = new List <string>();
        nameTxt  = transform.Find("name").GetComponent <Text>();
        progress = transform.Find("progress").GetComponent <Text>();
        showUI   = new ShowUI();
        //******************测试
        _progress = new Dictionary <string, int>();
        _need     = new Dictionary <string, int>();

        _progress.Add("刀剑", 1);
        _progress.Add("棍棒", 2);
        _need.Add("刀剑", 5);
        _need.Add("棍棒", 5);
        //*****************
        EventCenter.AddListener <TaskSystem>(EventDefine.MiniTaskShow, Show);
    }
コード例 #4
0
 public override void Show()
 {
     gameObject.SetActive(true);
     ShowUI.Invoke();
 }
コード例 #5
0
 void Awake()
 {
     instance = this;
 }