28 lines
503 B
C#

using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class Monster : MonoBehaviour
{
public int type = 1;
public string name1 = "123123";
void Start()
{
// Dead();
}
private void Update()
{
if(Input.GetMouseButtonDown(0))
{
Dead();
}
}
void Dead()
{
Debug.Log("怪物死亡");
//触发事件
EventCenter.GetInstance().EventTrigger<Monster>("MonsterDead",this);
}
}