// public override void _Process(float delta) // { // } public void _on_Area2D_area_entered(Godot.Area2D area) { animRigid.Play("Idle"); // GD.Print(area.Name); if (area.Name == "Trampoline") { if (status == 0) { status = 1; } if (status == 1) { TimerCoin.Start(); TimerDestroyCoin.Start(); } } if (area.Name == "LantaiArea2D") { if (status == 0) { status = 2; } if (status == 2) { TimerDestroyLantai.Start(); } } }
public void _on_PlayerArea_area_entered(Godot.Area2D area) { if (area.Name == "CoinArea") { scorePlayerNode += 1; CoinSound.Play(); } }
public void _on_CoinArea_area_entered(Godot.Area2D area) { // GD.Print("Coin ", area.Name); if (area.Name == "PlayerArea") { QueueFree(); } }
public void _on_LifeDetect_area_entered(Godot.Area2D lifedetecd) { // GD.Print(lifedetecd.Name); if (lifedetecd.Name == "Trampoline") { var VarLiveDetect = (Area2D)GetNode("LifeDetect"); VarLiveDetect.CallDeferred("set_monitorable", false); VarLiveDetect.CallDeferred("set_monitoring", false); } }
public void _on_LantaiLifeDetect_area_entered(Godot.Area2D lantaiDetectLife) { // minusNyawa += 1; if (lantaiDetectLife.Name == "LifeDetect") { // GD.Print("Nyawa Berkurang"); minusNyawa += 1; } }
public void IncreseScore(Godot.Area2D area) { if (area.Name == "CoinArea") { ScoreCoin += 1; LabelCoin = (Label)GetNode("GUI/LabelCoin"); LabelCoin.Text = ScoreCoin.ToString(); } if (area.Name == "AreaBarrel") { minusNyawa += 1; } // GD.Print(area.Name); }
public void _on_AreaBarrel_area_entered(Godot.Area2D area) { if (area.Name == "AreaBullet" && NyawaBarrel > 0) { NyawaBarrel -= 1; var TongHitSound = (AudioStreamPlayer)GetNode("BarrelHit"); TongHitSound.Play(); } if (area.Name == "AreaSpawnKiri") { direction = 1; } if (area.Name == "QuefreeKanan" || area.Name == "QuefreeKiri") { QueueFree(); } }