Ejemplo n.º 1
0
        public RowBoat(Direction d)
            : base(d, false)
        {
            Rudder    = new Rudder(this, d);
            TillerMan = Rudder;
            Line      = new MooringLine(this);

            switch (d)
            {
            default:
            case Direction.North:
                Rudder.Location = new Point3D(X, Y - TillerManDistance, Z);
                Line.Location   = new Point3D(X, Y - 2, Z + 5);
                break;

            case Direction.South:
                Rudder.Location = new Point3D(X, Y + TillerManDistance, Z);
                Line.Location   = new Point3D(X, Y + 2, Z + 5);
                break;

            case Direction.East:
                Rudder.Location = new Point3D(X + TillerManDistance, Y, Z);
                Line.Location   = new Point3D(X + 2, Y, Z + 5);
                break;

            case Direction.West:
                Rudder.Location = new Point3D(X - TillerManDistance, Y, Z);
                Line.Location   = new Point3D(X - 2, Y, Z + 5);
                break;
            }

            Rudder.Handle = new RudderHandle(Rudder, d);
        }
Ejemplo n.º 2
0
        public override void AddMooringLines(Direction direction)
        {
            MooringLine line1 = AddMooringLine(new MooringLine(this));
            MooringLine line2 = AddMooringLine(new MooringLine(this));
            MooringLine line3 = AddMooringLine(new MooringLine(this));
            MooringLine line4 = AddMooringLine(new MooringLine(this));
            MooringLine line5 = AddMooringLine(new MooringLine(this));
            MooringLine line6 = AddMooringLine(new MooringLine(this));

            switch (direction)
            {
            default:
            case Direction.North:
            {
                line1.Location = new Point3D(X + 2, Y - 3, Z + ZSurface);
                line2.Location = new Point3D(X - 2, Y - 3, Z + ZSurface);
                line3.Location = new Point3D(X + 2, Y + 1, Z + ZSurface);
                line4.Location = new Point3D(X - 2, Y + 1, Z + ZSurface);
                line5.Location = new Point3D(X + 2, Y + 5, Z + ZSurface);
                line6.Location = new Point3D(X - 2, Y + 5, Z + ZSurface);
                break;
            }

            case Direction.South:
            {
                line1.Location = new Point3D(X + 2, Y + 3, Z + ZSurface);
                line2.Location = new Point3D(X - 2, Y + 3, Z + ZSurface);
                line3.Location = new Point3D(X + 2, Y - 1, Z + ZSurface);
                line4.Location = new Point3D(X - 2, Y - 1, Z + ZSurface);
                line5.Location = new Point3D(X + 2, Y - 5, Z + ZSurface);
                line6.Location = new Point3D(X - 2, Y - 5, Z + ZSurface);
                break;
            }

            case Direction.East:
            {
                line1.Location = new Point3D(X - 1, Y - 2, Z + ZSurface);
                line2.Location = new Point3D(X - 1, Y + 2, Z + ZSurface);
                line3.Location = new Point3D(X - 5, Y - 2, Z + ZSurface);
                line4.Location = new Point3D(X - 5, Y + 2, Z + ZSurface);
                line5.Location = new Point3D(X + 3, Y - 2, Z + ZSurface);
                line6.Location = new Point3D(X + 3, Y + 2, Z + ZSurface);
                break;
            }

            case Direction.West:
            {
                line1.Location = new Point3D(X + 1, Y - 2, Z + ZSurface);
                line2.Location = new Point3D(X + 1, Y + 2, Z + ZSurface);
                line3.Location = new Point3D(X + 5, Y - 2, Z + ZSurface);
                line4.Location = new Point3D(X + 5, Y + 2, Z + ZSurface);
                line5.Location = new Point3D(X - 3, Y - 2, Z + ZSurface);
                line6.Location = new Point3D(X - 3, Y + 2, Z + ZSurface);
                break;
            }
            }
        }
Ejemplo n.º 3
0
        public override void Deserialize(GenericReader reader)
        {
            base.Deserialize(reader);
            int version = reader.ReadInt();

            m_Rudder = reader.ReadItem() as Rudder;
            m_Line   = reader.ReadItem() as MooringLine;

            TillerMan = m_Rudder;
        }