Parking/Assets/Scripts/Driver.cs
2022-08-31 21:19:20 +02:00

54 lines
1.0 KiB
C#

using System;
using Unity.VisualScripting;
using UnityEngine;
namespace Parking
{
public class Driver
{
public ParkingPreference ParkingPreference = ParkingPreference.Any;
public int Priority;
public readonly Size Size;
public Driver(Size size, int priority, ParkingPreference parkingPreference)
{
Size = size;
Priority = priority;
ParkingPreference = parkingPreference;
}
}
public class Spot : IComparable<Spot>
{
public Size Size;
public bool Flipped;
public GameObject GameObject;
public Spot(Size size, bool flipped)
{
Size = size;
Flipped = flipped;
}
public int CompareTo(Spot obj)
{
return Size.CompareTo(obj.Size);
}
}
public enum Size
{
A = 0,
B = 1,
C = 2,
D = 3
}
public enum ParkingPreference
{
Any = 0,
Front = 1,
Back = 2
}
}