- Held tools sit lower and further right; the hammer faces forward and strikes about the camera's right - Headlamp leaves held items, treats and vending machines alone (rendering layer NoLamp); other lights keep lighting them - Hay grounded on the floor in world space (it floated) - Deck fence opens at each ladder, rail colliders split around it; ladders moved to 2 m off the edge middle, clear of the intakes; climbing goes over a rail only if one is in the way - Crew stand to the soil's up (Planet.Level): flat round the base, the ball's up past it, so the horizon stays level on a small planet - Convex roof hulls for the crew cabin, garage, pitched roof and windmill tower; cabin box lowered to the eaves - Rain and acid rain hits differ by surface: soil, grass, wood, metal - Idle motion: dishes pan, sways sway, sensors turn, eyes blink, windmill turns in the breeze, reels and parked rotors tick over - Belt: take tools off at the supply wall; hold E at a vending machine for a pack of 3 on the belt, LMB has one - New meadow pieces: boulders, slab stones, crystals, mushrooms, stump, bulb plants - -demofix checks for all of the above; loc rows in all 11 tables Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
28 lines
1.1 KiB
C#
28 lines
1.1 KiB
C#
using System.Collections.Generic;
|
|
using UnityEngine;
|
|
|
|
namespace GrassCutter
|
|
{
|
|
/// <summary>One floating 6x6 deck tile (client-side visual + colliders, built from TeamState.Tiles).</summary>
|
|
public class DeckTileView : MonoBehaviour
|
|
{
|
|
public Vector2Int tile;
|
|
public GameObject railN, railS, railE, railW;
|
|
public BoxCollider colN, colS, colE, colW;
|
|
public Transform ladderRoot;
|
|
|
|
public void SetEdges(bool n, bool s, bool e, bool w)
|
|
{
|
|
void Set(GameObject rail, BoxCollider col, bool open)
|
|
{
|
|
if (rail) rail.SetActive(open);
|
|
if (col) col.gameObject.SetActive(open); // the rail's collider and the short piece past the ladder opening
|
|
}
|
|
Set(railN, colN, n); Set(railS, colS, s); Set(railE, colE, e); Set(railW, colW, w);
|
|
if (ladderRoot)
|
|
for (int i = 0; i < ladderRoot.childCount && i < 4; i++)
|
|
ladderRoot.GetChild(i).gameObject.SetActive(i == 0 ? n : i == 1 ? s : i == 2 ? e : w);
|
|
}
|
|
}
|
|
}
|