Beispiel #1
0
        public override int GetHashCode()
        {
            int hash = 1;

            if (Id.Length != 0)
            {
                hash ^= Id.GetHashCode();
            }
            if (Name.Length != 0)
            {
                hash ^= Name.GetHashCode();
            }
            if (ChallengeLeavingWarningRadius != 0F)
            {
                hash ^= pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.GetHashCode(ChallengeLeavingWarningRadius);
            }
            if (ArenaScene.Length != 0)
            {
                hash ^= ArenaScene.GetHashCode();
            }
            if (BaseDifficulty != 0)
            {
                hash ^= BaseDifficulty.GetHashCode();
            }
            if (_unknownFields != null)
            {
                hash ^= _unknownFields.GetHashCode();
            }
            return(hash);
        }
 public GameBoardController(GameInstance game, Entity crosshairCursor,
                            ArenaScene arenaScene, Replay replay = null)
 {
     _game            = game;
     _arenaScene      = arenaScene;
     _crosshairCursor = crosshairCursor;
     _replay          = replay;
     _eventHub        = new GameEventHub(game);
     _eventHub.AddSubscriber(this);
 }
Beispiel #3
0
    override public BaseScene CreateScene(int resId)
    {
        BaseScene scene = new ArenaScene();

        if (!InitScene(scene, resId))
        {
            return(null);
        }

        return(scene);
    }
Beispiel #4
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();
 }
Beispiel #5
0
 public PlayerController(ArenaScene arenaScene, GameInstance game)
 {
     _arenaScene            = arenaScene;
     _aiRuleBasedController = new AiRuleBasedController(game);
 }