1
0
Fork 0
Bildschirmflausch-LD41/Assets/Scripts/Entities/Player.cs

33 lines
585 B
C#
Raw Normal View History

using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class Player : Mob {
public Player() : base(null, 100 )
{
2018-04-21 19:50:12 +02:00
}
2018-04-21 19:50:12 +02:00
private void OnCollisionEnter(Collision collision)
{
Debug.Log("Collision");
if (collision.collider.tag == "wall") {
Kill();
}
}
private void OnTriggerEnter(Collider other)
{
if (other.tag == "door") {
Debug.Log("Open door");
}
}
public override void Kill()
{
base.Kill();
Destroy(this.gameObject);
}
}