initial upload
This commit is contained in:
@@ -0,0 +1,42 @@
|
||||
using System;
|
||||
using UnityEngine;
|
||||
|
||||
[Serializable]
|
||||
public class lalascare : MonoBehaviour
|
||||
{
|
||||
[NonSerialized]
|
||||
public static int leverswitch;
|
||||
|
||||
public int trigger;
|
||||
|
||||
public Transform Player;
|
||||
|
||||
public GameObject animated;
|
||||
|
||||
public Transform dooractivater;
|
||||
|
||||
public AudioClip fallsound;
|
||||
|
||||
public lalascare()
|
||||
{
|
||||
trigger = 1;
|
||||
}
|
||||
|
||||
public virtual void OnTriggerEnter(Collider other)
|
||||
{
|
||||
leverswitch = trigger;
|
||||
Player.parent = null;
|
||||
animated.GetComponent<Animation>().Play("scare2");
|
||||
animated.GetComponent<AudioSource>().PlayOneShot(fallsound);
|
||||
bool flag = false;
|
||||
}
|
||||
|
||||
public virtual void OnTriggerExit(Collider other)
|
||||
{
|
||||
UnityEngine.Object.Destroy(gameObject);
|
||||
}
|
||||
|
||||
public virtual void Main()
|
||||
{
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user