コード例 #1
0
ファイル: GameAttributeMap.cs プロジェクト: venci17/mooege
 // NOTE: these are public, but only exist to be used by GameAttribute scripts.
 // They provide raw attribute access of values, no scripts will be triggered when used.
 public int _RawGetAttribute(GameAttributeI attribute, int? key)
 {
     return RawGetAttributeValue(attribute, key).Value;
 }
コード例 #2
0
ファイル: GameAttributeMap.cs プロジェクト: venci17/mooege
 public int this[GameAttributeI attribute]
 {
     get { return GetAttributeValue(attribute, null).Value; }
     set { SetAttributeValue(attribute, null, new GameAttributeValue(value)); }
 }
コード例 #3
0
ファイル: GameAttributeMap.cs プロジェクト: venci17/mooege
 public int this[GameAttributeI attribute, int? key]
 {
     get { return GetAttributeValue(attribute, key).Value; }
     set { SetAttributeValue(attribute, key, new GameAttributeValue(value)); }
 }
コード例 #4
0
ファイル: Inventory.cs プロジェクト: n4v/mooege
 public int GetItemBonus(GameAttributeI attributeI, int attributeKey)
 {
     return this.Loaded ? this.GetEquippedItems().Sum(item => item.Attributes[attributeI, attributeKey]) : 0;
 }