示例#1
0
    void Awake()
    {
        _slider = this.transform.Find("HpBar").gameObject.GetComponent <Slider>();
        _name   = this.transform.Find("Name").gameObject.GetComponent <MTextFormat>();
        _hpText = this.transform.Find("HpText").gameObject.GetComponent <MTextFormat>();
        _canvas = GameObject.Find("Canvas").GetComponent <Canvas>();

        StartCoroutine(EndOfFrameHandler());
    }
示例#2
0
 public void OnEnable()
 {
     mTextFormat = target as MTextFormat;
     text        = mTextFormat.gameObject.GetComponentInChildren <Text>();
     outline     = mTextFormat.gameObject.GetComponentInChildren <Outline>();
 }