孙广东 2016.10.15http://blog.csdn.net/u010019717功能类似于 GetComponents 等函数:1、 不用接口, 使用抽象类 继承自 Monobehaiourpublic abstract class LayerPanelBase :MonoBehaviour
{
public abstract void InitView(HeroModel heroModel, CharacterAttributeView characterAttributeView);
}然后执行 .GetComponent<LayerPanelBase>().InitView(myHeroModel, this);2、原理类似 网上百度可见的:原帖: http://forum.unity3d.com/threads/60596-GetComponents-Possible-to-use-with-C-Interfacesusing UnityEngine;
using System;
using System.Collections;
using System.C
...
继续阅读
(34)