public Fabrics(string _name, string _deathSound, string _startS, double _width, double _height, colores coloru, string _upgrade, string _notMinerals, string _notFood, string _healt, Point _position, double _hp, int startMineral) { name = _name; hp = _hp; currentHp = hp; healt = _healt; startSound = _startS; deathSound = _deathSound; width = _width; height = _height; SCV._death += new Action <BaseElement>(SCV__death); coloring = coloru; completedUpgrade = _upgrade; availableFabrics = true; mineralAvailable = startMineral; notHaveFood = _notFood; currentPosition = new Point(_position.X, _position.Y); GameTimer.ticActivated += new Action <GameTimer>(GameTimer_ticActivated); AsociatedSCV = new List <SCV>(); asociatedShield = new List <Shield>(); workTime = -1; workFinished = false; workTimeTranscurred = 0; workCost = 0; notMineralSuficient = _notMinerals; Shield._death += new Action <BaseElement>(Shield__death); }
static void Main(string[] args) { int numerico = 0; //declaramos variable de tipo semana semana miDia; //asignamos un valor a miDia miDia = semana.Lunes; //pasamos de enumeracion a entero numerico = (int)miDia; //mostrar informacion Console.WriteLine("El dia es: {0} con valor {1}", miDia, numerico); //crear una variable de tipo color colores miColor = colores.Rojo; //pasamos de enumeracion a entero numerico = (int)miColor; //mostrar informacion para colores Console.WriteLine("El color es: {0} con valor {1}", miColor, numerico); Console.ReadKey(); }
/// <summary> /// Añade un color a la base de datos /// </summary> /// <param name="nombreColor">Nombre del color a insertar</param> /// <returns>Devuelve el número de cambios realizados en la base de datos.</returns> public int InsertarColor(string nombreColor) { colores nuevoColor = new colores() { Color = nombreColor }; return(BbddService.AddColor(nuevoColor)); }
public MineralMine(string _name, Point _posi, double _height, double _wiodht, int mineCounting, colores minecoco, string deth) { name = _name; deathMine = deth; mineHeight = _height; mineWidth = _wiodht; mineralPos = _posi; mineColor = minecoco; mineralTotal = mineCounting; currentMineral = mineralTotal; }
public NetInformation(GameStatus _estado, GameCommands _comando, double ID, string Content, double x, double y, double w, double h, colores col) { enviadoId = ID; vectorX = x; vectorY = y; height = h; width = w; contentOfEnviado = Content; comando = _comando; _gamesStatus = _estado; colok = col; }
public NetInformation(GameStatus estado, GameCommands _comando, double id, string content) { enviadoId = id; contentOfEnviado = content; comando = _comando; _gamesStatus = estado; width = -1; height = -1; vectorX = -1; vectorY = -1; colok = colores.black; }
public NetInformation(GameStatus estado, GameCommands _comando, double id, double x, double y) { enviadoId = id; contentOfEnviado = null; comando = _comando; _gamesStatus = estado; vectorX = x; vectorY = y; height = -1; width = -1; colok = colores.black; }
public NetInformation(GameStatus estado, GameCommands _comando) { _gamesStatus = estado; comando = _comando; enviadoId = -1; width = -1; height = -1; vectorX = -1; vectorY = -1; contentOfEnviado = null; colok = colores.black; }
static void Main(string[] args) { //Se declara y asigna la variable meses meses miMes = meses.Octubre; //Se pasa de enumeración a int int nMes = (int)miMes; //Se muestra la información Console.WriteLine("El mes de {0} tiene un valor de índice de {1}", miMes, nMes); colores miColor = colores.Negro; int nColor = (int)miColor; Console.WriteLine("El color {0} tiene un valor del índice de {1}", miColor, nColor); }
public void CambiarARojo() { while (this.color != colores.ROJO) { Thread.Sleep(2000); if (this.color == colores.VERDE) { this.color = colores.AMARILLO; } else { this.color = colores.ROJO; } //this.InformarEstado(this, new EventArgs()); } }
public Canon(double _width, double _height, string _deathSound, double _hp, Point _startPos, string _name, string changee, colores coloru, string sinWeapon) { name = _name; coloring = coloru; notHaveWeapons = sinWeapon; width = _width; height = _height; hp = _hp; currentHp = hp; currentPosition = new Point(_startPos.X, _startPos.Y); deathSound = _deathSound; weapons = new List <Weapon>(); currentWeapon = null; changeWeapon = changee; }
} // Falta esto // public static colores privateStaticColores; public Clase07ClaseConTodo() { this.publicStaticColores = colores.AMARILLO; this.basePublicInt = 1; this.baseProtectedString = "hola"; this.publicInt = 2; this.protectedString = "adios"; this.privateFloat = 1; this.publicArrayInt = new int[4]; this.publicArrayInt[0] = 1; this.publicArrayInt[1] = 2; this.publicArrayInt[2] = 3; this.publicArrayInt[3] = 4; this.publicArray2DInt = new int[2, 3]; this.publicArray2DInt[0, 0] = 1; this.publicArray2DInt[0, 1] = 2; this.publicArray2DInt[0, 2] = 3; this.publicArray2DInt[1, 0] = 4; this.publicArray2DInt[1, 1] = 5; this.publicArray2DInt[1, 2] = 6; this.publicArrayMatrizEscalonadaInt = new int[2][]; this.publicArrayMatrizEscalonadaInt[0] = new int[3]; this.publicArrayMatrizEscalonadaInt[0][0] = 1; this.publicArrayMatrizEscalonadaInt[0][1] = 2; this.publicArrayMatrizEscalonadaInt[0][2] = 3; this.publicArrayMatrizEscalonadaInt[1] = new int[5]; this.publicArrayMatrizEscalonadaInt[1][0] = 1; this.publicArrayMatrizEscalonadaInt[1][1] = 2; this.publicArrayMatrizEscalonadaInt[1][2] = 3; this.publicArrayMatrizEscalonadaInt[1][3] = 4; this.publicArrayMatrizEscalonadaInt[1][4] = 5; this.lista = new List <int>(); this.lista.Add(1); this.lista.Add(2); Clase07ClaseConTodo.privateStaticInt = 1000; }
private float privateFloat { get; set; } // Falta esto // public static colores privateStaticColores; public Clase07ClaseConTodo() { this.publicStaticColores = colores.AMARILLO; this.basePublicInt = 1; this.baseProtectedString = "hola"; this.publicInt = 2; this.protectedString = "adios"; this.privateFloat = 1; this.publicArrayInt = new int[4]; this.publicArrayInt[0] = 1; this.publicArrayInt[1] = 2; this.publicArrayInt[2] = 3; this.publicArrayInt[3] = 4; this.publicArray2DInt = new int[2,3]; this.publicArray2DInt[0, 0] = 1; this.publicArray2DInt[0, 1] = 2; this.publicArray2DInt[0, 2] = 3; this.publicArray2DInt[1, 0] = 4; this.publicArray2DInt[1, 1] = 5; this.publicArray2DInt[1, 2] = 6; this.publicArrayMatrizEscalonadaInt = new int[2][]; this.publicArrayMatrizEscalonadaInt[0] = new int[3]; this.publicArrayMatrizEscalonadaInt[0][0] = 1; this.publicArrayMatrizEscalonadaInt[0][1] = 2; this.publicArrayMatrizEscalonadaInt[0][2] = 3; this.publicArrayMatrizEscalonadaInt[1] = new int[5]; this.publicArrayMatrizEscalonadaInt[1][0] = 1; this.publicArrayMatrizEscalonadaInt[1][1] = 2; this.publicArrayMatrizEscalonadaInt[1][2] = 3; this.publicArrayMatrizEscalonadaInt[1][3] = 4; this.publicArrayMatrizEscalonadaInt[1][4] = 5; this.lista = new List<int>(); this.lista.Add(1); this.lista.Add(2); Clase07ClaseConTodo.privateStaticInt = 1000; }
public Shield(string nombre, double _hp, double _width, double _height, string _startSound, string _deathSound, string _fireSound, string _HitSound, double _speed, double bulletw, double bullethg, colores coloru, int _Level, bool _reflect, bool _dir, Point _pos) { name = nombre; hp = _hp; currentHp = hp; width = _width; height = _height; startSound = _startSound; deathSound = _deathSound; fireSound = _fireSound; hitSound = _HitSound; mirrorSpeed = _speed; mirrorWidth = bulletw; mirrorHeight = bullethg; coloring = coloru; currentLevel = _Level; mirror = _reflect; dir = _dir; currentPosition = new Point(_pos.X, _pos.Y); }
public Nave(string nombre, double _hp, double _width, double _height, string _startSound, string _deathSound, string _fireSound, string _HitSound, double _speed, double _damage, double _fireProvavility, double bulletSpeed, double appearsProvavility, double bulletw, double bullethg, colores coloru) { name = nombre; hp = _hp; currentHp = hp; speed = _speed; speedBullet = bulletSpeed; coloring = coloru; currentPosition = new Point(0, 0); height = _height; width = _width; startSound = _startSound; deathSound = _deathSound; damage = _damage; provavilityFire = _fireProvavility; hitSound = _HitSound; provavilityAppears = appearsProvavility; bulletHeight = bullethg; bulletWidth = bulletw; fireSound = _fireSound; }
public SCV(double _hp, string strsound, string dethsound, string miningssound, colores coloru, double speed, int miningtimm, int miningcounn, Point posittion, double widdth, double heggit, string _name, bool startDirAndMineralPos) { hp = _hp; currentHp = hp; name = _name; coloring = coloru; width = widdth; height = heggit; startSound = strsound; deathSound = dethsound; miningSound = miningssound; miningTiming = miningtimm; miningCount = miningcounn; mineralInHands = 0; currentPosition = new Point(posittion.X, posittion.Y); movementSpeed = speed; dir = startDirAndMineralPos; mineralPos = dir; }
/// <summary> /// Añade un color a la base de datos /// </summary> /// <param name="colorAdd">Objeto color a añadir a la base de datos</param> /// <returns>Devuelve el número de cambios realizados en la base de datos</returns> public static int AddColor(colores colorAdd) { _context.colores.Add(colorAdd); return(SaveChanges()); }
/// <summary> /// Elimina el registro indicado /// </summary> /// <param name="colorDel">color a eliminar</param> /// <returns>Número de cambios en la base de datos</returns> public static int DeleteColor(colores colorDel) { _context.colores.Remove(colorDel); return(SaveChanges()); }
/// <summary> /// Función que devuelve verdadero si el color pasado por parámetro coincide con el del artículo introducido por parámetro. /// </summary> /// <param name="articulo">artículo a comprobar</param> /// <param name="color">color a comprobar con el del artículo</param> /// <returns></returns> private bool CoincideColor(articulos articulo, colores color) { return(articulo.COLOR.Equals(color)); }
public Camion(short ruedas, short puertas, colores color, short marchas, int peso) : base(ruedas, puertas, color) { this.cantidadMarchas = marchas; this.pesoCarga = peso; }
public Semaforo() { color = colores.ROJO; }
public VehiculoTerrestre() { this.cantidadRuedas = 4; this.cantidadPuertas = 2; this.color = colores.Negro; }
public Moto(short ruedas, short puertas, colores color, short cilindrada) : base(ruedas, puertas, color) { this.cilindrada = cilindrada; }
public Automovil(short ruedas, short puertas, colores color, short marchas, int pasajeros) : base(ruedas, puertas, color) { this.cantidadMarchas = marchas; this.cantidadPasajeros = pasajeros; }
public VehiculoTerrestre(short ruedas, short puertas, colores color) { this.cantidadRuedas = ruedas; this.cantidadPuertas = puertas; this.color = color; }