示例#1
0
        //=========== READING ============
        #region Reading

        /** <summary> Reads the object header. </summary> */
        internal override void Read(BinaryReader reader)
        {
            long startPosition = reader.BaseStream.Position;

            this.Reserved0x00 = reader.ReadUInt64();
            this.Flags        = (AttractionFlags)reader.ReadUInt32();

            for (int i = 0; i < 3; i++)
            {
                this.TrackTypeList[i] = (TrackTypes)reader.ReadByte();
            }

            this.MinCarsPerTrain = reader.ReadByte();
            this.MaxCarsPerTrain = reader.ReadByte();
            this.CarsPerFlatRide = reader.ReadByte();

            this.ZeroCars    = reader.ReadByte();
            this.CarTabIndex = reader.ReadByte();

            this.DefaultCarType = (CarTypes)reader.ReadByte();
            this.FrontCarType   = (CarTypes)reader.ReadByte();
            this.SecondCarType  = (CarTypes)reader.ReadByte();
            this.RearCarType    = (CarTypes)reader.ReadByte();
            this.ThirdCarType   = (CarTypes)reader.ReadByte();

            this.Padding0x19 = reader.ReadByte();

            for (int i = 0; i < 4; i++)
            {
                this.CarTypeList[i].Read(reader);
            }

            reader.BaseStream.Position = startPosition + 0x1B2;

            this.Excitement = reader.ReadByte();
            this.Intensity  = reader.ReadByte();
            this.Nausea     = reader.ReadByte();
            this.MaxHeight  = reader.ReadByte();

            this.AvailableTrackSections = (TrackSections)reader.ReadUInt64();

            this.RideType          = (RideTypes)reader.ReadByte();
            this.RideTypeAlternate = (RideTypes)reader.ReadByte();
            this.SoldItem1         = (ItemTypes)reader.ReadByte();
            this.SoldItem2         = (ItemTypes)reader.ReadByte();
        }
示例#2
0
        //========= CONSTRUCTORS =========
        #region Constructors

        /** <summary> Constructs the default object header. </summary> */
        public AttractionHeader()
        {
            this.Reserved0x00 = 0;

            this.Flags         = AttractionFlags.None;
            this.TrackTypeList = new TrackTypes[3];
            for (int i = 0; i < this.TrackTypeList.Length; i++)
            {
                this.TrackTypeList[i] = TrackTypes.None;
            }

            this.MinCarsPerTrain = 0;
            this.MaxCarsPerTrain = 0;
            this.CarsPerFlatRide = 0;

            this.ZeroCars    = 0;
            this.CarTabIndex = 0;

            this.DefaultCarType = CarTypes.CarType0;
            this.FrontCarType   = CarTypes.None;
            this.SecondCarType  = CarTypes.None;
            this.RearCarType    = CarTypes.None;
            this.ThirdCarType   = CarTypes.None;

            this.Padding0x19 = 0;

            this.CarTypeList = new CarHeader[4];
            for (int i = 0; i < this.CarTypeList.Length; i++)
            {
                this.CarTypeList[i] = new CarHeader();
            }

            this.Excitement = 0;
            this.Intensity  = 0;
            this.Nausea     = 0;
            this.MaxHeight  = 0;

            this.AvailableTrackSections = TrackSections.None;

            this.RideType          = RideTypes.None;
            this.RideTypeAlternate = RideTypes.None;
            this.SoldItem1         = ItemTypes.None;
            this.SoldItem2         = ItemTypes.None;
        }
示例#3
0
        public static LyftModalDialogViewModel EmptyInstanceByType(LyftRideTypeEnum type, RideTypes rides = null)
        {
            switch (type)
            {
            case LyftRideTypeEnum.Lyft:
                var rideLyft = rides.Rides.Where(x => x.Ride_Type == LyftRideTypeEnum.Lyft).SingleOrDefault();
                return(LyftInstance(rideLyft));

            case LyftRideTypeEnum.Plus:
                var ridePlus = rides.Rides.Where(x => x.Ride_Type == LyftRideTypeEnum.Plus).SingleOrDefault();
                return(PlusInstance(ridePlus));

            case LyftRideTypeEnum.Unknown:
            case LyftRideTypeEnum.Line:
            case LyftRideTypeEnum.Premier:
            default:
                return(DefaultInstance());
            }
        }