Skip to content

Instantly share code, notes, and snippets.

@Hsgngr
Last active September 4, 2020 12:58
Show Gist options
  • Save Hsgngr/2a9f0d832b1573825ad315c7c067dfec to your computer and use it in GitHub Desktop.
Save Hsgngr/2a9f0d832b1573825ad315c7c067dfec to your computer and use it in GitHub Desktop.
Reward script for PandemicSimulation
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class reward : MonoBehaviour
{
private GameObject pandemicAreaObj;
//private bool isTaken = false;
private void Awake()
{
pandemicAreaObj = GetComponentInParent<PandemicArea>().gameObject;
}
private void OnCollisionEnter(Collision collision)
{
if (collision.gameObject.CompareTag("agent"))
{
}
}
private IEnumerator WaitAndDeploy(float waitTime)
{
gameObject.SetActive(false);
yield return new WaitForSeconds(waitTime);
print("WaitAndPrint " + Time.time);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment