Last active
August 27, 2019 13:15
-
-
Save IRobS/f785e7095dcb3ec40ae25c10a05e965a to your computer and use it in GitHub Desktop.
the overseer
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* the overseer | |
*/ | |
background: #dd4; | |
min-height: 100%; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<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> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// alert('Hello world!'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{"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