Skip to content

Instantly share code, notes, and snippets.

@IRobS
Created August 27, 2019 13:16
Show Gist options
  • Save IRobS/f8b00323fbb40d401b0d5e63f7c80b92 to your computer and use it in GitHub Desktop.
Save IRobS/f8b00323fbb40d401b0d5e63f7c80b92 to your computer and use it in GitHub Desktop.
The first commented line is your dabblet’s title
/**
* The first commented line is your dabblet’s title
*/
background: #d67;
min-height: 100%;
<pre>
<code>
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class DamagePlayer : MonoBehaviour
{
void OnCollisionEnter(Collision collision)
{
PlayerLife thePlayer = collision.collider.GetComponent<PlayerLife>();
if (thePlayer != null)
{
thePlayer.takeDamage();
}
}
}
</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