Você não pode selecionar mais de 25 tópicos Os tópicos devem começar com uma letra ou um número, podem incluir traços ('-') e podem ter até 35 caracteres.
Este repositório está arquivado. Você pode visualizar os arquivos e realizar clone, mas não poderá realizar push nem abrir issues e pull requests.

45 linhas
1013B

  1. using System;
  2. using System.Collections.Generic;
  3. using UnityEngine;
  4. namespace coa4u
  5. {
  6. /// <summary>
  7. /// Prints a message in Unity debug console.
  8. /// </summary>
  9. class ActionLog : ActionInstant
  10. {
  11. string message;
  12. public ActionLog(string tgtMessage)
  13. : base()
  14. {
  15. message = tgtMessage;
  16. }
  17. /// <summary>
  18. /// Returns a copy of the action.
  19. /// </summary>
  20. public override ActionInstant clone()
  21. {
  22. return new ActionLog(message);
  23. }
  24. /// <summary>
  25. /// Returns the reversed version of the action, if it is possible.
  26. /// </summary>
  27. public override ActionInstant reverse()
  28. {
  29. return new ActionLog(message);
  30. }
  31. /// <summary>
  32. /// This method is called at the action start.
  33. /// </summary>
  34. public override void start()
  35. {
  36. base.start();
  37. Debug.Log(message);
  38. }
  39. }
  40. }