コード例 #1
0
ファイル: TestTrader.cs プロジェクト: alkonior/Online_games
 public TestTrader(GInt gInt, int?p) : base(gInt, "Торговец С. О. Лями", p,
                                            new List <IBaseActions>
 {
     new DealerAction(new List <CItemInventory>
     {
         new CItemInventory(GItemsList.GetId("Палка")),
     }
                      , 10)
     ,
     new DealerAction(new List <CItemInventory>
     {
         new CItemInventory(GItemsList.GetId("Говно"))
     }
                      , 20),
     new DealerAction(new List <CItemInventory>
     {
         new CItemInventory(GItemsList.GetId("Металл"))
     }
                      , 40),
 },
                                            "/img/baryga.jpg"
                                            )
 {
     Description = "Я вас категорически приветствую.\nПока вы осматриваете ассортимент,\nпредлагаю отведать наш новый эликсир здоровья.";
 }
コード例 #2
0
ファイル: Startup.cs プロジェクト: alkonior/Online_games
        // This method gets called by the runtime. Use this method to configure the HTTP request pipeline.
        public void Configure(IApplicationBuilder app, IHostingEnvironment env)
        {
            if (env.IsDevelopment())
            {
                app.UseDeveloperExceptionPage();
                app.UseDatabaseErrorPage();
            }
            else
            {
                app.UseExceptionHandler("/Home/Error");
                // The default HSTS value is 30 days. You may want to change this for production scenarios, see https://aka.ms/aspnetcore-hsts.
                app.UseHsts();
            }

            //app.UseHttpsRedirection();
            app.UseStaticFiles();

            app.UseAuthentication();

            app.UseMvc(routes =>
            {
                routes.MapRoute(
                    name: "default",
                    template: "{controller=Home}/{action=Index}/{id?}");
            });

            app.UseCookiePolicy();

            GMobsList.init();
            GItemsList.init();
            GWorld.init();
        }
コード例 #3
0
ファイル: CItem.cs プロジェクト: alkonior/Online_games
 public CItemDescription(int id, string name, string description, string picture)
 {
     if (GItemsList.ItemsList.ContainsKey(id))
     {
         throw new Exception("Item already exist");
     }
     Id          = id;
     Name        = name;
     Description = description;
     Picture     = picture;
     GItemsList.Add(this);
 }
コード例 #4
0
ファイル: CItem.cs プロジェクト: alkonior/Online_games
 public virtual CItemDescription Description()
 {
     return(GItemsList.Get(this.Id));
 }
コード例 #5
0
 public override CItemDescription Description()
 {
     return(((CEquipmentDescription)GItemsList.Get(Id)).Use(Bonus));
 }