Пример #1
0
    /** 移动到 */
    public void moveTo(Unit unit, int moveType, float radius, Action func)
    {
        clearCurrentCommand();

        _commandType = UnitAICommandType.MoveToUnit;
        _commandUnit.setUnit(unit);
        _commandDistance = radius;
        _commandOver     = func;
        _commandMoveType = moveType;

        runCommand();
    }
Пример #2
0
    public static UnitReference create(Unit unit)
    {
        UnitReference re = new UnitReference();

        re.setUnit(unit);
        return(re);
    }
Пример #3
0
 /** 设置攻击目标 */
 private void setPursueUnit(Unit target)
 {
     _pursueUnit.setUnit(target);
 }
Пример #4
0
 /** 设置锚点单位 */
 public void setAnchorUnit(Unit unit, float radius)
 {
     _anchorRadius    = radius;
     _isAnchorUseUnit = true;
     _anchorUnit.setUnit(unit);
 }