本文整理汇总了C#中Inventory.AddAmmo方法的典型用法代码示例。如果您正苦于以下问题:C# Inventory.AddAmmo方法的具体用法?C# Inventory.AddAmmo怎么用?C# Inventory.AddAmmo使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Inventory
的用法示例。
在下文中一共展示了Inventory.AddAmmo方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: OnAdded
// Called when the item is added to the inventory list.
public override void OnAdded(Inventory inventory)
{
base.OnAdded(inventory);
int[] maxAmounts = { 20, 30, 50 };
this.currentAmmo = 0;
this.ammo = new Ammo[] {
inventory.AddAmmo(
new AmmoSatchelSeeds(
"ammo_ember_seeds", "Ember Seeds", "A burst of fire!",
new Sprite(GameData.SHEET_ITEMS_SMALL, new Point2I(0, 3)),
0, maxAmounts[level]
),
false
),
inventory.AddAmmo(
new AmmoSatchelSeeds(
"ammo_scent_seeds", "Scent Seeds", "An aromatic blast!",
new Sprite(GameData.SHEET_ITEMS_SMALL, new Point2I(1, 3)),
0, maxAmounts[level]
),
false
),
inventory.AddAmmo(
new AmmoSatchelSeeds(
"ammo_pegasus_seeds", "Pegasus Seeds", "Steals speed?",
new Sprite(GameData.SHEET_ITEMS_SMALL, new Point2I(2, 3)),
0, maxAmounts[level]
),
false
),
inventory.AddAmmo(
new AmmoSatchelSeeds(
"ammo_gale_seeds", "Gale Seeds", "A mighty blow!",
new Sprite(GameData.SHEET_ITEMS_SMALL, new Point2I(3, 3)),
0, maxAmounts[level]
),
false
),
inventory.AddAmmo(
new AmmoSatchelSeeds(
"ammo_mystery_seeds", "Mystery Seeds", "A producer of unknown effects.",
new Sprite(GameData.SHEET_ITEMS_SMALL, new Point2I(4, 3)),
0, maxAmounts[level]
),
false
)
};
}
示例2: OnAdded
//-----------------------------------------------------------------------------
// Virtual
//-----------------------------------------------------------------------------
// Called when the item is added to the inventory list
public override void OnAdded(Inventory inventory)
{
base.OnAdded(inventory);
int[] maxAmounts = { 99, 300, 999 };
inventory.AddAmmo(
new Ammo(
"rupees", "Rupees", "A currency.",
new Sprite(GameData.SHEET_ITEMS_SMALL, new Point2I(5, 3)),
0, maxAmounts[level]
),
false
);
}
示例3: OnAdded
// Called when the item is added to the inventory list.
public override void OnAdded(Inventory inventory)
{
base.OnAdded(inventory);
int[] maxAmounts = { 30, 40, 50 };
this.currentAmmo = 0;
this.ammo = new Ammo[] {
inventory.AddAmmo(
new Ammo(
"ammo_arrows", "Arrows", "A standard arrow.",
new Sprite(GameData.SHEET_ITEMS_SMALL, new Point2I(15, 1)),
maxAmounts[level], maxAmounts[level]
),
false
)
};
}