Exemple #1
0
        protected GameEngineSandboxVariant(GameEngineVariant variantManager)
        {
            MegaloVariant = GameEngineMegaloVariant.Create(variantManager);

            EditorTraits = MegaloVariant.BaseVariant.NewPlayerTraits();

            RevertToDefault();
        }
Exemple #2
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());
            }
        }