public CharacteristicTank(short hp, short moveSpeed, short atackSpeed, int atackRange, short atackDamage, SkinTank skin) { HP = hp; MS = moveSpeed; AtckSp = atackSpeed; AtckRng = atackRange; AtckDmg = atackDamage; Skin = skin; }
public char[, ] this[SkinTank skin, Direction direction] { get { char[,] resultView = null; switch (skin) { case SkinTank.Light: switch (direction) { case Direction.Right: resultView = lightTank.ViewRight; break; case Direction.Left: resultView = lightTank.ViewLeft; break; case Direction.Up: resultView = lightTank.ViewUp; break; case Direction.Down: resultView = lightTank.ViewDown; break; } break; case SkinTank.Heavy: switch (direction) { case Direction.Right: resultView = heavyTank.ViewRight; break; case Direction.Left: resultView = heavyTank.ViewLeft; break; case Direction.Up: resultView = heavyTank.ViewUp; break; case Direction.Down: resultView = heavyTank.ViewDown; break; } break; case SkinTank.Destroy: switch (direction) { case Direction.Right: resultView = destroyTank.ViewRight; break; case Direction.Left: resultView = destroyTank.ViewLeft; break; case Direction.Up: resultView = destroyTank.ViewUp; break; case Direction.Down: resultView = destroyTank.ViewDown; break; } break; } return(resultView); } }