示例#1
0
    public void Install()
    {
        if (_isInit)
        {
            return;
        }
        _isInit = true;

        if (FrameworkConfig.Instance.UseHotFixMode)
        {
            _hand     = UnityHelper.GetTheChildNodeComponetScripts <Image>(LitFramework.HotFix.UIManager.Instance.TransPopUp, "Image_Hand");
            _parentBG = LitFramework.HotFix.UIManager.Instance.MaskImage;
        }
        else
        {
            _hand     = UnityHelper.GetTheChildNodeComponetScripts <Image>(LitFramework.Mono.UIManager.Instance.TransPopUp, "Image_Hand");
            _parentBG = LitFramework.Mono.UIManager.Instance.MaskImage;
        }
        //加载新手引导所需各类资源
        _circleMat   = GameObject.Instantiate <Material>(Resources.Load <Material>("Shaders/Guide/Material/CircleMateria"));
        _rectMat     = GameObject.Instantiate <Material>(Resources.Load <Material>("Shaders/Guide/Material/RectMateria"));
        _hand.sprite = GameObject.Instantiate <Sprite>(Resources.Load <Sprite>("Prefabs/UI/common_hand"));

        Assert.IsNotNull(_circleMat, "GuideShaderController circleMat 未加载成功");
        Assert.IsNotNull(_rectMat, "GuideShaderController rectMat 未加载成功");
        Assert.IsNotNull(_parentBG, "GuideShaderController parentBG 未加载成功");
        Assert.IsNotNull(_hand, "GuideShaderController hand 未加载成功");

        _parentBG.enabled  = true;
        _parentBG.material = _initType == LitShaderType.Circle ? _circleMat : _rectMat;

        _isFocusing     = false;
        _material       = _parentBG.material;
        _guideConfig    = GuideConfig.Instance;
        _guideDataModel = GuideDataModel.Instance;
        _ev             = _parentBG.GetComponent <EventPenetrate>();
        if (_ev == null)
        {
            _ev = _parentBG.gameObject.AddComponent <EventPenetrate>();
        }
        _targetThreshold = _initType == LitShaderType.Circle ? _guideConfig.thresholdCircle : _guideConfig.thresholdRect;

        if (FrameworkConfig.Instance.UseHotFixMode)
        {
            _uiCam    = LitFramework.HotFix.UIManager.Instance.UICam;
            _rootCanv = LitFramework.HotFix.UIManager.Instance.TransRoot.GetComponent <Canvas>();
        }
        else
        {
            _uiCam    = LitFramework.Mono.UIManager.Instance.UICam;
            _rootCanv = LitFramework.Mono.UIManager.Instance.TransRoot.GetComponent <Canvas>();
        }

        _parentBG.enabled = false;

        ResetGuide();
        HideHand();
        GC.Collect();
    }
示例#2
0
    public void Uninstall()
    {
        _circleMat = null;
        _rectMat   = null;
        _parentBG  = null;
        _hand      = null;

        _material = null;
        _ev       = null;

        _guideConfig    = null;
        _guideDataModel = null;

        GC.Collect();
    }
示例#3
0
    public void LoadConfig()
    {
        AnnouncementConfigData = new AnnouncementConfig();
        BadgeAttrConfigData    = new BadgeAttrConfig();
        ConstStringConfigData  = new ConstStringConfig();
        CommonConfig           = new CommonConfig();

        AttrNameConfigData        = new AttrNameConfig();
        RoleBaseConfigData2       = new BaseDataConfig2();
        AttrDataConfigData        = new AttrDataConfig();
        TeamLevelConfigData       = new TeamLevelConfig();
        RoleLevelConfigData       = new RoleLevelConfig();
        NPCConfigData             = new NPCDataConfig();
        SkillConfig               = new SkillConfig();
        GoodsConfigData           = new GoodsConfig();
        StoreGoodsConfigData      = new StoreGoodsConfig();
        BaseDataBuyConfigData     = new BaseDataBuyConfig();
        TaskConfigData            = new TaskDataConfig();
        AwardPackConfigData       = new AwardPackDataConfig();
        PractiseConfig            = new PractiseConfig();
        PracticePveConfig         = new PracticePveConfig();
        PractiseStepConfig        = new PractiseStepConfig();
        GameModeConfig            = new GameModeConfig();
        TrainingConfig            = new TrainingConfig();
        TattooConfig              = new TattooConfig();
        EquipmentConfigData       = new EquipmentConfig();
        TourConfig                = new TourConfig();
        GuideConfig               = new GuideConfig();
        FunctionConditionConfig   = new FunctionConditionConfig();
        RoleShapeConfig           = new RoleShapeConfig();
        FashionConfig             = new FashionConfig();
        FashionShopConfig         = new FashionShopConfig();
        VipPrivilegeConfig        = new VipPrivilegeConfig();
        pushConfig                = new PushConfig();
        presentHpConfigData       = new PresentHpConfig();
        LotteryConfig             = new LotteryConfig();
        starAttrConfig            = new StarAttrConfig();
        qualityAttrCorConfig      = new QualityAttrCorConfig();
        skillUpConfig             = new SkillUpConfig();
        RankConfig                = new RankConfig();
        signConfig                = new SignConfig();
        NewComerSignConfig        = new NewComerSignConfig();
        FightingCapacityConfig    = new FightingCapacityConfig();
        BodyInfoListConfig        = new BodyInfoListConfig();
        BadgeSlotsConfig          = new BadgeSlotConfig();
        GoodsComposeNewConfigData = new GoodsComposeNewConfig();

        SceneConfig = new SceneConfig();

        ReboundAttrConfigData    = new ReboundAttrConfig();
        CareerConfigData         = new CareerConfig();
        PotientialEffectConfig   = new PotientialEffectConfig();
        PVPPointConfig           = new PVPPointConfig();
        WinningStreakAwardConfig = new WinningStreakAwardConfig();
        ArticleStrengthConfig    = new ArticleStrengthConfig();
        PhRegainConfig           = new PhRegainConfig();
        MatchAchievementConfig   = new MatchAchievementConfig();
        SpecialActionConfig      = new SpecialActionConfig();
        StealConfig           = new StealConfig();
        CurveRateConfig       = new CurveRateConfig();
        DunkRateConfig        = new DunkRateConfig();
        AIConfig              = new AIConfig();
        AttrReduceConfig      = new AttrReduceConfig();
        qualifyingConfig      = new QualifyingConfig();
        qualifyingNewConfig   = new QualifyingNewConfig();
        qualifyingNewerConfig = new QualifyingNewerConfig();
        bullFightConfig       = new BullFightConfig();
        HedgingConfig         = new HedgingConfig();
        roleGiftConfig        = new RoleGiftConfig();
        DebugConfig           = new DebugConfig();
        shootGameConfig       = new ShootGameConfig();
        MapConfig             = new MapConfig();
        activityConfig        = new ActivityConfig();
        trialConfig           = new TrialConfig();
        gameMatchConfig       = new GameMatchConfig();
        shootSolutionManager  = new ShootSolutionManager();
        talentConfig          = new TalentConfig();
        ladderConfig          = new LadderConfig();
        matchSoundConfig      = new MatchSoundConfig();
        matchMsgConfig        = new MatchMsgConfig();
        MatchPointsConfig     = new MatchPointsConfig();
        AnimationSampleManager.Instance.LoadXml();
    }