コード例 #1
0
        public override void EnterScene()
        {
            TransitionEngine.onTransitionComplete += OnTransitionComplete;
            TransitionEngine.onScreenObscured     += OnScreenObscured;

            UserData user = UserManager.GetInstance().user;

            DisassemblygirlDungeonConfig config = ConfigMgr.GetInstance().DisassemblygirlDungeon.GetConfigById(currentDungeonIndex);

            dungeon = DungeonData.FromConfig(config);

            CreateMap(dungeon.resourceID);

            girlEntity = CreateGirlEntity(user.girl);
            girlEntity.Play(AnimationDefs.Idle.ToString().ToLower());

            petEntity = CreatePetEntity(user.GetActivePet());

            if (petEntity != null)
            {
                petEntity.Flip();
            }

            LayerManager.GetInstance().AddPopUpView <DungeonWindow>();
            LayerManager.GetInstance().AddPopUpView <DungeonReadyBar>();
        }
コード例 #2
0
        private void OnUserApplyPet(object data)
        {
            PetData petData = data as PetData;

            if (petEntity != null)
            {
                petEntity.Dispose();
                petEntity = null;
            }

            petEntity = CreatePetEntity(petData);
        }
コード例 #3
0
        private void OnPetLevelUp(object data)
        {
            PetData petData = data as PetData;

            if (petEntity != null)
            {
                if (UserManager.GetInstance().user.activePetID == petData.id)
                {
                    petEntity.Dispose();
                    petEntity = null;

                    petEntity = CreatePetEntity(petData);
                }
            }
        }
コード例 #4
0
        private PetEntity2D CreatePetEntity(PetData petData)
        {
            if (petData == null)
            {
                return(null);
            }

            PetEntity2D entity = ResourceUtils.GetComponent <PetEntity2D>(GlobalDefinitions.RESOURCE_PATH_PET + petData.resourceID);

            entity.BindData(petData);

            LayerManager.GetInstance().AddObject(entity.transform);
            entity.transform.position = mapWrapper.petSpwanPoint.Value;

            return(entity);
        }
コード例 #5
0
        public override void EnterScene()
        {
            CameraManager.GetInstance().openCamera(CameraType.Guide);

            UserData user = UserManager.GetInstance().user;

            TransitionEngine.onTransitionComplete += OnTransitionComplete;
            TransitionEngine.onScreenObscured     += OnScreenObscured;

            CreateMap();

            girlEntity = CreateGirlEntity(user.girl);
            girlEntity.Flip();

            petEntity = CreatePetEntity(user.GetActivePet());

            LayerManager.GetInstance().AddPopUpView <HomeWindow>();

            SoundManager.GetInstance().PlayBackgroundMusic(AudioRepository.BG_HOME.AsAudioClip(), 1.0f);

            EventBox.Send(CustomEvent.HOME_SHOW_FUNCTIONS);

            GuideManager.GetInstance().Trigger(GuideScriptID.G01);
        }