コード例 #1
0
        void InitializeVariant()
        {
            var engine = GameBuild.Engine;

            mLanguageSystemRef = engine.GetSystem <Localization.LanguageSystem>(GameBuild);

            if (RequiresMegaloProtoSystem)
            {
                mMegaloProtoSystemRef = engine.TryGetSystem <Megalo.Proto.MegaloProtoSystem>(GameBuild);
            }

            switch (Type)
            {
            case GameEngineType.None:
                Variant = GameEngineBaseVariant.Create(this);
                break;

            case GameEngineType.Sandbox:
                Variant = GameEngineSandboxVariant.Create(this);
                break;

            case GameEngineType.Megalo:
                Variant = GameEngineMegaloVariant.Create(this);
                break;

            case GameEngineType.Campaign:
                Variant = GameEngineCampaignVariant.Create(this);
                break;

            case GameEngineType.Survival:
                throw new NotImplementedException(Type.ToString());

            //Variant = GameEngineSurvivalVariant.Create(this);
            //break;
            case GameEngineType.Firefight:
                throw new NotImplementedException(Type.ToString());
            //Variant = GameEngineFirefightVariant.Create(this);
            //break;

            default: throw new KSoft.Debug.UnreachableException(Type.ToString());
            }
        }
コード例 #2
0
 protected GameEngineCampaignVariant(GameEngineVariant variantManager)
 {
     BaseVariant = GameEngineBaseVariant.Create(variantManager);
 }