// constructor public Cell(int row, int col, byte number) { _row = row; _col = col; _number = number; _owner = EOwner.Empty; _isBingo = false; }
public bool DealDamage(EOwner owner) { if (owner == EOwner.PLAYER) //jesli wroga dosiegla kula gracza, ma umrzec. { dead = true; return(true); //zwracamy prawde jako sygnal ze pocisk mozna usunac } else { return(false); //kula nie znika po trafieniu swojego } }
public bool DealDamage(EOwner owner) { if (owner == EOwner.ENEMY) //jesli gracza dosiegla wroga kula, ma umrzec. { dead = true; return(true); //zwracamy prawde jako sygnal ze pocisk mozna usunac } else { return(false); //raczej niepotrzebne, gracza nie trafi nigdy jego wlasna kula //glownie zeby kompilator poszedl plumkac sie gdzie indziej } }
public Bullet(float x, float y, EOwner owner, bool directionUp) { this.directionUp = directionUp; // domyslna wartosc this.owner = owner; this.deleteThis = false; this.speed = 10.0f; this.SetSymbol('+'); try { SetPosition(x, y); } catch (Exception ex) { deleteThis = true; } }