Update Suicide.cs
parent
857ee63663
commit
af3b189dfc
|
@ -1,31 +1,17 @@
|
|||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
using UnityEngine.SceneManagement;
|
||||
using UnityEngine.UI;
|
||||
|
||||
|
||||
public class Suicide : MonoBehaviour
|
||||
{
|
||||
// This method is called when a collision occurs
|
||||
|
||||
|
||||
public float fadeDuration = 2.0f; // Duration of the fade in seconds
|
||||
|
||||
public Material skybox;
|
||||
public Light sun;
|
||||
private void OnCollisionEnter(Collision collision)
|
||||
{
|
||||
// Check if the collision is with the specific object you want
|
||||
if (collision.gameObject.CompareTag("Bullet"))
|
||||
{
|
||||
MarcsWebLogger.Log("SC | Shoot Collision");
|
||||
// Your collision handling code goes here
|
||||
//transform.Translate(Vector3.up * 2);
|
||||
sun.enabled = false;
|
||||
skybox.SetColor("_Tint", Color.black);
|
||||
|
||||
SceneManager.LoadScene("AfterLife");
|
||||
MarcsWebLogger.Log("SC | Cooroutine shoudlb be running");
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue