public override void OnInit() { base.OnInit(); AddPropChangedNotify((int)MVCPropertyID.enMainPlayer, OnPropertyChanged); m_hpBar = FindChildComponent <UIHPBar>("BarHP"); m_switchCD = FindChildComponent <UILabel>("SwitchTime"); m_headroot = FindChildComponent <UIPanel>("headroot"); m_SwitchBarHP = FindChildComponent <UIHPBar>("SwitchBarHP"); m_SwitchBarHP_F = FindChildComponent <UIHPBar>("SwitchBarHP_F"); m_SwitchCDbar = FindChildComponent <UISlider>("SwitchCDbar"); //角色死亡时的遮罩 m_chiefDeadMask = FindChild("MainMask"); m_deputyDeadMask = FindChild("MinorMask"); m_cdMask = FindChild("CDMask"); m_deputyObj = FindChild("heroMinor"); m_cdObj = FindChild("CDFrame"); m_chiefSprite = FindChildComponent <UITexture>("MainPortait"); // m_chiefButton = FindChildComponent<UIButton>("MainPortait"); m_deputySprite = FindChildComponent <UITexture>("MinorPortait"); // m_deputyButton = FindChildComponent<UIButton>("MinorPortait"); m_deputySprite_F = FindChildComponent <UITexture>("MinorPortait_F"); tw_main = FindChildComponent <TweenColor> ("Foreground"); tw_minor = FindChildComponent <TweenColor> ("Foregroundblue_m"); // m_spriteBaseChief = FindChildComponent<UISprite>("Sprite_swordBase", FindChildComponent<UIPanel>("swordFrame").gameObject); // m_spriteBaseDeputy = FindChildComponent<UISprite>("Sprite_swordBase", FindChildComponent<UIPanel>("swordFrame_Deputy").gameObject); //m_swordEffect = FindChildComponent<UIPanel>("Panel_swordEffect"); //for (int i = 0; i < AllSoulsCount; i++) //{ // string str = "Sprite_soul" + (i + 1).ToString(); // m_soulList[i] = FindChild(str); //} //for (int j = 0; j < AllWordCount; j++) //{ // string str1 = "word" + (j + 1).ToString(); // m_wordChiefList[j] = FindChild(str1, m_spriteBaseChief.gameObject); // m_wordDeputyList[j] = FindChild(str1, m_spriteBaseDeputy.gameObject); //} //m_animSouls = FindChildComponent<Animation>("Souls"); //m_soulTimeLength = m_animSouls.GetClip("UIsword-souls-fly-01").length; GameObject obj = FindChild("LevelFrame"); m_levelLabel = FindChildComponent <UILabel>("Label-level", obj); m_swordFrame = FindChild("swordFrame"); m_souls = FindChild("Souls"); m_swordframe_deputy = FindChild("swordFrame_Deputy"); }
public override void OnInit() { base.OnInit(); AddPropChangedNotify((int)MVCPropertyID.enBattlePropsManager, OnPropertyChanged); m_hpBar = FindChildComponent <UIHPBar>("BarControl"); }
public override void OnInit() { base.OnInit(); m_hpBar = FindChildComponent <UIHPBar>("BarControl"); }
// Start is called before the first frame update void Awake() { instance = this; }