public SeedTower_7Stack(Board board, int indexOnBoard) : base(board, indexOnBoard) { // base constructor gerekli board ve index setlemelerini yapiyor. effects ve stats i initialize ediyor. stats.baseRange = 1.1f; targetStrategy = new NearestMinionTargetStrategy(); }
public NitrogenBombTower(Board board, int indexOnBoard) : base(board, indexOnBoard) { // base constructor gerekli board ve index setlemelerini yapiyor. effects ve stats i initialize ediyor. stats.baseRange = 3.0f; targetStrategy = new FarthestMinionTargetStrategy(); }
public LaserTower(Board board, int indexOnBoard) : base(board, indexOnBoard) { stats.baseRange = 1.1f; targets = new Minion[SIMULTANEOUS_TARGET_LIMIT]; nextAttackTimes = new float[SIMULTANEOUS_TARGET_LIMIT]; }
protected Tower(Board board, int indexOnBoard) { instanceId = idGenerator++; this.board = board; this.indexOnBoard = indexOnBoard; stats = new TowerStats(); effects = new LinkedList<ITowerEffect>(); targetStrategy = new NearestMinionTargetStrategy(); }
public Collection<Minion> selectTargetsFromBoard(Board board, Vector3 selectionPoint, int targetCount, float minRange, float maxRange, MinionStateSelection minionState) { Collection<Minion> minionsInRange = new Collection<Minion>(); Collection<Minion> minionsUnderAttack = new Collection<Minion>(); foreach (var v in board.minions) { if (v.Value.destroyable == true || (minionState != MinionStateSelection.ANY && ((v.Value.minionState == Minion.MinionState.DEAD && minionState == MinionStateSelection.ALIVE) || (v.Value.minionState == Minion.MinionState.ALIVE && minionState == MinionStateSelection.DEAD)))) continue; Vector3 minionCoor = v.Value.getWorldPosition(); float dist = (selectionPoint - minionCoor).magnitude; if (v.Value.isUntargetable() == false && dist >= minRange && dist <= maxRange) minionsInRange.Add(v.Value); } if (targetCount >= minionsInRange.Count) return minionsInRange; for (int i = 0; i < targetCount; i++) { if (minionsInRange.Count > 0) { float current = float.MinValue; int index = -1; for (int j = 0; j < minionsInRange.Count; j++) { Vector3 minionCoor = minionsInRange.ElementAt(j).getWorldPosition(); float dist = (selectionPoint - minionCoor).magnitude; if (dist > current) { index = j; current = dist; } } if (index != -1) { minionsUnderAttack.Add(minionsInRange.ElementAt(index)); minionsInRange.RemoveAt(index); } } else return minionsUnderAttack; } return minionsUnderAttack; }
// alinan root minionlardan sadece player'in science type'ina uygun olanlari true olacak. Diger minionlar unlocked bile olsalar, science type uygun degilse bu listede false olacaklar. //Upgrade edileni true yap, upgrade olani da false yap ki yapilabilecek minionlar listesinden parent olan cikmis olsun. public Player(User user, Game game) { readyInQueue = false; loadedTheGame = false; this.user = user; this.game = game; this.board = (Board)Activator.CreateInstance(TypeIdGenerator.getBoardType(user.selectedBoardTypeId)); board.player = this; cash = 20000; income = 1200; healthPoints = 10; // 5000000; playerState = PlayerState.ALIVE; initializeAvailableMinions(); }
public Collection<Minion> selectTargetsFromBoard(Board board, Vector3 selectionPoint, int targetCount, float minRange, float maxRange, MinionStateSelection minionState) { Collection<Minion> minionsInRange = new Collection<Minion>(); foreach (var v in board.minions) { if (targetCount == minionsInRange.Count) // istenilen miktara ulasmissak return et. return minionsInRange; if (v.Value.destroyable == true || ( minionState != MinionStateSelection.ANY && ((v.Value.minionState == Minion.MinionState.DEAD && minionState == MinionStateSelection.ALIVE) || (v.Value.minionState == Minion.MinionState.ALIVE && minionState == MinionStateSelection.DEAD)))) continue; Vector3 minionCoor = v.Value.getWorldPosition(); float dist = (selectionPoint - minionCoor).magnitude; if (v.Value.isUntargetable() == false && dist >= minRange && dist <= maxRange) // hedef istenilen range'de mi? minionsInRange.Add(v.Value); } return minionsInRange; // bu kadar bulabildim napalim. }
protected PhysicsTower(Board board, int indexOnBoard) : base(board, indexOnBoard) { }
public OneToAllTower_strong(Board board, int indexOnBoard) : base(board, indexOnBoard) { }
public RadiationTower(Board board, int indexOnBoard) : base(board, indexOnBoard) { // base constructor gerekli board ve index setlemelerini yapiyor. effects ve stats i initialize ediyor. stats.baseRange = 3.0f; }
public ContagiousTower_extra(Board board, int indexOnBoard) : base(board, indexOnBoard) { }
public DroseraTower_starving(Board board, int indexOnBoard) : base(board, indexOnBoard) { }
public DroseraTower_hungry(Board board, int indexOnBoard) : base(board, indexOnBoard) { }
public ContagiousTower_effective(Board board, int indexOnBoard) : base(board, indexOnBoard) { }
protected BiologyTower(Board board, int indexOnBoard) : base(board, indexOnBoard) { // base constructor gerekli setlemeleri yapiyor. bir sey yapmaya gerek yok }
public PetrolBombTower(Board board, int indexOnBoard) : base(board, indexOnBoard) { // base constructor gerekli board ve index setlemelerini yapiyor. effects ve stats i initialize ediyor. stats.baseRange = 2.5f; }
public OneToAllTower_toxic(Board board, int indexOnBoard) : base(board, indexOnBoard) { }
private const int _simultaneousTargetLimit = 2; // ayni anda en fazla kac miniona saldirabilir. #endregion Fields #region Constructors public LaserTower_Twin(Board board, int indexOnBoard) : base(board, indexOnBoard) { }
public BallistaTower_fireBolt(Board board, int indexOnBoard) : base(board, indexOnBoard) { }
public TrypanophobiaTower_Scary(Board board, int indexOnBoard) : base(board, indexOnBoard) { // base constructor gerekli board ve index setlemelerini yapiyor. effects ve stats i initialize ediyor. stats.baseRange = 1.2f; }
public DroseraTower_crazy(Board board, int indexOnBoard) : base(board, indexOnBoard) { }
private const int _simultaneousTargetLimit = 3; // ayni anda en fazla kac miniona saldirabilir. #endregion Fields #region Constructors public LaserTower_Triplet(Board board, int indexOnBoard) : base(board, indexOnBoard) { }
public ContagiousTower(Board board, int indexOnBoard) : base(board, indexOnBoard) { // base constructor gerekli board ve index setlemelerini yapiyor. effects ve stats i initialize ediyor. stats.baseRange = 0.9f; }
public NailTrapTower_MoreSlow(Board board, int indexOnBoard) : base(board, indexOnBoard) { // base constructor gerekli board ve index setlemelerini yapiyor. effects ve stats i initialize ediyor. stats.baseRange = 2.0f; }
public DroseraTower_insane(Board board, int indexOnBoard) : base(board, indexOnBoard) { }
private const int _simultaneousTargetLimit = 4; // ayni anda en fazla kac miniona saldirabilir. #endregion Fields #region Constructors public LaserTower_Quadruplet(Board board, int indexOnBoard) : base(board, indexOnBoard) { }