123456789101112131415161718192021 |
- using Blue;
- using UnityEngine;
- /// <summary>
- /// 实例化命令
- /// 添加要实例化的物体、实例化物体的内容
- /// </summary>
- 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);
- }
- }
|