我 projectiles 没有与灵魂的碰撞。并且我知道这是因为表面的原因,因为没有表面这种情况不会发生。 我能理解的是,projectiles 在表面上的坐标不与屏幕上的灵魂坐标发生碰撞。但是我完全不知道为什么。其他攻击时,表面正常工作。 以下是代码:
在 obj_deck_diamonds(projectile)中创建:
surface = surface_create(146, 96)
在 obj_deck_diamonds 绘制
draw_surface(surface, obj_battle_controller.x-71, obj_battle_controller.y-46)
if surface_exists(surface){
surface_set_target(surface)
draw_clear_alpha(c_black, 0)
draw_self()
surface_reset_target()
}
表面在对象销毁时释放。
if dir_proj == 1{
instance_create_depth(-20, random_range(0, 100), obj_soul.depth-5, obj_deck_diamonds)
} else {
instance_create_depth(180, random_range(0, 100), obj_soul.depth-5, obj_deck_diamonds)
}
如果有人能帮助我,请告诉我。因为我真的不知道发生了什么事,并且如何修复。
评论 (0)