Beispiel #1
0
    protected override void UpdateDisplay()
    {
        if (!Target.Active)
        {
            MapDisplay.SafeDestroy(gameObject);
        }

        transform.position = WorldGenUtility.WorldToMeshPoint(Target.tile.position);
    }
Beispiel #2
0
 private static Vector3 RoadPosition(Vector2Int position) => WorldGenUtility.WorldToMeshPoint(position) + Vector3.up * 0.2f;
Beispiel #3
0
    private static T InstantiateOnMap <T>(T t, Vector2Int position, Transform parent) where T : Object
    {
        T instance = Instantiate(t, WorldGenUtility.WorldToMeshPoint(position), Quaternion.identity, parent);

        return(instance);
    }