Add acceleration to rafts

This commit is contained in:
Noah Pilarski 2022-10-08 17:52:10 -04:00
parent fd2f839d90
commit 25a56c65fc
2 changed files with 6 additions and 0 deletions

View File

@ -38,6 +38,7 @@ namespace NewHorizons.Builder.Props
raftController._riverFluid = null; raftController._riverFluid = null;
raftController._sector = sector; raftController._sector = sector;
raftController._acceleration = info?.acceleration ?? 5f;
sector.OnOccupantEnterSector += raftController.OnOccupantEnterSector; sector.OnOccupantEnterSector += raftController.OnOccupantEnterSector;
sector.OnOccupantExitSector += raftController.OnOccupantExitSector; sector.OnOccupantExitSector += raftController.OnOccupantExitSector;

View File

@ -233,6 +233,11 @@ namespace NewHorizons.External.Modules
/// Position of the raft /// Position of the raft
/// </summary> /// </summary>
public MVector3 position; public MVector3 position;
/// <summary>
/// Acceleration of the raft
/// </summary>
[DefaultValue(5f)] public float acceleration = 5f;
} }
[JsonObject] [JsonObject]