mirror of
https://github.com/thegeneralist01/Scene-Manager-DevRepo
synced 2026-01-11 15:40:29 +01:00
Fixed speed zones being added on non-collector waypoints. Fixed speed zone being created at the player's position instead of the waypoint's position. Added function to remove waypoint blips and speed zone.
This commit is contained in:
parent
87e1b591f4
commit
5686363cb6
1 changed files with 28 additions and 12 deletions
|
|
@ -31,18 +31,21 @@ namespace SceneManager
|
|||
IsCollector = collector;
|
||||
CollectorRadius = collectorRadius;
|
||||
SpeedZoneRadius = speedZoneRadius;
|
||||
AddSpeedZone();
|
||||
CollectorRadiusBlip = new Blip(waypointBlip.Position, collectorRadius)
|
||||
if (collector)
|
||||
{
|
||||
Color = waypointBlip.Color,
|
||||
};
|
||||
if (SettingsMenu.mapBlips.Checked)
|
||||
{
|
||||
CollectorRadiusBlip.Alpha = 0.5f;
|
||||
}
|
||||
else
|
||||
{
|
||||
CollectorRadiusBlip.Alpha = 0f;
|
||||
AddSpeedZone();
|
||||
CollectorRadiusBlip = new Blip(waypointBlip.Position, collectorRadius)
|
||||
{
|
||||
Color = waypointBlip.Color,
|
||||
};
|
||||
if (SettingsMenu.mapBlips.Checked)
|
||||
{
|
||||
CollectorRadiusBlip.Alpha = 0.5f;
|
||||
}
|
||||
else
|
||||
{
|
||||
CollectorRadiusBlip.Alpha = 0f;
|
||||
}
|
||||
}
|
||||
DrawWaypointMarker();
|
||||
}
|
||||
|
|
@ -89,7 +92,7 @@ namespace SceneManager
|
|||
{
|
||||
IsCollector = true;
|
||||
RemoveSpeedZone();
|
||||
SpeedZone = World.AddSpeedZone(Game.LocalPlayer.Character.Position, SpeedZoneRadius, speed);
|
||||
SpeedZone = World.AddSpeedZone(currentWaypoint.Position, SpeedZoneRadius, speed);
|
||||
Blip.Color = Color.Blue;
|
||||
if (CollectorRadiusBlip)
|
||||
{
|
||||
|
|
@ -139,6 +142,19 @@ namespace SceneManager
|
|||
}
|
||||
}
|
||||
|
||||
internal void Remove()
|
||||
{
|
||||
if (Blip)
|
||||
{
|
||||
Blip.Delete();
|
||||
}
|
||||
if (CollectorRadiusBlip)
|
||||
{
|
||||
CollectorRadiusBlip.Delete();
|
||||
}
|
||||
RemoveSpeedZone();
|
||||
}
|
||||
|
||||
internal void AddSpeedZone()
|
||||
{
|
||||
SpeedZone = World.AddSpeedZone(Position, SpeedZoneRadius, Speed);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue