Example #1
0
        public Cockroach(WorldScene worldScene, Vector3 vector3)
        {
            Scene = worldScene;

            Position.x = vector3.X;
            Position.y = vector3.Y;
            Position.z = vector3.Z;

            base.Health = 10;
            base.Damage = 2;
        }
        public EndOfWorldAnimation(WorldScene worldScene, double duration)
            : base(duration, VisualPriorities.Default.EndOfWorldAnimation)
        {
            WorldScene = worldScene;
            Simulator = worldScene.Simulator;

            Main.GameInProgress = null;
            WorldScene.CanSelectCelestialBodies = false;
            WorldScene.CanGoBackToMainMenu = false;
            Simulator.HelpBar.Fade(Simulator.HelpBar.Alpha, 0, 500);
            Simulator.Scene.VisualEffects.Add(WorldScene.LevelStates, Core.Visual.VisualEffects.Fade(WorldScene.LevelStates.Alpha, 0, 0, 1000));
        }
        public EndOfWorld1Animation(WorldScene worldScene)
            : base(worldScene, /*30000*/ int.MaxValue /*tmp*/)
        {
            Path = Simulator.PlanetarySystemController.Path;

            // Prepare celestial bodies to destroy
            CelestialBodiesToDestroy = new List<CelestialBody>();

            foreach (var cb in Path.CelestialBodies)
                if (cb != Path.FirstCelestialBody && cb != Path.LastCelestialBody)
                    CelestialBodiesToDestroy.Add(cb);

            MothershipAnimation = new MothershipAnimation(Simulator)
            {
                ArrivalZoom = 0.7f,
                DepartureZoom = 1f,
                CelestialBodies = CelestialBodiesToDestroy,
                TimeBeforeArrival = 0,
                TimeArrival = 5500,
                TimeBeforeLights = 5500,
                TimeLights = 2000,
                TimeBeforeDestruction = 7500,
                TimeBeforeDeparture = 17500,
                TimeDeparture = 5000
            };

            // Switch the music

            // Stop spawning enemies
            // Verify with Xbox 360 controller (vibration on edges)

            // To check:


            worldScene.NeedReinit = true;
            Simulator.SpawnEnemies = false;
            //Path.RemoveCelestialBody(Path.FirstCelestialBody);

            TmpEndOfAlpha = new Text("End of demo!", "Pixelite")
            {
                SizeX = 4,
                Alpha = 0,
                VisualPriority = VisualPriorities.Default.Path + 0.01
            }.CenterIt();
            Simulator.Scene.VisualEffects.Add(TmpEndOfAlpha, VisualEffects.FadeInFrom0(255, 20000, 2000));
        }
Example #4
0
 private void Step_02()
 {
     if (Globals.Instance.TutorialMgr.CurrentScene != null)
     {
         if (Globals.Instance.TutorialMgr.CurrentScene is GUIGameResultFailureScene)
         {
             this.InitParms();
             base.ResetFadeBGArea();
             base.Step_FailureOKBtn();
             return;
         }
         if (Globals.Instance.TutorialMgr.CurrentScene is GUIMainMenuScene)
         {
             this.InitParms();
             GameUIManager.mInstance.ShowPlotDialog(1006, new GUIPlotDialog.FinishCallback(base.Step_PVEBtn), null);
             return;
         }
         if (Globals.Instance.TutorialMgr.CurrentScene is GUIWorldMap)
         {
             this.InitParms();
             base.ResetFadeBGArea();
             base.Step_SceneBtn(1, "tutorial1_1");
             base.PlaySound("tutorial_014");
             return;
         }
         if (Globals.Instance.TutorialMgr.CurrentScene is GameUIAdventureReady)
         {
             this.InitParms();
             base.Step_StartSceneBtn("tutorial42");
             base.PlaySound("tutorial_015");
             return;
         }
     }
     if (Globals.Instance.TutorialMgr.CurrentScene is GUIGameResultVictoryScene)
     {
         TutorialEntity.SetNextTutorialStep(3, TutorialManager.ETutorialNum.Tutorial_Null, false, true, false);
         return;
     }
     if (this.hasCastSkill || this.hasConcentratedFire)
     {
         TutorialEntity.SetNextTutorialStep(3, TutorialManager.ETutorialNum.Tutorial_Null, false, false, false);
         return;
     }
     if (Globals.Instance.TutorialMgr.CurrentScene is GUICombatMain)
     {
         this.combatMain = TutorialEntity.ConvertObject2UnityOrPrefab<GUICombatMain>();
     }
     if (this.combatMain == null)
     {
         return;
     }
     if (Globals.Instance.ActorMgr.CurScene is WorldScene)
     {
         this.mWorldScene = (WorldScene)Globals.Instance.ActorMgr.CurScene;
     }
     if (Globals.Instance.TutorialMgr.CurrentScene == null && this.status == -2)
     {
         this.player = Globals.Instance.ActorMgr.PlayerCtrler;
         this.player.TutorialCanMove = false;
         GameUIManager.mInstance.ShowFadeBG(5900, 3000);
         this.status = -1;
     }
     if (Globals.Instance.TutorialMgr.CurrentScene is GUIGameStateTip && this.status == -1)
     {
         GameUIManager.mInstance.HideFadeBG(false);
         Globals.Instance.ActorMgr.Pause(false);
         if (this.player == null)
         {
             this.player = Globals.Instance.ActorMgr.PlayerCtrler;
         }
         this.player.TutorialCanMove = true;
         this.Step_Move();
         this.status = 1;
     }
 }
Example #5
0
 private void InitParms()
 {
     this.status = -2;
     this.hasCastSkill = false;
     this.hasConcentratedFire = false;
     this.moveTarget = null;
     this.diJingActor = null;
     this.mWorldScene = null;
 }
Example #6
0
        public EndOfWorldAnimation GetEndOfWorldAnimation(WorldScene scene)
        {
            EndOfWorldAnimation result = null;

            switch (scene.Id)
            {
                case 1:
                    result = new EndOfWorld1Animation(scene);
                    break;
            }

            return result;
        }
Example #7
0
 private void InitScene()
 {
     switch (this.senceInfo.Type)
     {
     case 0:
         if (GameConst.GetInt32(110) == this.senceInfo.ID)
         {
             this.baseScene = new StartScene(this);
         }
         else if (this.senceInfo.SubType == 0)
         {
             if (this.worldScene == null)
             {
                 this.worldScene = new WorldScene(this);
             }
             this.baseScene = this.worldScene;
         }
         else
         {
             if (this.defenseScene == null)
             {
                 this.defenseScene = new DefenseScene(this);
             }
             this.baseScene = this.defenseScene;
         }
         break;
     case 1:
         if (this.trialScene == null)
         {
             this.trialScene = new TrialScene(this);
         }
         this.baseScene = this.trialScene;
         break;
     case 2:
         if (this.arenaScene == null)
         {
             this.arenaScene = new ArenaScene(this);
         }
         this.baseScene = this.arenaScene;
         break;
     case 3:
         if (this.worldBossScene == null)
         {
             this.worldBossScene = new WorldBossScene(this);
         }
         this.baseScene = this.worldBossScene;
         break;
     case 4:
         if (this.pillageScene == null)
         {
             this.pillageScene = new PillageScene(this);
         }
         this.baseScene = this.pillageScene;
         break;
     case 5:
         if (this.guildBossScene == null)
         {
             this.guildBossScene = new GuildBossScene(this);
         }
         this.baseScene = this.guildBossScene;
         break;
     case 6:
         if (this.senceInfo.SubType == 0 || this.senceInfo.SubType == 1)
         {
             this.baseScene = new KingRewardScene1(this);
         }
         else
         {
             this.baseScene = new KingRewardScene2(this);
         }
         break;
     case 7:
         if (this.memoryGearScene == null)
         {
             this.memoryGearScene = new MemoryGearScene(this);
         }
         this.baseScene = this.memoryGearScene;
         break;
     case 8:
         if (this.orePillageScene == null)
         {
             this.orePillageScene = new OrePillageScene(this);
         }
         this.baseScene = this.orePillageScene;
         break;
     case 9:
         if (this.guildPvpScene == null)
         {
             this.guildPvpScene = new GuildPvpScene(this);
         }
         this.baseScene = this.guildPvpScene;
         break;
     default:
         global::Debug.LogErrorFormat("senceInfo type error, type = {0}", new object[]
         {
             this.senceInfo.Type
         });
         break;
     }
     if (this.baseScene == null)
     {
         global::Debug.LogError(new object[]
         {
             "baseScene is null"
         });
         return;
     }
     this.baseScene.SetSceneInfo(this.senceInfo);
     this.baseScene.Init();
     this.LoadRespawnInfo();
     this.InitEnvironment();
 }
Example #8
0
 private void Step_02()
 {
     if (Globals.Instance.TutorialMgr.CurrentScene != null)
     {
         if (Globals.Instance.TutorialMgr.CurrentScene is GUIGameResultFailureScene)
         {
             this.InitParms();
             base.ResetFadeBGArea();
             base.Step_FailureOKBtn();
             return;
         }
         if (Globals.Instance.TutorialMgr.CurrentScene is GUIMainMenuScene)
         {
             this.InitParms();
             base.Step_PVEBtn();
             return;
         }
         if (Globals.Instance.TutorialMgr.CurrentScene is GUIWorldMap)
         {
             this.InitParms();
             base.ResetFadeBGArea();
             base.Step_SceneBtn(2, "tutorial43");
             base.PlaySound("tutorial_021");
             return;
         }
         if (Globals.Instance.TutorialMgr.CurrentScene is GameUIAdventureReady)
         {
             this.InitParms();
             base.Step_StartSceneBtn("tutorial44");
             base.PlaySound("tutorial_022");
             return;
         }
     }
     if (Globals.Instance.TutorialMgr.CurrentScene is GUIGameResultVictoryScene)
     {
         TutorialEntity.SetNextTutorialStep(3, TutorialManager.ETutorialNum.Tutorial_Null, false, true, false);
         return;
     }
     if (this.hasCastAOESkill)
     {
         TutorialEntity.SetNextTutorialStep(3, TutorialManager.ETutorialNum.Tutorial_Null, false, false, false);
         return;
     }
     if (Globals.Instance.TutorialMgr.CurrentScene is GUICombatMain)
     {
         this.combatMain = TutorialEntity.ConvertObject2UnityOrPrefab<GUICombatMain>();
         if (this.combatMain == null)
         {
             return;
         }
         this.player = Globals.Instance.ActorMgr.PlayerCtrler;
         this.singleSkillBtn = GameUITools.FindGameObject("right-bottom/skill1", this.combatMain.gameObject).GetComponent<CombatMainSkillButton>();
         this.aoeSkillBtn = GameUITools.FindGameObject("right-bottom/skill2", this.combatMain.gameObject).GetComponent<CombatMainSkillButton>();
         if (Globals.Instance.ActorMgr.CurScene is WorldScene)
         {
             this.mWorldScene = (WorldScene)Globals.Instance.ActorMgr.CurScene;
         }
         if (this.aoeSkillBtn == null)
         {
             global::Debug.LogError(new object[]
             {
                 "skill is null"
             });
             return;
         }
         this.status = 3;
     }
 }
Example #9
0
 private void InitParms()
 {
     this.status = 0;
     this.hasCastAOESkill = false;
     this.catActor = null;
     this.mWorldScene = null;
     this.hasConcentratedFire = false;
 }