예제 #1
0
        public override void init()
        {
            instance  = this;
            iconPhy   = getGameObjectByPath("type/phy");
            iconMagic = getGameObjectByPath("type/magic");
            iconJy    = getGameObjectByPath("type/jy");

            iconWar  = getGameObjectByPath("pro/war");
            iconMage = getGameObjectByPath("pro/mage");
            iconAss  = getGameObjectByPath("pro/ass");

            bossBg  = getGameObjectByPath("BOSS1");
            bg      = getGameObjectByPath("bg");
            otherHP = getGameObjectByPath("hp");
            bosshp1 = getGameObjectByPath("boss_hp");
            fgim    = getGameObjectByPath("fgImage");
            hp1     = getGameObjectByPath("hp1");
            type1   = getGameObjectByPath("type");
            pro     = getGameObjectByPath("pro");
            fg2     = getGameObjectByPath("fg2");
            fg3     = getGameObjectByPath("bossHead/fg3");

            bosshps = getGameObjectByPath("boss_hps");


            EventTriggerListener.Get(iconWar).onClick  = onHeadClick;
            EventTriggerListener.Get(iconMage).onClick = onHeadClick;
            EventTriggerListener.Get(iconAss).onClick  = onHeadClick;

            transHP     = getTransformByPath("hp");
            txtLv       = getComponentByPath <Text>("lv");
            txtname     = getComponentByPath <Text>("txt");
            bossName    = getComponentByPath <Text>("txt2");
            bossHPCount = getComponentByPath <Text>("txt3");
            transHP1    = getTransformByPath("hp1");

            bossHpBg             = getTransformByPath("boss_hps/boss_hp0");
            transform.localScale = Vector3.zero;
            bossHP   = getTransformByPath("boss_hp");
            bossHead = getGameObjectByPath("bossHead/1");
            golevel  = getGameObjectByPath("level");

            menu = new TargetMenu(getTransformByPath("menu"));
            getComponentByPath <Text>("menu/chat/Text").text   = ContMgr.getCont("tragethead_0");
            getComponentByPath <Text>("menu/view/Text").text   = ContMgr.getCont("tragethead_1");
            getComponentByPath <Text>("menu/team/Text").text   = ContMgr.getCont("tragethead_2");
            getComponentByPath <Text>("menu/union/Text").text  = ContMgr.getCont("tragethead_3");
            getComponentByPath <Text>("menu/addfre/Text").text = ContMgr.getCont("tragethead_4");
            getComponentByPath <Text>("menu/black/Text").text  = ContMgr.getCont("tragethead_5");
        }
예제 #2
0
 public override void init()
 {
     tragethead.instan = this;
     this.iconPhy      = base.getGameObjectByPath("type/phy");
     this.iconMagic    = base.getGameObjectByPath("type/magic");
     this.iconJy       = base.getGameObjectByPath("type/jy");
     this.iconWar      = base.getGameObjectByPath("pro/war");
     this.iconMage     = base.getGameObjectByPath("pro/mage");
     this.iconAss      = base.getGameObjectByPath("pro/ass");
     this.bossBg       = base.getGameObjectByPath("BOSS1");
     this.bg           = base.getGameObjectByPath("bg");
     this.otherHP      = base.getGameObjectByPath("hp");
     this.bosshp1      = base.getGameObjectByPath("boss_hp");
     this.fgim         = base.getGameObjectByPath("fgImage");
     this.hp1          = base.getGameObjectByPath("hp1");
     this.type1        = base.getGameObjectByPath("type");
     this.pro          = base.getGameObjectByPath("pro");
     this.fg2          = base.getGameObjectByPath("fg2");
     this.fg3          = base.getGameObjectByPath("bossHead/fg3");
     this.bosshps      = base.getGameObjectByPath("boss_hps");
     EventTriggerListener.Get(this.iconWar).onClick  = new EventTriggerListener.VoidDelegate(this.onHeadClick);
     EventTriggerListener.Get(this.iconMage).onClick = new EventTriggerListener.VoidDelegate(this.onHeadClick);
     EventTriggerListener.Get(this.iconAss).onClick  = new EventTriggerListener.VoidDelegate(this.onHeadClick);
     this.transHP              = base.getTransformByPath("hp");
     this.txtLv                = base.getComponentByPath <Text>("lv");
     this.txtname              = base.getComponentByPath <Text>("txt");
     this.bossName             = base.getComponentByPath <Text>("txt2");
     this.bossHPCount          = base.getComponentByPath <Text>("txt3");
     this.transHP1             = base.getTransformByPath("hp1");
     this.bossHpBg             = base.getTransformByPath("boss_hps/boss_hp0");
     base.transform.localScale = Vector3.zero;
     this.bossHP               = base.getTransformByPath("boss_hp");
     this.bossHead             = base.getGameObjectByPath("bossHead/1");
     this.golevel              = base.getGameObjectByPath("level");
     this.menu = new TargetMenu(base.getTransformByPath("menu"));
 }