C# Class GalaxyStorm.Services.Data.BuildingService

Inheritance: IBuildingsService
Mostrar archivo Open project: Pip3r4o/GalaxyStorm-MVC

Public Methods

Method Description
BuildingService ( IRepository users, ILogicProvider logic ) : System
CompleteBuilding ( string userId ) : void
GetPlayerBuildings ( string userId ) : Buildings
ScheduleBuildBarracks ( string userId ) : TimeSpan?
ScheduleBuildHeadQuarters ( string userId ) : TimeSpan?

Perform necessary checks and then take resources from player, set end date and return timespan for the background worker to trigger an even when time has elapsed

ScheduleCrystalExtractor ( string userId ) : TimeSpan?
ScheduleMetalScrapper ( string userId ) : TimeSpan?
ScheduleResearchCentre ( string userId ) : TimeSpan?
ScheduleSolarCollector ( string userId ) : TimeSpan?

Private Methods

Method Description
CanBuild ( PlayerObject pO, int toLevel, IBuilding buildingLogic ) : bool
SubstractResources ( PlayerObject pO, int resources ) : void

Method Details

BuildingService() public method

public BuildingService ( IRepository users, ILogicProvider logic ) : System
users IRepository
logic ILogicProvider
return System

CompleteBuilding() public method

public CompleteBuilding ( string userId ) : void
userId string
return void

GetPlayerBuildings() public method

public GetPlayerBuildings ( string userId ) : Buildings
userId string
return GalaxyStorm.Data.Models.PlayerObjects.Buildings

ScheduleBuildBarracks() public method

public ScheduleBuildBarracks ( string userId ) : TimeSpan?
userId string
return TimeSpan?

ScheduleBuildHeadQuarters() public method

Perform necessary checks and then take resources from player, set end date and return timespan for the background worker to trigger an even when time has elapsed
public ScheduleBuildHeadQuarters ( string userId ) : TimeSpan?
userId string
return TimeSpan?

ScheduleCrystalExtractor() public method

public ScheduleCrystalExtractor ( string userId ) : TimeSpan?
userId string
return TimeSpan?

ScheduleMetalScrapper() public method

public ScheduleMetalScrapper ( string userId ) : TimeSpan?
userId string
return TimeSpan?

ScheduleResearchCentre() public method

public ScheduleResearchCentre ( string userId ) : TimeSpan?
userId string
return TimeSpan?

ScheduleSolarCollector() public method

public ScheduleSolarCollector ( string userId ) : TimeSpan?
userId string
return TimeSpan?