Ejemplo n.º 1
0
    /// <summary>
    /// 自机Miss
    /// <para>返回值为false说明残机为0</para>
    /// </summary>
    public bool Miss()
    {
        // power减少100
        _curPower = _curPower - 100;
        if (_curPower < 0)
        {
            _curPower = 0;
        }
        // B大于3时不变,小于3时设置为3
        if (_spellCardCounter.itemCount < 3)
        {
            SetSpellCardCounter(3, 0);
        }
        List <int> items;

        if (_lifeCounter.itemCount == 1)
        {
            // 剩余1残的时候掉落满P点
            items = new List <int> {
                (int)ItemType.PowerFull, 1
            };
        }
        else
        {
            // 掉落5个小P点道具
            items = new List <int> {
                (int)ItemType.PowerNormal, 5
            };
        }
        Vector2 pos = _character.GetPosition();

        ItemManager.GetInstance().DropItems(items, pos.x, pos.y + 130, 80, 80);
        return(_lifeCounter.CostItem(1));
    }
Ejemplo n.º 2
0
 /// <summary>
 /// 自机使用符卡
 /// </summary>
 /// <returns>返回值为false说明无法使用符卡</returns>
 public bool CastSpellCard()
 {
     return(_spellCardCounter.CostItem(1));
 }