Skip to content

Commit

Permalink
Moved scripts in the right folder
Browse files Browse the repository at this point in the history
  • Loading branch information
Menion93 committed Mar 31, 2017
1 parent 3f88499 commit 4c0cf10
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 0 deletions.
18 changes: 18 additions & 0 deletions BasicFps/Assets/Script/PlayerHitDetector.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class PlayerHitDetector : MonoBehaviour {

void OnCollisionEnter(Collision coll)
{
Debug.Log(coll.gameObject.tag);

// An object Collision has also features like
// finding the contact points of the collision.
if(coll.gameObject.tag == "EnemyAmmo")
{
Debug.Log("I've been hitted!");
}
}
}
12 changes: 12 additions & 0 deletions BasicFps/Assets/Script/PlayerHitDetector.cs.meta

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 4c0cf10

Please sign in to comment.