public void CopyFrom(EnemyRegionWork regionWork)
 {
     hp        = regionWork.hp;
     breakTime = regionWork.breakTime;
     isBroke   = regionWork.isBroke;
     isShieldCriticalDamage = regionWork.isShieldCriticalDamage;
     isShieldDamage         = regionWork.isShieldDamage;
 }
Example #2
0
    public PopResult Pop(ref XorInt value)
    {
        int       value2 = 0;
        PopResult result = Pop(ref value2);

        value = value2;
        return(result);
    }
 public void Initialize(Enemy.RegionInfo info, int parentRegionId, int _regionId)
 {
     regionInfo     = info;
     hp             = info.maxHP;
     isShieldDamage = info.isEnableShieldDamage;
     regionId       = _regionId;
     if (parentRegionId > 0)
     {
         parentRegionID = parentRegionId;
         enabled        = false;
     }
 }
Example #4
0
    public JSONInStream Content(int idx, out XorInt value)
    {
        JSONNumberFieldValue fieldValue = null;

        try{
            fieldValue = (JSONNumberFieldValue)node.GetField(idx);
        }
        catch (Exception e) {
            Debug.LogError(e);
            Debug.LogError(idx);
        }
        value = (XorInt)fieldValue.value;
        return(this);
    }
Example #5
0
    public JSONInStream Content(int idx, out XorInt value)
    {
        JSONNumberFieldValue jSONNumberFieldValue = null;

        try
        {
            jSONNumberFieldValue = (JSONNumberFieldValue)node.GetField(idx);
        }
        catch (Exception ex)
        {
            Debug.LogError((object)ex);
            Debug.LogError((object)idx);
        }
        value = (int)jSONNumberFieldValue.value;
        return(this);
    }
Example #6
0
    public JSONInStream ContentOptional(string tag, ref XorInt value)
    {
        JSONNumberFieldValue fieldValue = null;

        try{
            fieldValue = (JSONNumberFieldValue)node.GetField(tag);
        }
        catch (Exception e) {
            Debug.LogError(e);
            Debug.LogError(tag);
        }
        if (fieldValue != null)
        {
            value = (XorInt)fieldValue.value;
        }
        return(this);
    }
 public void LoadFromBinary(BinaryTableReader reader, ref uint key1, ref uint key2)
 {
     id          = key1;
     this.key2   = key2;
     needAP      = reader.ReadInt32(0);
     name        = reader.ReadString(string.Empty);
     description = reader.ReadString(string.Empty);
     m_info      = new AbilityInfo[3];
     for (int i = 0; i < 3; i++)
     {
         AbilityInfo abilityInfo = new AbilityInfo();
         abilityInfo.type   = (ABILITY_TYPE)reader.ReadInt32(0);
         abilityInfo.target = reader.ReadString(string.Empty);
         abilityInfo.value  = reader.ReadInt32(0);
         m_info[i]          = abilityInfo;
     }
 }
 public void Clone(AbilityData baseData)
 {
     id                  = baseData.id;
     needAP              = baseData.needAP;
     minNeedAP           = baseData.minNeedAP;
     name                = baseData.name;
     description         = baseData.description;
     descriptionPreGrant = baseData.descriptionPreGrant;
     enableEquipType     = baseData.enableEquipType;
     key2                = baseData.key2;
     m_info              = new AbilityInfo[baseData.m_info.Length];
     for (int i = 0; i < baseData.m_info.Length; i++)
     {
         m_info[i] = baseData.m_info[i].Clone();
     }
     m_cashedInfo    = null;
     m_cashedAbility = null;
 }
Example #9
0
    public JSONInStream ContentOptional(string tag, ref XorInt value)
    {
        JSONNumberFieldValue jSONNumberFieldValue = null;

        try
        {
            jSONNumberFieldValue = (JSONNumberFieldValue)node.GetField(tag);
        }
        catch (Exception ex)
        {
            Debug.LogError((object)ex);
            Debug.LogError((object)tag);
        }
        if (jSONNumberFieldValue != null)
        {
            value = (int)jSONNumberFieldValue.value;
        }
        return(this);
    }
Example #10
0
 public JSONInStream ContentOptional(string tag, ref XorInt value)
 {
     JSONNumberFieldValue fieldValue = null;
     try{
         fieldValue = (JSONNumberFieldValue) node.GetField(tag);
     }
     catch(Exception e){
         Debug.LogError(e);
         Debug.LogError(tag);
     }
     if(fieldValue != null)
         value = (XorInt)fieldValue.value;
     return this;
 }
Example #11
0
 public JSONInStream Content(int idx, out XorInt value)
 {
     JSONNumberFieldValue fieldValue = null;
     try{
         fieldValue = (JSONNumberFieldValue) node.GetField(idx);
     }
     catch(Exception e){
         Debug.LogError(e);
         Debug.LogError(idx);
     }
     value = (XorInt)fieldValue.value;
     return this;
 }
Example #12
0
 public JSONInStream Content(out XorInt value)
 {
     return Content(0, out value);
 }
Example #13
0
 public JSONOutStream Content(XorInt value)
 {
     node.AddField(new JSONNumberFieldValue((double)(int)value));
     return(this);
 }
Example #14
0
 public void OnReceiveVM(XorInt vm)
 {
     this.vm = vm;
 }
Example #15
0
 public JSONOutStream Content(int idx, XorInt value)
 {
     node.AddField(idx, new JSONNumberFieldValue(value));
     return(this);
 }
Example #16
0
 public JSONOutStream Content(XorInt value)
 {
     node.AddField(new JSONNumberFieldValue(value));
     return this;
 }
Example #17
0
 public JSONInStream Content(out XorInt value)
 {
     return(Content(0, out value));
 }