Class BaseGangZone
Provides the shared data and functionality of a gang zone, regardless of whether it is global (GangZone) or scoped to a single player (PlayerGangZone).
public abstract class BaseGangZone : IdProvider
- Inheritance
-
BaseGangZone
- Derived
- Inherited Members
Constructors
BaseGangZone(IOmpEntityProvider, IGangZonesComponent, IGangZone)
Initializes a new instance of the BaseGangZone class.
protected BaseGangZone(IOmpEntityProvider entityProvider, IGangZonesComponent gangZones, IGangZone gangZone)
Parameters
entityProviderIOmpEntityProvidergangZonesIGangZonesComponentgangZoneIGangZone
Properties
Color
Gets or sets the Color of this gang zone.
public virtual Color Color { get; set; }
Property Value
IsOmpEntityDestroyed
Gets a value indicating whether the open.mp entity counterpart has been destroyed.
protected bool IsOmpEntityDestroyed { get; }
Property Value
Max
Gets the maximum position of this gang zone as a Vector2.
public virtual Vector2 Max { get; }
Property Value
MaxX
Gets the maximum x coordinate of this gang zone.
public virtual float MaxX { get; }
Property Value
MaxY
Gets the maximum y coordinate of this gang zone.
public virtual float MaxY { get; }
Property Value
Min
Gets the minimum position of this gang zone as a Vector2.
public virtual Vector2 Min { get; }
Property Value
MinX
Gets the minimum x coordinate of this gang zone.
public virtual float MinX { get; }
Property Value
MinY
Gets the minimum y coordinate of this gang zone.
public virtual float MinY { get; }
Property Value
Methods
GetShownFor()
Enumerates the players for whom this gang zone is currently shown.
public virtual IEnumerable<Player> GetShownFor()
Returns
- IEnumerable<Player>
A lazy sequence of Player components.
OnDestroyComponent()
This method is invoked before this component is destroyed and removed from its entity.
protected override void OnDestroyComponent()
SetPosition(Vector2, Vector2)
Updates the boundary of this gang zone.
public virtual void SetPosition(Vector2 min, Vector2 max)
Parameters
ToString()
public override string ToString()
Returns
Operators
implicit operator IGangZone(BaseGangZone?)
Performs an implicit conversion from BaseGangZone to IGangZone.
public static implicit operator IGangZone(BaseGangZone? gangZone)
Parameters
gangZoneBaseGangZone