Beispiel #1
0
 public static Offset <Attr> CreateAttr(FlatBufferBuilder builder,
                                        float atk             = 0.0f,
                                        float def             = 0.0f,
                                        float hp              = 0.0f,
                                        float critRate        = 0.0f,
                                        float resilienceRate  = 0.0f,
                                        float critValue       = 0.0f,
                                        float resilienceValue = 0.0f,
                                        int iceDamage         = 0,
                                        int iceDefense        = 0,
                                        float iceBonus        = 0.0f,
                                        float iceResist       = 0.0f,
                                        int fireDamage        = 0,
                                        int fireDefense       = 0,
                                        float fireBonus       = 0.0f,
                                        float fireResist      = 0.0f,
                                        int lightingDamage    = 0,
                                        int lightingDefense   = 0,
                                        float lightingBonus   = 0.0f,
                                        float lightingResist  = 0.0f,
                                        int poisonDamage      = 0,
                                        int poisonDefense     = 0,
                                        float poisonBonus     = 0.0f,
                                        float poisonResist    = 0.0f)
 {
     builder.StartObject(23);
     Attr.AddPoisonResist(builder, poisonResist);
     Attr.AddPoisonBonus(builder, poisonBonus);
     Attr.AddPoisonDefense(builder, poisonDefense);
     Attr.AddPoisonDamage(builder, poisonDamage);
     Attr.AddLightingResist(builder, lightingResist);
     Attr.AddLightingBonus(builder, lightingBonus);
     Attr.AddLightingDefense(builder, lightingDefense);
     Attr.AddLightingDamage(builder, lightingDamage);
     Attr.AddFireResist(builder, fireResist);
     Attr.AddFireBonus(builder, fireBonus);
     Attr.AddFireDefense(builder, fireDefense);
     Attr.AddFireDamage(builder, fireDamage);
     Attr.AddIceResist(builder, iceResist);
     Attr.AddIceBonus(builder, iceBonus);
     Attr.AddIceDefense(builder, iceDefense);
     Attr.AddIceDamage(builder, iceDamage);
     Attr.AddResilienceValue(builder, resilienceValue);
     Attr.AddCritValue(builder, critValue);
     Attr.AddResilienceRate(builder, resilienceRate);
     Attr.AddCritRate(builder, critRate);
     Attr.AddHp(builder, hp);
     Attr.AddDef(builder, def);
     Attr.AddAtk(builder, atk);
     return(Attr.EndAttr(builder));
 }
Beispiel #2
0
 public static Attr GetRootAsAttr(ByteBuffer _bb, Attr obj)
 {
     return(obj.__init(_bb.GetInt(_bb.Position) + _bb.Position, _bb));
 }
Beispiel #3
0
 public Attr GetHeroAttr(Attr obj)
 {
     int o = __offset(84); return(o != 0 ? obj.__init(__indirect(o + bb_pos), bb) : null);
 }