InstantiateCommand.cs 404 B

1234567891011121314151617
  1. using Blue;
  2. using UnityEngine;
  3. public class InstantiateCommand : ICommand
  4. {
  5. private GameObject prefab;
  6. private string content;
  7. public InstantiateCommand(GameObject prefab,string content="")
  8. {
  9. this.prefab = prefab;
  10. this.content = content;
  11. }
  12. public void OnExcute()
  13. {
  14. InstantiateSystem.Instance.InstantiatePrefab(prefab, content);
  15. }
  16. }