Пример #1
0
        public Block(SeaType bt, int xpos, int ypos, string pc, string shipn)
        {
            this.blockType = bt;
            //this.PrevBlockType = SeaType.EmptySea;
            this.xPos = xpos;
            this.yPos = ypos;

            this.selected = false;

            this.printChar = pc;
            this.shipname = shipn;
        }
Пример #2
0
        //constructor
        public Ship(SeaType shipType, int xpos, int ypos, int length, ShipDirection direction, int timesHit, bool sunk, string printchar, string name)
        {
            this.shipType = shipType;

            this.blocks = new Block[length];

            for (int i = 0; i < length; i++)
            {
                if (direction == ShipDirection.Horizontal)
                    blocks[i] = new Block(shipType, xpos + i, ypos, printchar, name);
                else
                    blocks[i] = new Block(shipType, xpos, ypos + i, printchar, name);
            }

            this.length = length;

            this.direction = direction;
            this.timesHit = timesHit;

            this.sunk = sunk;
        }
Пример #3
0
 public Sea(Temperature temp, SeaType type, int val) : this(temp, type)
 {
     this.Value = val;
 }
Пример #4
0
 public Sea(Temperature temp, SeaType type) : this(temp)
 {
     this.Type = type;
 }
 public void InitializeSeaOverlay(Direction direction, SeaType seaType, float moveSpeed)
 {
     mSeaType             = seaType;
     mSeaOverlayDirection = direction;
     mSeaOverlayMoveSpeed = moveSpeed;
 }