CannonBall555.xml文件代码如下:
<root>
<!-- CannonBehaviour -->
<max_distance value="100" />
<muzzle_bone value="aim" />
<rotate_bone value="cannon" />
<attack_event value="attack" />
<ball_config value="CannonBall555.xml"/>
<shot_light_on_event value="explosion_light_on" />
<shot_light_off_event value="explosion_light_off" />
<shot_sound value="cannon_shot" />
<max_ammunition value="999" />
<projectile_behaviours>
<behaviour value="RigidBodySimplyfied" config="PirateShipCannonBall555.xml" />
<behaviour value="CannonBall" config="CannonBall555.xml"/>
<behaviour value="EffectPlayBehaviour">
<effect value="spell_fireball_tail" />
<loop value="true" />
</behaviour>
<behaviour value="DynamicLightBehaviour">
<radius value="5" />
<color value="#f0a50e" />
<explore value="false" />
</behaviour>
<behaviour value="MiniMapItemBehaviour">
<color value="#f0a50e"/>
</behaviour>
</projectile_behaviours>
<!-- RigidBodySimplyfied -->
<dampingByWater value="true"/>
<bounceRatio value="0.1,0.5"/>
<bounceVelocityClamp value="100"/>
<velocityDamping value="1500"/>
<!-- <gravity value="0,400"/> -->
<gravity value="0,100"/>
<!-- CannonBall -->
<ball_image value="gfx/MonstersDLC/spine/builds/cannon/core"/>
<hit_effect value="cannon_strike"/>
<ball_size value="20"/>
<ball_damage value="30"/>
<ball_push_velocity value="150"/>
<ball_enemy_dampig value="0.2"/>
<start_velocity value="1200"/>
<push_decrease_healt value="10"/>
<push_decrease_ratio value="1"/>
<targets value="workers_enemies" />
<on_collide_instantiate>
<behaviour value="DestroyHasNoChildrenBehaviour"/>
<behaviour value="ExplodeMobsBehaviour">
<radius value="4" />
<damage value="2,20" />
<push value="150,250" />
<environment_damage value="false" />
<targets value="workers_enemies" />
</behaviour>
<gameobject count="15,20" check_unique="false">
<transform parent_depended="true"/>
<behaviour value="RigidBodySimplyfied" config="TwoFortress/DwarfCannonShard.xml" />
<behaviour value="CannonBall" config="TwoFortress/DwarfCannonShard.xml"/>
<behaviour value="EffectPlayBehaviour">
<effect value="cannon_projectile_shard" />
<loop value="false" />
<time value="1,1.5" />
</behaviour>
<behaviour value="DynamicLightBehaviour">
<radius value="3" />
<color value="#f0a50e" />
<explore value="false" />
</behaviour>
</gameobject>
</on_collide_instantiate>
</root>
这样就大功告成了。(代码格式在贴吧自动变了,原样如下图)