|
@@ -4,12 +4,14 @@ using UnityEngine;
|
|
|
public class InstantiateCommand : ICommand
|
|
|
{
|
|
|
private GameObject prefab;
|
|
|
- public InstantiateCommand(GameObject prefab)
|
|
|
+ private string content;
|
|
|
+ public InstantiateCommand(GameObject prefab,string content="")
|
|
|
{
|
|
|
this.prefab = prefab;
|
|
|
+ this.content = content;
|
|
|
}
|
|
|
public void OnExcute()
|
|
|
{
|
|
|
- InstantiateSystem.Instance.InstantiatePrefab(prefab);
|
|
|
+ InstantiateSystem.Instance.InstantiatePrefab(prefab, content);
|
|
|
}
|
|
|
}
|