Beispiel #1
0
    /// <summary>
    /// 确认攻击单位
    /// </summary>
    /// <param name="_target"></param>
    virtual public void ConfirmAttack(GameObject _target)
    {
        for (int i = 0; i < multipleAttacks; i++)
        {
            if (UnityEngine.Random.Range(1, 101) <= shootingAccuracy)
            {
                int ndamage;

                ndamage = damage;
                _target.SendMessage("BeInjured", damage);
            }
        }

        // 确认单位是否死亡
        _target.SendMessage("CheckAlive");

        // 确认后清除指令环
        uime.ClearUnitOrdersRing();
    }
    /// <summary>
    /// 取消选择操作
    /// </summary>
    public void CancelOperated()
    {
        currentSelectedUnit = null;

        // 通知地图清除操作显示
        bfm.ResetLastOperatedGridUnit();

        os = operationStatus.Idle;

        // 清除单位属性窗口w
        uime.ClearUnitPropertyWindow();

        // 清除指令环
        uime.ClearUnitOrdersRing();
    }