Add MEGA Ocean Liner, split decks, and detailed ship materials
This commit is contained in:
@@ -13,9 +13,51 @@ namespace BigShipTycoon
|
||||
case SunAttraction.MiniGolf: BuildPuttingGreens(venue, top); break;
|
||||
case SunAttraction.GoKarts: BuildKartCircuit(venue, top); break;
|
||||
case SunAttraction.RollerCoaster: BuildCoaster(venue, top); break;
|
||||
case SunAttraction.SkyGarden: BuildSkyGarden(venue, top); break;
|
||||
}
|
||||
}
|
||||
|
||||
private void BuildSkyGarden(SunDeckVenue venue, float top)
|
||||
{
|
||||
Vector2 half = venue.HalfSize;
|
||||
var floor = new Vector3(0, top + .055f, 0);
|
||||
Coat(Paint.TeakSeam).Box(floor, new Vector3(half.x * 1.94f, .11f, half.y * 1.91f));
|
||||
PoolBasin(Coat(Paint.Pearl), Coat(Paint.BlueGlass), Coat(Paint.Pool), floor + Vector3.up * .01f,
|
||||
new Vector2(2.8f, .77f), .27f, .17f, true);
|
||||
|
||||
for (int side = -1; side <= 1; side += 2)
|
||||
{
|
||||
float pathEdge = side * half.y * .70f;
|
||||
for (int group = -1; group <= 1; group++)
|
||||
{
|
||||
float x = group * half.x * .55f;
|
||||
var basePoint = new Vector3(x, top + .22f, pathEdge);
|
||||
Coat(Paint.Ivory).Box(basePoint, new Vector3(2.35f, .44f, 1.39f));
|
||||
Coat(Paint.Turf).Box(basePoint + Vector3.up * .225f, new Vector3(2.15f, .04f, 1.21f));
|
||||
for (int tree = -1; tree <= 1; tree += 2)
|
||||
{
|
||||
var stem = basePoint + new Vector3(tree * .51f, .23f, -.08f * side);
|
||||
float height = 1.07f + .14f * (tree == side ? 1 : 0);
|
||||
Coat(Paint.TeakSeam).Rod(stem, stem + Vector3.up * height, .072f, 7);
|
||||
Coat(Paint.Fringe).Radome(stem + Vector3.up * (height + .11f), .57f);
|
||||
Coat(Paint.Turf).Radome(stem + new Vector3(.25f * side, height + .44f, .12f), .34f);
|
||||
}
|
||||
}
|
||||
|
||||
for (int end = -1; end <= 1; end += 2)
|
||||
{
|
||||
float x = end * half.x * .67f;
|
||||
var foot = new Vector3(x, top, side * half.y * .35f);
|
||||
Coat(Paint.Steel).Rod(foot, foot + Vector3.up * 2.67f, .065f, 8);
|
||||
Coat(Paint.Teak).Box(foot + new Vector3(-end * .5f, .46f, -side * .40f), new Vector3(1.75f, .18f, .58f));
|
||||
}
|
||||
}
|
||||
for (int step = -9; step <= 9; step++)
|
||||
Coat(Paint.Pearl).Box(new Vector3(step * .64f, top + 2.68f, 0), new Vector3(.22f, .12f, half.y * .75f));
|
||||
for (int side = -1; side <= 1; side += 2)
|
||||
Coat(Paint.Steel).Box(new Vector3(0, top + 2.56f, side * half.y * .35f), new Vector3(half.x * 1.4f, .12f, .12f));
|
||||
}
|
||||
|
||||
private void BuildPuttingGreens(SunDeckVenue venue, float top)
|
||||
{
|
||||
Vector2 half = venue.PuttingHalfSize;
|
||||
@@ -171,8 +213,13 @@ namespace BigShipTycoon
|
||||
internal readonly SunDeckVenue Venue;
|
||||
internal readonly Transform[] Vehicles = new Transform[3];
|
||||
internal float Phase;
|
||||
internal readonly float DeckHeight;
|
||||
|
||||
internal SunDeckRide(SunDeckVenue venue) => Venue = venue;
|
||||
internal SunDeckRide(SunDeckVenue venue, float deckHeight)
|
||||
{
|
||||
Venue = venue;
|
||||
DeckHeight = deckHeight;
|
||||
}
|
||||
}
|
||||
|
||||
internal float SunRidePhase(SunAttraction kind)
|
||||
@@ -185,6 +232,17 @@ namespace BigShipTycoon
|
||||
|
||||
private void AddSunAttractionGuests(Layout layout, SunDeckVenue venue, float height)
|
||||
{
|
||||
if (venue.Kind == SunAttraction.SkyGarden)
|
||||
{
|
||||
for (int side = -1; side <= 1; side += 2)
|
||||
{
|
||||
AddSunGuest(layout, venue, GuestActivity.Photograph, new Vector3(3.6f * side, height, .5f * side),
|
||||
193 + side, side * 92, (int)OnboardService.Amenities, .32f);
|
||||
AddSunGuest(layout, venue, GuestActivity.Talk, new Vector3(-1.7f * side, height, 2.1f * side),
|
||||
287 + side, side * 80, (int)OnboardService.Amenities, .52f);
|
||||
}
|
||||
return;
|
||||
}
|
||||
if (venue.Kind == SunAttraction.MiniGolf)
|
||||
{
|
||||
Vector2 half = venue.PuttingHalfSize;
|
||||
@@ -203,7 +261,7 @@ namespace BigShipTycoon
|
||||
return;
|
||||
|
||||
bool coaster = venue.Kind == SunAttraction.RollerCoaster;
|
||||
var ride = new SunDeckRide(venue);
|
||||
var ride = new SunDeckRide(venue, height - .015f);
|
||||
sunDeckRides.Add(ride);
|
||||
Transform track = Piece(coaster ? "Roller coaster train" : "Kart circuit traffic", layout.Room.transform).transform;
|
||||
track.SetLocalPositionAndRotation(venue.Position(Vector3.zero), venue.Orientation);
|
||||
@@ -213,7 +271,7 @@ namespace BigShipTycoon
|
||||
ride.Vehicles[i] = car.transform;
|
||||
FitRideVehicle(car.transform, coaster, i);
|
||||
}
|
||||
PositionRideVehicles(ride, height - .015f);
|
||||
PositionRideVehicles(ride);
|
||||
|
||||
Vector3 queue = new(-venue.HalfSize.x * .67f, height, venue.HalfSize.y * .91f);
|
||||
for (int i = 0; i < 3; i++)
|
||||
@@ -256,12 +314,13 @@ namespace BigShipTycoon
|
||||
{
|
||||
float pace = ride.Venue.Kind == SunAttraction.RollerCoaster ? .145f : .112f;
|
||||
ride.Phase = Mathf.Repeat(ride.Phase + Mathf.Max(0, delta) * pace, 1);
|
||||
PositionRideVehicles(ride, BridgeHeight);
|
||||
PositionRideVehicles(ride);
|
||||
}
|
||||
}
|
||||
|
||||
private static void PositionRideVehicles(SunDeckRide ride, float top)
|
||||
private static void PositionRideVehicles(SunDeckRide ride)
|
||||
{
|
||||
float top = ride.DeckHeight;
|
||||
float spacing = ride.Venue.Kind == SunAttraction.RollerCoaster ? .028f : .31f;
|
||||
for (int i = 0; i < ride.Vehicles.Length; i++)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user