예제 #1
0
파일: Player.cs 프로젝트: roadf5/HSMod
    // TODO : Board positioning
    public void SummonMinion(MinionCard minionCard, int position)
    {
        Debugger.LogPlayer(this, "summoning " + minionCard.Name + " at position " + position);

        if (Minions.Count < 7)
        {
            // Creating a Minion and its Controller
            Minion minion = new Minion(minionCard);
            minion.Controller = MinionController.Create(BoardController, minion);

            // Adding the Minion to the Player Minion list
            Minions.Add(minion);

            // Adding the Minion to the BoardController
            BoardController.AddMinion(minion, position);

            // Firing summoned events
            EventManager.Instance.OnMinionSummon(this, minion);
        }
        else
        {
            Debugger.LogPlayer(this, "couldn't summon " + minionCard.Name + " because board is full");
        }

        // Updating the Player glows
        UpdateSprites();
    }
예제 #2
0
파일: Player.cs 프로젝트: roadf5/HSMod
    public void PlayMinion(MinionCard minionCard, int position)
    {
        Debugger.LogPlayer(this, "playing " + minionCard.Name + " at position " + position);

        // Creating a Minion and its Controller
        Minion minion = new Minion(minionCard);

        minion.Controller = MinionController.Create(BoardController, minion);

        // Adding the Minion to the Player Minion list
        Minions.Add(minion);

        // Adding the Minion to the BoardController
        BoardController.AddMinion(minion, position);

        // Firing OnPlayed and OnSummoned events
        minion.Buffs.Battlecry.OnNext(null);

        EventManager.Instance.OnMinionPlayed(this, minion);
        EventManager.Instance.OnMinionSummon(this, minion);

        // Updating the Player glows
        UpdateSprites();
    }