您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符
此仓库已存档。您可以查看文件和克隆,但不能推送或创建工单/合并请求。

ActionToggleVisibility.cs 769B

10 年前
10 年前
10 年前
10 年前
12345678910111213141516171819202122232425262728293031323334
  1. using System;
  2. using System.Collections.Generic;
  3. using UnityEngine;
  4. namespace coa4u
  5. {
  6. /// <summary>
  7. /// Instantly hides the target or showes it, if it's hidden. This action does not require the transparency support in shaders.
  8. /// </summary>
  9. class ActionToggleVisibility : ActionInstant
  10. {
  11. public ActionToggleVisibility()
  12. : base()
  13. {
  14. }
  15. public override ActionInstant Clone()
  16. {
  17. return new ActionToggleVisibility();
  18. }
  19. public override ActionInstant Reverse()
  20. {
  21. return new ActionToggleVisibility();
  22. }
  23. public override void Start()
  24. {
  25. base.Start();
  26. renderer.enabled = !renderer.enabled;
  27. }
  28. }
  29. }