本文整理汇总了C#中Projectile.set_small_AOE_matrix方法的典型用法代码示例。如果您正苦于以下问题:C# Projectile.set_small_AOE_matrix方法的具体用法?C# Projectile.set_small_AOE_matrix怎么用?C# Projectile.set_small_AOE_matrix使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Projectile
的用法示例。
在下文中一共展示了Projectile.set_small_AOE_matrix方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: bow_attack
public void bow_attack(Floor fl, ref ContentManager Secondary_cManager, gridCoordinate attack_location, int monsterID, int DoodadID)
{
Weapon Bow = null;
if (main_hand != null && (main_hand.get_my_weapon_type() == Weapon.Type.Bow ||
main_hand.get_my_weapon_type() == Weapon.Type.Crossbow))
Bow = main_hand;
else if (off_hand != null && (off_hand.get_my_weapon_type() == Weapon.Type.Bow ||
off_hand.get_my_weapon_type() == Weapon.Type.Crossbow))
Bow = off_hand;
gridCoordinate opposition_coord = new gridCoordinate(-1, -1);
if (monsterID != -1)
opposition_coord = attack_location;
else
opposition_coord = fl.Doodad_by_index(DoodadID).get_g_coord();
int cbow_xsplash = 0;
int cbow_ysplash = 0;
if (opposition_coord.x < my_grid_coord.x)
cbow_xsplash = -1;
else if (opposition_coord.x > my_grid_coord.x)
cbow_xsplash = 1;
if (opposition_coord.y < my_grid_coord.y)
cbow_ysplash = -1;
else if (opposition_coord.y > my_grid_coord.y)
cbow_ysplash = 1;
gridCoordinate splash_coord = new gridCoordinate(opposition_coord.x + cbow_xsplash, opposition_coord.y + cbow_ysplash);
int base_min_dmg_to_monster = Bow.specific_damage_val(false);
int base_max_dmg_to_monster = Bow.specific_damage_val(true);
int max_dmg_to_monster = (int)base_max_dmg_to_monster;
int min_dmg_to_monster = (int)base_min_dmg_to_monster;
if (is_cbow_equipped() && my_character == Character.Falsael)
{
max_dmg_to_monster = (int)Math.Ceiling(base_max_dmg_to_monster * 1.2);
min_dmg_to_monster = (int)Math.Ceiling(base_min_dmg_to_monster * 1.2);
}
if (Bow.get_my_weapon_type() == Weapon.Type.Bow)
{
Projectile prj = new Projectile(get_my_grid_C(), opposition_coord, Projectile.projectile_type.Arrow, ref Secondary_cManager, false, Scroll.Atk_Area_Type.singleTile);
prj.attach_weapon(Bow);
fl.create_new_projectile(prj);
}
else if(Bow.get_my_weapon_type() == Weapon.Type.Crossbow)
{
Projectile prj = new Projectile(get_my_grid_C(), opposition_coord, Projectile.projectile_type.Crossbow_Bolt, ref Secondary_cManager, false, Scroll.Atk_Area_Type.smallfixedAOE);
List<gridCoordinate> crossbow_aoe = new List<gridCoordinate>();
crossbow_aoe.Add(opposition_coord);
crossbow_aoe.Add(splash_coord);
prj.set_small_AOE_matrix(crossbow_aoe);
prj.attach_weapon(Bow);
fl.create_new_projectile(prj);
}
string attack_msg = "";
if (monsterID != -1)
attack_msg = "You attack the " + fl.badguy_by_monster_id(monsterID).my_name + " with your " + Bow.get_my_name() + "!";
else
attack_msg = "You attack the " + fl.Doodad_by_index(DoodadID).my_name() + " with your " + Bow.get_my_name() + "!";
message_buffer.Add(attack_msg);
total_sound += my_sound_value() + (my_sound_value() / 2);
total_scent += my_scent_value();
if (my_class == Chara_Class.Warrior)
{
c_energy += 6;
}
}