You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
This repo is archived. You can view files and clone it, but cannot push or open issues/pull-requests.

40 lines
865B

  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. [System.Serializable]
  10. class ActionLog : ActionInstant
  11. {
  12. public string message;
  13. public ActionLog(string targetMessage)
  14. : base()
  15. {
  16. message = targetMessage;
  17. }
  18. public override ActionInstant Clone()
  19. {
  20. return new ActionLog(message);
  21. }
  22. /// <summary>
  23. /// Returns the reversed version of the action, if it is possible.
  24. /// </summary>
  25. public override ActionInstant Reverse()
  26. {
  27. return new ActionLog(message);
  28. }
  29. public override void Start()
  30. {
  31. base.Start();
  32. Debug.Log(message);
  33. }
  34. }
  35. }