public Minion(
     long id,
     double x,
     double y,
     double speedX,
     double speedY,
     double angle,
     Faction faction,
     double radius,
     int life,
     int maxLife,
     Status[] statuses,
     MinionType type,
     double visionRange,
     int damage,
     int cooldownTicks,
     int remainingActionCooldownTicks)
     : base(id, x, y, speedX, speedY, angle, faction, radius, life, maxLife, statuses)
 {
     Type          = type;
     VisionRange   = visionRange;
     Damage        = damage;
     CooldownTicks = cooldownTicks;
     RemainingActionCooldownTicks = remainingActionCooldownTicks;
 }
Example #2
0
        private static void CalculateStatsByType(Minion m)
        {
            using (var db = new MinionWarsEntities())
            {
                int strMod = 0;
                int dexMod = 0;
                int vitMod = 0;

                int powMod = 0;
                int cdMod  = 0;
                int durMod = 0;

                //get from db
                MinionType mtype = db.MinionType.Find(m.mtype_id);
                strMod += mtype.str_modifier;
                dexMod += mtype.dex_modifier;
                vitMod += mtype.vit_modifier;

                powMod += mtype.pow_modifier;
                cdMod  += mtype.cd_modifier;
                durMod += mtype.dur_modifier;

                m.strength  += strMod;
                m.dexterity += dexMod;
                m.vitality  += vitMod;

                m.power    += powMod;
                m.cooldown += cdMod;
                m.duration += durMod;
            }
        }
Example #3
0
    void OnScrollButtonClicked(string desc, bool isBlocked, bool isBought, MinionType type)
    {
        if (isBlocked)
        {
            return;
        }

        if (!isBought)
        {
            shopPopup.DisplayPopup();
            shopPopup.SelectMinionByCode(type);
            return;
        }

        var orderList = _user.GetSquadMinionsOrder();

        if (orderList.Any(i => i == type.ToString()) || orderList.Count == selectedButtons.Count)
        {
            return;
        }

        _user.SetSquadMinionItem(type);

        var selectedItem = selectedButtons.FirstOrDefault(i => i.IsEmpty);

        selectedItem.SetMinion(type, _gm);
        selectedItem.onMinionClick += OnSelectedMinionClickCallback;

        var selectedItemScroll = _totalMinionsList.FirstOrDefault(i => i.minionType == type);

        if (selectedItemScroll != null)
        {
            selectedItemScroll.ChangeToColor(true);
        }
    }
Example #4
0
    /// <summary>
    /// This will add to the inventory a new minion of type 'type'.
    /// And then save it locally
    /// </summary>
    public void AddNewMinionToInventory(MinionType type)
    {
        var minion = CreateMinionDefInstance(type);

        _minionsBoughts.list.Add(minion);
        SaveSystem.Save(_minionsBoughts, _pathToMinionsSaved);
    }
 public Troop(string name, MinionType minion, int number)
 {
     //constructor of three parameters-called when the program adds an object of this type
     TroopName       = name;
     DefineType      = minion;
     NumberOfMinions = number;
 }
Example #6
0
    public void SelectMinionByCode(MinionType type = MinionType.Runner)
    {
        MinionInShop m = null;

        float i = 0;

        foreach (var item in _scrollContentList)
        {
            if (item.minionType == type)
            {
                m = item;
                break;
            }

            i += 1;
        }

        if (m == null)
        {
            return;
        }

        m.button.onClick.Invoke();
        ShowItemInScroller(i);
    }
Example #7
0
        /// <summary>
        /// Function that handles the searchbutton enabling the user to search for minions based on different
        /// criterias and displays different items dependent on the conditions selected.
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void Search_Click(object sender, RoutedEventArgs e)
        {
            string search = SearchCondition();

            if (rbtnSearchName.IsChecked == true)
            {
                //List<Minion> name = new List<Minion>();
                //name.Add(minions.SearchByName(search));
                lstMinions.ItemsSource = minions.MyMinions(minions.SearchNameByStartLetter(search));
            }
            else if (rbtn_SearchStrenght.IsChecked == true)
            {
                int SearchForStrenght = ParseSearch();
                lstMinions.ItemsSource = minions.MyMinions(minions.SearchByStrength(SearchForStrenght));
            }
            else if (rbtn_SearchType.IsChecked == true)
            {
                MinionType miniType = SearchType(search);
                lstMinions.ItemsSource = minions.MyMinions(minions.SearchByType(miniType));
            }
            else if (rbtn_SearchTrait.IsChecked == true)
            {
                if (!string.IsNullOrEmpty(txt_SearchField.Text.Trim()))
                {
                    lstMinions.ItemsSource = minions.MyMinions(minions.SearchByTrait(txt_SearchField.Text.Trim()));
                }
            }
            txt_SearchField.Text = string.Empty;
        }
Example #8
0
 public void ResetMinion()
 {
     minionPic.enabled = false;
     _isEmpty          = true;
     text.text         = "";
     minionType        = MinionType.Runner;
 }
Example #9
0
    /// <summary>
    /// This will add to the inventory a new minion of type 'type'.
    /// And then save it locally
    /// </summary>
    public void AddNewMinionToInventory(MinionType type)
    {
        var minion = CreateMinionDefInstance(type);

        _minionsBoughts.list.Add(minion);
        SaveSystem.Save(_minionsBoughts, SaveSystem.MINIONS_SAVE_NAME);
    }
 public Minion()
 {
     Health = 1;
     Attack = 1;
     Name   = "Unnamed thing";
     Type   = MinionType.None;
 }
Example #11
0
	public void Spawn(MinionType _type)
	{
		//Initialize variables
		m_Type = _type;

		m_Animator.SetBool ("NoFaith", false);
		m_Animator.SetInteger ("Type", (int)_type);


		m_Penalty = AudienceManager.Instance.GetRandomPenalty ();
		//Get cur limits
		AudienceManager.Instance.GetMoneyLimits (m_Type, out m_MinMoney, out m_MaxMoney);
		AudienceManager.Instance.GetFaithLimits (m_Type, out m_MinFaith, out m_MaxFaith);
		AudienceManager.Instance.GetWillLimits (m_Type, out m_MinWill, out m_MaxWill);

		//Round values to integers
		m_Money = Mathf.Floor (Random.Range (m_MinMoney, m_MaxMoney)+GameManager.Instance.GetMoneyBonus(m_Type));
		m_Faith = Mathf.Floor (Random.Range (m_MinFaith, m_MaxFaith)+GameManager.Instance.GetFaithBonus(m_Type));
		m_Will = Mathf.Floor (Random.Range (m_MinWill, m_MaxWill)+GameManager.Instance.GetWillBonus(m_Type));

		//Assign values to the text TODO: add icons?
		m_MoneyText.text = m_Money.ToString();
		m_FaithText.text = m_Faith.ToString();
		m_WillText.text = m_Will.ToString ();
		m_PenaltyIcon.sprite = GameManager.Instance.GetPenaltyICon (m_Penalty);

		MoveToFront ();
	}
Example #12
0
    public void TransformToNewCardWithEffectsForBoss(Card card)
    {
        id               = card.id;
        name             = card.name;
        image            = card.image;
        cost             = card.cost;
        isToken          = card.isToken;
        isGold           = card.isGold;
        skillDescription = card.skillDescription;
        goldVersion      = card.goldVersion;
        star             = card.star;
        attack           = card.attack;
        health           = card.health;
        tag              = card.tag;
        keyWords         = card.keyWords;
        proxys           = card.proxys;

        effectsOri = new List <Effect>();
        effectsOri.AddRange(card.effectsOri);

        if (IsMinionType(card.type) && effectsStay.Count > 0)
        {
            for (int i = effectsStay.Count - 1; i >= 0; i--)
            {
                if (!(effectsStay[i] is BodyPlusEffect))
                {
                    effectsStay.Remove(effectsStay[i]);
                }
            }
        }
        type = card.type;
    }
Example #13
0
 public void SetButton(MinionType t, string desc, GameManager gm)
 {
     buttonText.text  = t.ToString();
     minionPic.sprite = gm.LoadedAssets.GetSpriteByName(buttonText.text);
     minionType       = t;
     _description     = desc;
 }
Example #14
0
    public static TargetType GetTargetTypeByMinionType(MinionType type)
    {
        switch (type)
        {
        case MinionType.Runner:
            return(TargetType.Ground);

        case MinionType.Tank:
            return(TargetType.Ground);

        case MinionType.Dove:
            return(TargetType.Air);

        case MinionType.Healer:
            return(TargetType.Ground);

        case MinionType.Zeppelin:
            return(TargetType.Air);

        case MinionType.MiniZeppelin:
            return(TargetType.Air);

        case MinionType.WarScreamer:
            return(TargetType.Ground);
        }

        return(TargetType.Both);
    }
Example #15
0
    public void SpawnMinion(MinionType type, Vector3 spawnPos, Minion available)
    {
        Minion minion = null;

        minion = Instantiate(available, spawnPos, Quaternion.identity);

        if (type == MinionType.Healer)
        {
            (minion as Healer).manager = this;
        }
        else if (type == MinionType.Zeppelin)
        {
            (minion as Zeppelin).manager = this;
        }
        else if (type == MinionType.WarScreamer)
        {
            (minion as WarScreamer).manager = this;
        }

        if (minion == null)
        {
            Debug.LogError("Error creating a Minion");
            return;
        }

        ModifyMinionStatByLevelID(ref minion, level.levelID);
        minion.transform.SetParent(_allMinions.transform);
        minion.OnWalkFinished += MinionWalkFinishedHandler;
        minion.OnDeath        += MinionDeathHandler;
        minion.OnMinionSkill  += MinionSkillActivatedHandler;

        _minions.Add(minion);
        OnNewMinionSpawned(type);
    }
    void MinionSkillSelectedHandler(MinionType t)
    {
        if (_runnerCount == 3 && _doveCount == 0)
        {
            LevelCanvasManager.StopHoldDownMoveAnim();
            var m = _minionManager.GetMinion(MinionType.Runner);
            m.SetWalk(true);
        }

        if (_doveCount == 1)
        {
            LevelCanvasManager.StopHoldDownMoveAnim();
            var m = _minionManager.GetMinion(MinionType.Dove);
            m.SetWalk(true);
            LevelCanvasManager.SetMinionSkillButton(LevelCanvasManager.GetSpecificMinionSaleBtn(m.minionType).GetComponent <Button>()
                                                    , m.skillType, false, MinionSkillManager);
        }

        if (_tankCount == 1)
        {
            LevelCanvasManager.StopHoldDownMoveAnim();
            var m       = _minionManager.GetMinion(MinionType.Tank);
            var minions = MinionManager.GetMinions(GetAllMinions);

            foreach (var item in minions)
            {
                item.SetWalk(true);
            }

            LevelCanvasManager.SetMinionSkillButton(LevelCanvasManager.GetSpecificMinionSaleBtn(m.minionType).GetComponent <Button>()
                                                    , m.skillType, false, MinionSkillManager);
        }
    }
Example #17
0
 /// <summary>
 ///  미니언의 종류 구분, 레이어에 따른 팀 설정
 /// </summary>
 protected void SetMinion()
 {
     //미니언 타입 설정
     if (transform.name.Contains("Super"))
     {
         minionType = MinionType.Super;
         SetStat("Minion_Super");
     }
     else if (transform.name.Contains("Melee"))
     {
         minionType = MinionType.Melee;
         SetStat("Minion_Warrior");
     }
     else if (transform.name.Contains("Magician"))
     {
         minionType = MinionType.Magic;
         SetStat("Minion_Magician");
     }
     else if (transform.name.Contains("Siege"))
     {
         minionType = MinionType.Siege;
         SetStat("Minion_Siege");
     }
     //미니언 경로 설정
 }
Example #18
0
    public Tuple <int, int> GetCurrencies(MinionType t)
    {
        var needToUnlockBuy = _storeInfoData[t].starsNeedToUnlock - GetUserTotalStars();
        var price           = _storeInfoData[t].currencyValue;

        return(Tuple.Create(needToUnlockBuy, price));
    }
Example #19
0
        public static IEnumerable <Obj_AI_Base> GetMobGroup(this LeagueSharp.Common.Spell spell,
                                                            FarmMode farmMode,
                                                            GameObjectTeam minionTeam,
                                                            MinionType minionType   = MinionType.All,
                                                            MinionGroup minionGroup = MinionGroup.Alone,
                                                            int minionCount         = 1)
        {
            IEnumerable <Obj_AI_Base> list =
                ObjectManager.Get <Obj_AI_Minion>()
                .Where(m => m.LSIsValidTarget(spell.Range) && m.Team == GameObjectTeam.Neutral);

            if (minionType == MinionType.BigMobs)
            {
                IEnumerable <Obj_AI_Base> oMob = (from fMobs in list
                                                  from fBigBoys in
                                                  new[]
                {
                    "SRU_Blue", "SRU_Gromp", "SRU_Murkwolf", "SRU_Razorbeak", "SRU_Red",
                    "SRU_Krug", "SRU_Dragon", "SRU_Baron", "Sru_Crab"
                }
                                                  where fBigBoys == fMobs.BaseSkinName
                                                  select fMobs).AsEnumerable();
                list = oMob;
            }
            return(list);
        }
Example #20
0
    public void SpawnMinion(MinionType minionType)
    {
        var currentId     = _entityService.GetNewEntityId();
        var messageRouter = ServiceFactory.Instance.GetService <MessageRouter>();

        messageRouter.RaiseMessage(new SpawnMinionMessage(currentId, minionType));
        RegisterMinion(currentId, minionType);
    }
Example #21
0
    public void AddMinionToShop(MinionType type, string description)
    {
        var m = Instantiate <MinionInShop>(minionInShopPrefab, _gridGroup.transform);

        m.SetButton(type, description);
        m.onMinionClick += OnClickMinionButton;
        _scrollContentList.Add(m);
    }
Example #22
0
 void NewMinionBuiltHandler(MinionType t)
 {
     _minionCount++;
     if (_minionCount == _overchargeManager.minionsAmount)
     {
         OnExecuteStep(null);
     }
 }
Example #23
0
    public float GetStatByStatId(MinionBoughtDef.StatNames id, MinionType minionType)
    {
        var result = -1f;

        switch (id)
        {
        case MinionBoughtDef.StatNames.HP:
            result = hp;
            break;

        case MinionBoughtDef.StatNames.SPD:
            result = speed;
            break;

        case MinionBoughtDef.StatNames.PASSIVE:
            if (minionType == MinionType.Healer)
            {
                result = healPerSecond;
            }

            /*else if (minionType == MinionType.WarScreamer)
             *  result = passiveSpeedDelta;*/

            break;

        case MinionBoughtDef.StatNames.SKILL:

            switch (minionType)
            {
            case MinionType.Runner:
                result = skillDeltaSpeed;
                break;

            case MinionType.Tank:
                result = shieldHits;
                break;

            case MinionType.Healer:
                result = skillHealAmount;
                break;

            case MinionType.Zeppelin:
                result = miniZeppelinStat.hitsToDie;
                break;

            case MinionType.WarScreamer:
                result = activeSpeedDelta;
                break;

            case MinionType.Dove:
                result = skillCooldown;
                break;
            }
            break;
        }

        return(result);
    }
Example #24
0
 private void OnEnable()
 {
     selectedType   = (SelectedType)PlayerPrefs.GetInt("selectedType", 0);
     minionType     = (MinionType)PlayerPrefs.GetInt("minionType", 0);
     keywordValue   = (Keyword)PlayerPrefs.GetInt("keywordValue", 0);
     scrollPosition = Vector2.zero;
     isToken        = false;
     tagValue       = "";
 }
    public void StartSkillTapAnimation(MinionType t, Vector3 toPosition)
    {
        holdMoveImage.gameObject.SetActive(true);
        var btn = GetSpecificMinionSaleBtn(t).GetComponentInChildren <MinionSkillMouseDown>(); //skill btn

        time = 0;
        StartCoroutine(WaitForEndOfFrame(btn.GetComponent <Image>().rectTransform, holdMoveImage, null, true));
        _holdImageTargetPosition = toPosition;
    }
Example #26
0
    void MinionSkillActivatedHandler(MinionType t)
    {
        if (level.levelMode != LevelMode.Tutorial)
        {
            return;
        }

        OnMinionSkillSelected(t);
    }
Example #27
0
        public void SummonFromGraveyard(MinionType type, int index, Direction direction = Direction.InPlace, int amount = 1)
        {
            var revive = Graveyard.Where(m => m.MinionType == type).Take(amount);

            foreach (var minion in revive)
            {
                Summon(minion.Name, index, direction);
            }
        }
Example #28
0
    MinionBoughtDef CreateMinionDefInstance(MinionType t)
    {
        var minion = new MinionBoughtDef();

        minion.hp = minion.passiveSkill = minion.skill = minion.speed = 1;

        minion.type = t.ToString();
        return(minion);
    }
    public override bool BuildMinion(MinionType t)
    {
        var result = base.BuildMinion(t);

        if (t == MinionType.Runner)
        {
            _runnerCount++;
            if (!tankTutoStarted)
            {
                ExecuteTutorialStep(gameObject);
            }
            else
            {
                ExecuteTutorialStep(null);
            }
        }
        else if (t == MinionType.Dove)
        {
            _doveCount++;
            if (_doveCount == 1)
            {
                _lvlCanvasManager.StopTapAnimation();
            }
        }
        else if (t == MinionType.Tank)
        {
            _tankCount++;
            _livesRemoved = 0;
            if (_tankCount == 1)
            {
                LevelCanvasManager.StopTapAnimation();
            }
        }

        if (tankTutoStarted && t != MinionType.Tank)
        {
            //ExecuteTutorialStep (MinionManager.GetMinion(t).gameObject);

            if (t == MinionType.Dove)
            {
                _spawnedAfterTank++;
            }
            else if (t == MinionType.Runner)
            {
                _spawnedAfterTank++;
            }

            if (_spawnedAfterTank == 2)
            {
                Time.timeScale = 1;
                _stopTutorial  = true;
            }
        }

        return(result);
    }
Example #30
0
 public DeadUnitInfo(World world, Minion unit, Wizard me)
 {
     Faction    = unit.Faction;
     Angle      = unit.Angle;
     IsUnion    = unit.IsUnion(me);
     TickIndex  = world.TickIndex;
     X          = unit.X;
     Y          = unit.Y;
     MinionType = unit.Type;
 }
    /// <summary>
    /// If a minion is spawned after an event starts, this will activate the event on those minions
    /// </summary>
    void NewMinionSpawnedHandler(MinionType type)
    {
        /*if(_isRaining)
         *  _level.LoopThroughMinions(RainDebuff);*/

        if (_isWindBlowing)
        {
            _level.LoopThroughMinions(WindDebuff);
        }
    }
Example #32
0
 public bool amIStrongAgainst(MinionType me, MinionType opponent)
 {
     for(int i = 0; i < minionStrengths.Length; i++)
     {
         if((minionStrengths[i].minion == me) && (minionStrengths[i].strongAgainst == opponent))
         {
             return true;
         }
     }
     return false;
 }
Example #33
0
        public Minion(int width, int height, MinionType minionType)
            : base("minion", width, height, Player.LevelUpModifiers)
        {
            this.minionType = minionType;
            AutomaticHitBox = false;
            Opacity = 0.33f;
            Order = 7;

            bulletHitMask = (Collision collision) => !(collision.Other is Player);
            minimumDiff = (float) ((0.66 + GameManager.Random.NextDouble())*minimumDiff);
        }
 public MinionSounds getAccordingMinionSounds(MinionType minionType)
 {
     for(int i = 0; i < minionSounds.Length; i++)
     {
         if(minionSounds[i].minionType == minionType)
         {
             return minionSounds[i];
         }
     }
     return null;
 }
    public void displayAttack(MinionType attackerType)
    {
        switch(attackerType)
        {
            case MinionType.Ghost:
                ghostAttack.Emit(50);
                break;

            case MinionType.Warrior:
                warriorAttack.Emit(1);
                break;

            case MinionType.Wizard:
                wizardAttack.Emit(20);
                break;
        }
    }
Example #36
0
    public Material[] getMinionMaterials(MinionType type)
    {
        switch(type)
        {
            case MinionType.Ghost:
                return ghostsMaterials;

            case MinionType.Warrior:
                return warriorMaterials;

            case MinionType.Wizard:
                return wizardMaterials;

            default:
                return null;
        }
    }
    public void CmdHauntSpawn(float _hauntDuration, Vector3 position, MinionType minType, GameObject explorer)
    {
        GameObject minion;
        switch (minType)
        {
            case MinionType.HauntMelee:
                minion = Instantiate(EnemyHauntPrefab[0], position, Quaternion.identity) as GameObject;
                break;

            default:
                minion = Instantiate(EnemyPrefab[0], position, Quaternion.identity) as GameObject;
                break;
        }

        NetworkServer.Spawn(minion);
        RpcSetParent(minion, explorer);
        //DisableMinion(minion);
        StartCoroutine(FinishHauntEtoM(_hauntDuration, minion,explorer));
    }
Example #38
0
 public static List<GameObject> GetMinions(MinionType type, Vector3 posFrom, float distance = -1)
 {
     var temp = new List<GameObject>();
     switch (type)
     {
         case MinionType.Ally:
             temp.AddRange(
                 EntityManager.MinionsAndMonsters.AlliedMinions.Where(
                     x => posFrom == Vector3.Zero || x.Position.Distance(posFrom) > distance) //Select all if posFrom is Vector3.Zero otherwise select 
                     .Select(minion => new MinionGameObject(minion)));
             break;
         case MinionType.Enemy:
             temp.AddRange(
                 EntityManager.MinionsAndMonsters.EnemyMinions.Where(
                     x => posFrom == Vector3.Zero || x.Position.Distance(posFrom) > distance)
                     .Select(minion => new MinionGameObject(minion)));
             break;
         case MinionType.All:
             temp.AddRange(
                 EntityManager.MinionsAndMonsters.AlliedMinions.Where(
                     x => posFrom == Vector3.Zero || x.Position.Distance(posFrom) > distance)
                     .Select(minion => new MinionGameObject(minion)));
             temp.AddRange(
                 EntityManager.MinionsAndMonsters.EnemyMinions.Where(
                     x => posFrom == Vector3.Zero || x.Position.Distance(posFrom) > distance)
                     .Select(minion => new MinionGameObject(minion)));
             break;
         case MinionType.Debug:
             temp.AddRange(DebugPosistions.Select(x => new DebugGameObject(x)));
             break;
         case MinionType.Killable:
             temp.AddRange(Orbwalker.LaneClearMinionsList.Select(x => new MinionGameObject(x)));
             break;
         default:
             throw new ArgumentOutOfRangeException("MinionType", type, null);
     }
     return temp;
 }
    public void CmdSingleSpawn(Vector3 position, MinionType minType)
    {
        SingleSpawn(position, minType);

        StartCoroutine(ClearOldMinions());
        StartCoroutine(SetGridDirty());
    }
    public void CmdMultipleSpawn(Vector3 position, MinionType minType, int numMinions, float radius)
    {
        var container = new GameObject("Minion group");
        container.transform.SetParent(minionContainer);

        List<Node> nodes = GridBehavior.Instance.getNodesNearPos(position, radius, node => !node.hasLight && node.canWalk) as List<Node>;
        nodes.Sort((a, b) => UnityEngine.Random.Range(-1, 2));

        for (int n = 0; n < numMinions; n++)
        {
            SingleSpawn(nodes[n].position, minType, container.transform);
        }

        StartCoroutine(ClearOldMinions());
        StartCoroutine(SetGridDirty());
    }
	//get will limits
	public void GetWillLimits(MinionType _type, out float _minVal,out float _maxVal)
	{
		//TODO: agregar bonuse de las estatuas
		_minVal=m_MinionsData[(int)_type].m_MinWill;
		_maxVal=m_MinionsData[(int)_type].m_MaxWill;
	}
    private void SingleSpawn(Vector3 position, MinionType minType, Transform spawn = null)
    {
        spawn = spawn ?? minionContainer;
        GameObject robot;

        // Corrects any Z position that might be wrong.
        position.z = GridBehavior.Instance.getNodeAtPos(position).ZIndex;

        switch (minType)
        {
            case MinionType.Meelee:
                robot = Instantiate(EnemyPrefab[0], position, Quaternion.identity) as GameObject;
                break;

            case MinionType.AOEBomber:
                robot = Instantiate(EnemyPrefab[1], position, Quaternion.identity) as GameObject;
                break;

            case MinionType.Plant:
                // Prefab not completely done yet.
                // This is supposed to be on another managet (Poltergeist trap) but is here temporarily
                robot = Instantiate(EnemyPrefab[2], position, Quaternion.identity) as GameObject;
                break;

            default:
                robot = Instantiate(EnemyPrefab[0], position, Quaternion.identity) as GameObject;
                break;
        }

        robot.transform.SetParent(spawn);

        // PLants, as poltergeist trap, do not have a MinionController script.
        if (minType != MinionType.Plant)
        {
            robot.GetComponent<MinionController>().enabled = true;
        }

        NetworkServer.Spawn(robot);
    }
Example #43
0
 public static PoolManagerBase FindPool(MinionType type)
 {
     return GameObject.Find("Pool" + type.ToString()).GetComponent<PoolManagerBase>();
 }
Example #44
0
 public void CmdSpawnUnit(MinionType _typeToSpawn)
 {
     Unit_ID.FindPlayer(_unit_ID.GetPlayerIndex()).GetComponent<SpawnerController>().spawnedCharacter = _typeToSpawn;
 }
 void Awake()
 {
     MyType = GetComponent<MinionController>().Type;
 }
Example #46
0
	public float GetMoneyBonus(MinionType _type)
	{
		if (_type == MinionType.SonOfARitch||_type==MinionType.RARE)
			return m_SkillBars [1].GetBonus ();
		return 0;
	}
Example #47
0
	public float GetFaithBonus(MinionType _type)
	{
		if (_type == MinionType.Martir||_type==MinionType.RARE)
			return m_SkillBars [2].GetBonus ();
		return 0;
	}
Example #48
0
	public float GetWillBonus(MinionType _type)
	{
		if (_type == MinionType.Believer||_type==MinionType.RARE)
			return m_SkillBars [0].GetBonus ();
		return 0;
	}