Exemplo n.º 1
0
		public override void step(Tower tower)
		{
			tower.stats.attackSpeedMult += 0.2f;                                  //attack speedi %20 arttirir.
			tower.stats.rangeDivider = Math.Min(tower.stats.rangeDivider, 0.3f);         //range'i %30'una dusur.

			tower.stats.attackTimeReduction += 0.3f;                              // attack speedi 0.3 kadar arttir.
		}
Exemplo n.º 2
0
        protected Missile(int instanceId, Tower tower, Minion minion)
        {
            this.instanceId = instanceId;
            this.ownerTower = tower;
            this.targetMinion = minion;
			this.position = tower.getWorldMissileCreatePosition();
        }
Exemplo n.º 3
0
		public CatapultMissile(int instanceId, Tower ownerTower, Minion targetMinion) : base(instanceId,ownerTower, targetMinion)
		{
			//position = ownerTower.getWorldPosition();
			targetPosition = targetMinion.getWorldHeadPosition();
			lastDistanceToTarget = (targetPosition - position).magnitude;
			
			calcSpeedDirection();
		}
Exemplo n.º 4
0
        public RegularBoard()
        {
            if (towerSlots != null)
			{
                towers = new Tower[towerSlots.positions.Length];
			}

        }
Exemplo n.º 5
0
		public virtual void createTower (Tower t)
		{
			tower = t;
			t.tag = this;

			towerObject = (GameObject)GameObject.Instantiate(childStaticTowerObject);
			towerObject.name = "t_" + tower.board.instanceId + "_" + tower.indexOnBoard;
			towerObject.transform.position = tower.board.getTowerPosition(tower.indexOnBoard);
			
			rangeProjector = (Projector)GameObject.Instantiate(childStaticRangeProjector);
			rangeProjector.transform.parent = towerObject.transform;
			rangeProjector.transform.localPosition = new Vector3(0, 0.2f, 0);
			rangeProjector.orthographicSize = tower.stats.baseRange;
			rangeProjector.enabled = false;

            GameObject.Instantiate(UIControllerGame.getInstance().createTowerEffect, towerObject.transform.position, Quaternion.identity);

		    soundPlayer = towerObject.AddComponent<AudioSource>();
		    soundPlayer.volume = 1;
		    soundPlayer.PlayOneShot((AudioClip)Resources.Load("Sound/tower_build"));
		}
Exemplo n.º 6
0
		public BallistaMissile(int instanceId, Tower ownerTower, Minion targetMinion) : base(instanceId,ownerTower, targetMinion)
		{
		}
		public override void step(Tower tower)
		{
			tower.stats.stunned = true;
		}
Exemplo n.º 8
0
        /// <summary>
        /// Verilen kuleyi board'dan siler.
        /// </summary>
        /// <param name="tower">board'dan silinecek kule</param>
        /// <returns>Verilen kulenin indexOnBoard degeri, towerSlots index araliginin disinda olmasi durumunda false return eder.
        /// Verilen kulenin, indexOnBoard ile belirtilen konumda bulunmamasi durumunda false return eder (Bu konumda boyle bir kule yok!). Diger her durum icin return 'true'dur.</returns>
        /// <remarks>Eger tower oyundan tamamen silinecekse (bu remove fonksiyonundan sonra baska bir boardda kullanilmayacaksa) bu fonksiyonla birlikte tower.destroyable = true; islemini yapmayi unutmayin</remarks>
        public bool RemoveTower(Tower tower)
        {
            int slotIndex = tower.indexOnBoard;

            if (slotIndex > 0 && slotIndex < towers.Length && towers[slotIndex] == tower)
            {
                towers[slotIndex] = null;
                return true;
            }
            return false;
        }
Exemplo n.º 9
0
        /// <summary>
        /// Verilen kuleyi indexi verilen towerSlot a yerlestirir.
        /// </summary>
        /// <param name="tower">board'a yerlestirilecek kule</param>
        /// <param name="slotIndex">kulenin yerlestirilecegi slotun indexi</param>
        /// <returns>Verilen slot indexin, towerSlots index araliginin disinda olmasi durumunda false return eder.</returns>
        public bool AddTower(Tower tower, int slotIndex)
        {
            if (slotIndex >= 0 && slotIndex < towers.Length)
            {
				if(PlayerMe.self.id == this.player.id)
				{
					if(PlayerMe.cash >= tower.getCost())
					{
						PlayerMe.cash -= tower.getCost();
						Runner.Graphics.updateCashAndIncome();
					}
					//else					comment'e aldim cunku: server kuleyi ekle diyor, clienttaki para belki yanlistir bilmiyoruz ki. neden parasi yoksa eklemiyoruz anlamadim.
						//return false;
				}
                towers[slotIndex] = tower;
				tower.board = this;
                tower.indexOnBoard = slotIndex;
                return true;
            }
            return false;
        }
Exemplo n.º 10
0
 public TrypanophobiaMissile(int instanceId, Tower ownerTower, Minion targetMinion)
     : base(instanceId, ownerTower, targetMinion)
 {
 }
Exemplo n.º 11
0
		public OneToAllMissile(int instanceId, Tower ownerTower, Minion targetMinion) : base(instanceId,ownerTower, targetMinion)
		{
		}
Exemplo n.º 12
0
		public abstract void step(Tower tower);
Exemplo n.º 13
0
		public PetrolBombMissile(int instanceId, Tower ownerTower, Minion targetMinion) : base(instanceId,ownerTower, targetMinion)
		{
			targetPosition = targetMinion.getWorldPosition();
		}
Exemplo n.º 14
0
 public SeedTowerMissile(int instanceId, Tower ownerTower, Minion targetMinion)
     : base(instanceId, ownerTower, targetMinion)
 {
 }
Exemplo n.º 15
0
		public ElectricityMissile(int instanceId, Tower ownerTower, Minion targetMinion) : base(instanceId,ownerTower, targetMinion)
		{
		}
Exemplo n.º 16
0
		public ContagiousMissile(int instanceId, Tower ownerTower, Minion targetMinion) : base(instanceId,ownerTower, targetMinion)
		{
		}
Exemplo n.º 17
0
		public void upgradeTower(Tower tower)
		{
			createTower (tower);
            if (tower.board == PlayerMe.self.board)
            {
                MouseHandler.lastSelectedTower = (ITowerGUI)tower.tag;
                MouseHandler.lastSelectedTower.onTowerSelected();
                ((ITowerGUI)tower.tag).drawInfoPanelGUI();
            }
		}
Exemplo n.º 18
0
		public void addTowerEffect(Tower tower, ITowerEffect effect)
		{
			// TODO
		}
Exemplo n.º 19
0
		public void createTower(Tower tower)
		{
			ITowerGUI gui = (ITowerGUI)Activator.CreateInstance(Type.GetType("Assets.Scripts.GUI.Towers." + tower.GetType().Name + "GUI, Assembly-CSharp"));
			towerGUIs.AddLast(gui);
			gui.createTower(tower);
		}