using Blue; using UnityEngine; /// /// 实例化命令 /// 添加要实例化的物体、实例化物体的内容 /// public class InstantiateCommand : ICommand { private GameObject prefab; private string content; public InstantiateCommand(GameObject prefab,string content="") { this.prefab = prefab; this.content = content; } public void OnExcute() { InstantiateSystem.Instance.InstantiatePrefab(prefab, content); } }