using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public abstract class Model
{
//只读
public abstract string Name { get; }
protected void SendEvent(string eventName, object data = null)
{
MVC.SendEvent(eventName, data);
}
}
2、View(查询状态、
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public abstract class View : MonoBehaviour
{
//标识
public abstract string Name { get; }
//事件列表
public List<string> AttationEvents = new List<string>();
//事件
一、MVC组件类型的关系和功能二、Model 、View、Controller类1、Model:封装应用状态、发送通知(委托MVC完成using System.Collections;using System.Collections.Generic;using UnityEngine;public abstract class Model { //只读 public abstract string Name { get; } protecte