/// <summary> /// Outpost constructor /// </summary> /// <param name="outpostStartPosition">The position of the outpost</param> public Outpost(string id, RftVector outpostStartPosition) { this._id = id; this.Position = outpostStartPosition; _subLauncher = new SubLauncher(); this._outpostOwner = null; this._specialistManager = new SpecialistManager(100); _shieldManager = new ShieldManager(10); }
public WorkManager(List<WorkPackageDef> workPackages, Droid droid) : this(droid) { specialist = new SpecialistManager(droid); foreach(var package in workPackages) { AddWorkPackage(package); } }
/// <summary> /// Outpost constructor /// </summary> /// <param name="outpostStartPosition">The outpost position</param> /// <param name="outpostOwner">The outpost's owner</param> /// <param name="type">The type of outpost to create</param> public Outpost(string id, RftVector outpostStartPosition, Player outpostOwner, OutpostType type) { this._id = id; this.Position = outpostStartPosition; _subLauncher = outpostOwner == null ? new SubLauncher() : new SubLauncher(40); this._outpostOwner = outpostOwner; this._specialistManager = new SpecialistManager(100); _shieldManager = new ShieldManager(10); this._type = type; }
// shield recharge rate when implemented /// <summary> /// Outpost constructor /// </summary> /// <param name="outpostPosition">The position of the outpost</param> public Outpost(RftVector outpostPosition) { this._id = IdGenerator.GetNextId(); this.Position = outpostPosition; this._drillerCount = 0; this._outpostOwner = null; this._specialistManager = new SpecialistManager(100); this._shieldActive = true; this._shieldCapacity = 10; this._shields = 0; }
/// <summary> /// Sub constructor /// </summary> /// <param name="source">The initial location of the sub</param> /// <param name="destination">The destination of the sub</param> /// <param name="launchTime">The time of launch</param> /// <param name="drillerCount">The amount of drillers to launch</param> /// <param name="owner">The owner</param> public Sub(ILaunchable source, ITargetable destination, GameTick launchTime, int drillerCount, Player owner) : base() { this._id = IdGenerator.GetNextId(); this._source = source; this._destination = destination; this._launchTime = launchTime; this._drillerCount = drillerCount; this.Position = source.GetCurrentPosition(); this._owner = owner; this._specialistManager = new SpecialistManager(3); }
/// <summary> /// Sub constructor /// </summary> /// <param name="source">The initial location of the sub</param> /// <param name="destination">The destination of the sub</param> /// <param name="launchTime">The time of launch</param> /// <param name="drillerCount">The amount of drillers to launch</param> /// <param name="owner">The owner</param> public Sub(string id, ISubLauncher source, ICombatable destination, GameTick launchTime, int drillerCount, Player owner) : base() { this._id = id; this._source = source; this._destination = destination; this._launchTime = launchTime; this._subLauncher = new SubLauncher(drillerCount); this.StartPosition = source.GetCurrentPosition(launchTime); this._owner = owner; this._specialistManager = new SpecialistManager(3); _shieldManager = new ShieldManager(5); }
/// <summary> /// Outpost constructor /// </summary> /// <param name="outpostPosition">The outpost position</param> /// <param name="outpostOwner">The outpost's owner</param> /// <param name="type">The type of outpost to create</param> public Outpost(RftVector outpostPosition, Player outpostOwner, OutpostType type) { this._id = IdGenerator.GetNextId(); this.Position = outpostPosition; this._drillerCount = outpostOwner == null ? 0 : 40; this._outpostOwner = outpostOwner; this._specialistManager = new SpecialistManager(100); this._shieldActive = true; this._shieldCapacity = 10; this._shields = 0; this._type = type; }
public IHttpActionResult GetSpecialist() { try { SpecialistManager manager = new SpecialistManager(); List <Specialist> lista = manager.Obtener(); GetSpecialists temp; temp.specialists = lista; return(Ok(temp)); }catch (Exception e) { return(NotFound()); } }
public IHttpActionResult GetQuotation(int id) { try { SpecialistManager manager = new SpecialistManager(); List <Quotation> lista = manager.Quotations(id); GetQuotations temp; temp.quotations = lista; return(Ok(temp)); } catch (Exception e) { return(NotFound()); } }
public IHttpActionResult GetFavorite(int id) { try { SpecialistManager manager = new SpecialistManager(); List <Favorite> lista = manager.Favorite(id); GetFavorites temp; temp.favorites = lista; return(Ok(temp)); } catch (Exception e) { return(NotFound()); } }
public IHttpActionResult GetSpecTag(int id) { try { SpecialistManager manager = new SpecialistManager(); List <SpecialistTag> lista = manager.SpecialistTag(id); GetSpecialistTags temp; temp.specialistTags = lista; return(Ok(temp)); } catch (Exception e) { return(NotFound()); } }
public IHttpActionResult PutSpecialist(int id, [FromBody] Specialist specialist) { try { SpecialistManager manager = new SpecialistManager(); Specialist result = manager.Editar(id, specialist); if (result != null) { return(Ok()); } else { return(BadRequest()); } }catch (Exception e) { return(NotFound()); } }
public IHttpActionResult PostAuthentication([FromBody] Input obj) { try { SpecialistManager manager = new SpecialistManager(); Specialist result = manager.Authentication(obj); if (result != null) { return(Ok(result)); } else { return(Unauthorized()); } }catch (Exception e) { return(NotFound()); } }
public IHttpActionResult PostSpecialist([FromBody] Specialist specialist) { try { SpecialistManager manager = new SpecialistManager(); Specialist result = manager.Insertar(specialist); if (result != null) { return(Created(new Uri(Url.Link(ViewRouteName, new { id = result.id })), result)); } else { return(BadRequest()); } }catch (Exception e) { return(NotFound()); } }
public IHttpActionResult GetSpecialist(int id) { try { SpecialistManager manager = new SpecialistManager(); var specialist = manager.Obtener(id); if (specialist != null) { return(Ok(specialist)); } else { return(NotFound()); } }catch (Exception e) { return(NotFound()); } }
public IHttpActionResult DeleteSpecialist(int id) { try { SpecialistManager manager = new SpecialistManager(); Specialist result = manager.Eliminar(id); if (result != null) { return(Ok()); } else { return(BadRequest()); } }catch (Exception e) { return(NotFound()); } }
public IHttpActionResult GetUniqueFavorite(int id, int favoriteid) { try { SpecialistManager manager = new SpecialistManager(); Favorite favorite = manager.FavoriteUnique(favoriteid); if (favorite.specialist.id == id) { return(Ok(favorite)); } else { return(BadRequest()); } } catch (Exception e) { return(NotFound()); } }
public IHttpActionResult GetUniqueSpecTag(int id, int specialisttagid) { try { SpecialistManager manager = new SpecialistManager(); SpecialistTag specialisttag = manager.SpecialistTagUnique(specialisttagid); if (specialisttag.specialist.id == id) { return(Ok(specialisttag)); } else { return(BadRequest()); } } catch (Exception e) { return(NotFound()); } }
public IHttpActionResult GetQuotation(int id, int quotationsid) { try { SpecialistManager manager = new SpecialistManager(); Quotation quotation = manager.QuotationsUnique(id); if (quotation.specialist.id == id) { return(Ok(quotation)); } else { return(BadRequest()); } } catch (Exception e) { return(NotFound()); } }