Skip to content

Instantly share code, notes, and snippets.

@IRobS
Last active August 27, 2019 13:15
Show Gist options
  • Save IRobS/f785e7095dcb3ec40ae25c10a05e965a to your computer and use it in GitHub Desktop.
Save IRobS/f785e7095dcb3ec40ae25c10a05e965a to your computer and use it in GitHub Desktop.
the overseer
/**
* the overseer
*/
background: #dd4;
min-height: 100%;
<pre>
<code>
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class Overseer : MonoBehaviour
{
// Start is called before the first frame update
void Start()
{
}
// Update is called once per frame
void Update()
{
}
public void respawnPlayer(PlayerLife toReactivate, float timeDelay)
{
StartCoroutine(respawnDelay(toReactivate, timeDelay));
}
//ends the damage imunity after a time delay
IEnumerator respawnDelay(PlayerLife toReactivate, float timeDelay)
{
yield return new WaitForSeconds(timeDelay);
toReactivate.gameObject.SetActive(true);
toReactivate.respawn();
}
}
</code>
</pre>
// alert('Hello world!');
{"view":"split","fontsize":"100","seethrough":"","prefixfree":"1","page":"all"}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment