Exemplo n.º 1
0
        public Vehicle(Unit unit, VehicleInfo vehicleInfo, CreatureInfo creatureInfo)
        {
            Unit         = unit;
            VehicleInfo  = vehicleInfo;
            CreatureInfo = creatureInfo;

            for (int i = 0; i < vehicleInfo.Seats.Count; i++)
            {
                seats.Add(new VehicleSeat(this, vehicleInfo.Seats[i]));
            }
        }
Exemplo n.º 2
0
        public void Dispose()
        {
            for (int i = 0; i < VehicleInfo.Seats.Count; i++)
            {
                seats[i].Dispose();
            }

            Unit         = null;
            VehicleInfo  = null;
            CreatureInfo = null;

            seats.Clear();
            takenSeatsByUnits.Clear();
        }