Пример #1
0
    MoveCom GetMoveCom()
    {
        MoveCom    moveCom = null;
        BattleUnit unit    = BattleInstance.instance.GetPlayer(mPlayerIdx).GetHeroUnit();

        if (unit == null)
        {
            return(null);
        }

        moveCom = unit.GetCom("MoveCom") as MoveCom;
        return(moveCom);
    }
 public float GetHeroCarAttr(int key, out Vector3 vecValue)
 {
     if (mUnitList.Count > 0)
     {
         float      value   = 0.0f;
         BattleUnit unit    = mUnitList[0];
         AttrCom    attrCom = unit.GetCom("AttrCom") as AttrCom;
         attrCom.GetAttr(key, out value, out vecValue);
         return(value);
     }
     vecValue = Vector3.zero;
     return(0.0f);
 }