Exemplo n.º 1
0
        public void useCamera(string id)
        {
            bool flag = this.transUser == null;

            if (flag)
            {
                this.transUser = FightAniUserTempSC.goUser.transform;
            }
            bool flag2 = this.process == null;

            if (flag2)
            {
                this.process = new processStruct(new Action <float>(this.onUpdate), "GameCameraMgr", false, false);
            }
            this.clearCurCamera();
            GameObject gameObject = U3DAPI.U3DResLoad <GameObject>(id);
            bool       flag3      = gameObject == null;

            if (!flag3)
            {
                this.curGoCamera = UnityEngine.Object.Instantiate <GameObject>(gameObject);
                this.curGoCamera.transform.SetParent(this.transUser, false);
                this.curScCamera = this.curGoCamera.transform.FindChild("Camera").GetComponent <CameraAniTempCS>();
                bool flag4 = this.curScCamera == null;
                if (flag4)
                {
                    this.curScCamera = this.curGoCamera.transform.FindChild("Camera").gameObject.AddComponent <CameraAniTempCS>();
                }
                this.curTransCamera = this.curGoCamera.transform.FindChild("Camera");
                this.animator       = this.curGoCamera.transform.FindChild("Camera").GetComponent <Animator>();
                this.animator.speed = 1f;
                GRMap.GAME_CAMERA.SetActive(false);
                (CrossApp.singleton.getPlugin("processManager") as processManager).addProcess(this.process, false);
            }
        }
Exemplo n.º 2
0
 public override void init()
 {
     base.alain();
     this.txt     = base.getComponentByPath <Text>("Text");
     this.rect    = base.getComponentByPath <RectTransform>("Text");
     this.process = new processStruct(new Action <float>(this.onUpdate), "fb_main", false, false);
 }
Exemplo n.º 3
0
        public override void init()
        {
            this.wingModel = ModelBase <A3_WingModel> .getInstance();

            this.wingXML                 = this.wingModel.WingXML;
            this.textName                = base.getComponentByPath <Text>("Text_name");
            this.textLevel               = base.getComponentByPath <Text>("Text_name/lvl");
            this.textStage               = base.getComponentByPath <Text>("Text_name/stage");
            this.btnHelp                 = new BaseButton(base.getTransformByPath("title/help"), 1, 1);
            this.btnHelp.onClick         = new Action <GameObject>(this.OnOpenHelp);
            this.tempPgaeAtt             = base.getGameObjectByPath("att_temp");
            this.conAtt                  = base.getTransformByPath("att/grid");
            this.conLevelTable           = base.getTransformByPath("con_level");
            this.textSliderState         = base.getComponentByPath <Text>("con_level/expbar/text");
            this.btnLevelUpgrade         = new BaseButton(base.getTransformByPath("con_level/upgrade"), 1, 1);
            this.btnLevelUpgrade.onClick = new Action <GameObject>(this.OnUpgradeClick);
            this.btnLevelOneKey          = new BaseButton(base.getTransformByPath("con_level/onekey"), 1, 1);
            this.btnLevelOneKey.onClick  = new Action <GameObject>(this.OnUpgradeOneKey);
            this.conStar                 = base.getTransformByPath("con_level/con_star");
            this.sliderExpBar            = base.getComponentByPath <Slider>("con_level/expbar/slider");
            this.conCompleteTable        = base.getTransformByPath("con_complete");
            this.conIcon                 = base.getTransformByPath("panel_icon/mask/scroll_rect/con_icon");
            this.iconTemp                = base.getGameObjectByPath("panel_icon/icon_temp");
            this.btnTurnLeft             = new BaseButton(base.getTransformByPath("panel_icon/btn_left"), 1, 1);
            this.btnTurnLeft.onClick     = new Action <GameObject>(this.OnTurnLeftClick);
            this.btnTurnRight            = new BaseButton(base.getTransformByPath("panel_icon/btn_right"), 1, 1);
            this.btnTurnRight.onClick    = new Action <GameObject>(this.OnTurnRightClick);
            BaseButton baseButton = new BaseButton(base.getTransformByPath("btn_close"), 1, 1);

            baseButton.onClick        = new Action <GameObject>(this.onClose);
            this.textLevelCostItemSum = base.getComponentByPath <Text>("con_level/upgrade/text");
            this.conStageTable        = base.getTransformByPath("con_stage");
            this.textStageRate        = base.getComponentByPath <Text>("con_stage/rate");
            this.textStageCostItemSum = base.getComponentByPath <Text>("con_stage/improve/text");
            this.btnStageUp           = new BaseButton(base.getTransformByPath("con_stage/improve"), 1, 1);
            this.btnStageUp.onClick   = new Action <GameObject>(this.OnStageUpClick);
            this.sliderStage          = base.getComponentByPath <Slider>("con_stage/slider");
            this.sliderStage.onValueChanged.AddListener(new UnityAction <float>(this.OnSliderValueChange));
            this.conHelpPanel         = base.getTransformByPath("panel_help");
            this.btnCloseHelp         = new BaseButton(base.getTransformByPath("panel_help/closeBtn"), 1, 1);
            this.btnCloseHelp.onClick = new Action <GameObject>(this.OnCloseHelp);
            this.aniExp     = this.conLevelTable.GetComponent <Animator>();
            this.aniLevelUp = base.getGameObjectByPath("ani_lvlUP");
            this.process    = new processStruct(new Action <float>(this.Update_wing), "a3_wing_skin", false, false);
            base.getEventTrigerByPath("panel_icon").onDrag = new EventTriggerListener.VectorDelegate(this.onDragIcon);
            this.aniStarTrans = base.getTransformByPath("con_level/con_star/ani_star");
            this.conStarPoint = base.getTransformByPath("con_level/point");
            base.getEventTrigerByPath("con_avatar/avatar_touch").onDrag = new EventTriggerListener.VectorDelegate(this.OnDrag);
            BaseButton baseButton2 = new BaseButton(base.getTransformByPath("btnWing"), 1, 1);

            baseButton2.onClick  = new Action <GameObject>(this.OnEquWing);
            this.success         = base.transform.FindChild("ani_success").GetComponent <Animator>();
            this.fail            = base.transform.FindChild("ani_fail").GetComponent <Animator>();
            this.needobjid_stage = XMLMgr.instance.GetSXML("wings.stage_item", "").getInt("item_id");
            this.needobj_id      = XMLMgr.instance.GetSXML("wings.level_item", "").getInt("item_id");
        }
Exemplo n.º 4
0
 public override void init()
 {
     this.ani     = base.GetComponent <Animator>();
     this.process = new processStruct(new Action <float>(this.onUpdate), "cdtime", false, false);
     base.init();
 }
Exemplo n.º 5
0
        public override void init()
        {
            scrollControer0 = new ScrollControler();
            scrollControer0.create(getComponentByPath <ScrollRect>("att"));

            wingModel = A3_WingModel.getInstance();
            wingXML   = wingModel.WingXML;

            textName  = this.getComponentByPath <Text>("Text_name");
            textLevel = this.getComponentByPath <Text>("Text_name/lvl");
            textStage = this.getComponentByPath <Text>("Text_name/stage");

            btnHelp         = new BaseButton(this.getTransformByPath("title/help"));
            btnHelp.onClick = OnOpenHelp;

            tempPgaeAtt = this.getGameObjectByPath("att_temp");
            conAtt      = this.getTransformByPath("att/grid");

            conLevelTable           = this.getTransformByPath("con_level");
            textSliderState         = this.getComponentByPath <Text>("con_level/expbar/text");
            btnLevelUpgrade         = new BaseButton(this.getTransformByPath("con_level/upgrade"));
            btnLevelUpgrade.onClick = OnUpgradeClick;
            btnLevelOneKey          = new BaseButton(this.getTransformByPath("con_level/onekey"));
            btnLevelOneKey.onClick  = OnUpgradeOneKey;
            conStar      = this.getTransformByPath("con_level/con_star");
            sliderExpBar = this.getComponentByPath <Slider>("con_level/expbar/slider");

            conCompleteTable = this.getTransformByPath("con_complete");


            conIcon              = this.getTransformByPath("panel_icon/mask/scroll_rect/con_icon");
            iconTemp             = this.getGameObjectByPath("panel_icon/icon_temp");
            btnTurnLeft          = new BaseButton(this.getTransformByPath("panel_icon/btn_left"));
            btnTurnLeft.onClick  = OnTurnLeftClick;
            btnTurnRight         = new BaseButton(this.getTransformByPath("panel_icon/btn_right"));
            btnTurnRight.onClick = OnTurnRightClick;

            BaseButton close_btn = new BaseButton(this.getTransformByPath("btn_close"));

            close_btn.onClick = onClose;

            textLevelCostItemSum = this.getComponentByPath <Text>("con_level/upgrade/text");

            conStageTable        = this.getTransformByPath("con_stage");
            textStageRate        = this.getComponentByPath <Text>("con_stage/rate");
            textStageCostItemSum = this.getComponentByPath <Text>("con_stage/improve/text");
            btnStageUp           = new BaseButton(this.getTransformByPath("con_stage/improve"));
            btnStageUp.onClick   = OnStageUpClick;
            sliderStage          = this.getComponentByPath <Slider>("con_stage/slider");
            sliderStage.onValueChanged.AddListener(OnSliderValueChange);
            sliderStage.value = 1;

            conHelpPanel         = this.getTransformByPath("panel_help");
            btnCloseHelp         = new BaseButton(this.getTransformByPath("panel_help/closeBtn"));
            btnCloseHelp.onClick = OnCloseHelp;

            aniExp     = conLevelTable.GetComponent <Animator>();
            aniLevelUp = this.getGameObjectByPath("ani_lvlUP");
            process    = new processStruct(Update_wing, "a3_wing_skin");

            this.getEventTrigerByPath("panel_icon").onDrag = onDragIcon;

            aniStarTrans = this.getTransformByPath("con_level/con_star/ani_star");
            conStarPoint = this.getTransformByPath("con_level/point");

            this.getEventTrigerByPath("con_avatar/avatar_touch").onDrag = OnDrag;

            BaseButton btnWing = new BaseButton(this.getTransformByPath("btnWing"));

            btnWing.onClick = OnEquWing;

            success = this.transform.FindChild("ani_success").GetComponent <Animator>();
            fail    = this.transform.FindChild("ani_fail").GetComponent <Animator>();


            needobjid_stage = XMLMgr.instance.GetSXML("wings.stage_item").getInt("item_id");
            needobj_id      = XMLMgr.instance.GetSXML("wings.level_item").getInt("item_id");

            #region 初始化汉字
            getComponentByPath <Text>("title/Text").text               = ContMgr.getCont("a3_wing_skin_0");
            getComponentByPath <Text>("att_temp/text_name").text       = ContMgr.getCont("a3_wing_skin_1");
            getComponentByPath <Text>("con_level/upgrade/Text").text   = ContMgr.getCont("a3_wing_skin_2");
            getComponentByPath <Text>("con_level/onekey/Text").text    = ContMgr.getCont("a3_wing_skin_3");
            getComponentByPath <Text>("con_level/shengyu").text        = ContMgr.getCont("a3_wing_skin_4");
            getComponentByPath <Text>("con_stage/Text").text           = ContMgr.getCont("a3_wing_skin_5");
            getComponentByPath <Text>("con_stage/shengyu").text        = ContMgr.getCont("a3_wing_skin_4");
            getComponentByPath <Text>("con_complete/title/text").text  = ContMgr.getCont("a3_wing_skin_6");
            getComponentByPath <Text>("btn_equip/Text").text           = ContMgr.getCont("a3_wing_skin_7");
            getComponentByPath <Text>("panel_icon/icon_temp/lvl").text = ContMgr.getCont("a3_wing_skin_8");
            getComponentByPath <Text>("btnWing/Text").text             = ContMgr.getCont("a3_wing_skin_9");
            getComponentByPath <Text>("panel_help/descTxt").text       = ContMgr.getCont("a3_wing_skin_10");
            getComponentByPath <Text>("panel_help/closeBtn/Text").text = ContMgr.getCont("a3_wing_skin_11");
            #endregion
        }
Exemplo n.º 6
0
 public override void init()
 {
     ani     = GetComponent <Animator>();
     process = new processStruct(onUpdate, "cdtime");
     base.init();
 }
Exemplo n.º 7
0
 public override void init()
 {
     txt     = this.getComponentByPath <Text>("txt");
     process = new processStruct(onUpdate, "relive");
 }
Exemplo n.º 8
0
 public override void init()
 {
     this.txt     = base.getComponentByPath <Text>("txt");
     this.process = new processStruct(new Action <float>(this.onUpdate), "relive", false, false);
 }