private void _on_AnimationPlayer_animation_finished(String anim_name) { if (anim_name == "Morte") { PowerUPController powerUP = (ObjectPoolingBLL.executarPooling(PowerUP) as PowerUPController); powerUP.Drop(GlobalPosition); } }
public void Atirar(PersonagemDTO personagem, bool invertido) { SingleMonophonicEmiterBLL.Reproduzir(TiroSound); BulletController disparo = (ObjectPoolingBLL.executarPooling(bulletPool) as BulletController); Vector2 direcao = invertido ? new Vector2(GlobalPosition.x - 3, GlobalPosition.y) : new Vector2(GlobalPosition.x + 3, GlobalPosition.y); disparo.Shoot(direcao, invertido); }