NNMDETGroupProject/Assets/1OurScripts/EarthColliderScript.cs
Nicklas 11c133f356 A lot of small changes, everything working now.
Cleaned up files, small adjustments to project.
2024-03-19 22:22:06 +01:00

40 lines
792 B
C#

using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class EarthColliderScript : MonoBehaviour
{
public BoundEarthScript earthScript;
// Start is called before the first frame update
void Start()
{
}
// Update is called once per frame
void Update()
{
}
public void OnTriggerEnter(Collider other)
{
if (other.CompareTag("Hand") && earthScript.narrationHasFinished) //
{
//Removing other bounds temporarily
//Play narration
StartCoroutine(NarrationAndSignalCoroutine());
}
}
IEnumerator NarrationAndSignalCoroutine()
{
yield return new WaitForSeconds(3);
earthScript.collectForce();
}
}