iTweenEditor.cs 1.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273
  1. // Module Name: iTweenEditor.cs
  2. // Project: iTween Editor br Vortex Game Studios
  3. // Version: 1.00.00
  4. // Developed by: Alexandre Ribeiro de Sá (@themonkeytail)
  5. // Copyright(c) Vortex Game Studios LTDA ME.
  6. // http://www.vortexstudios.com
  7. //
  8. // iTween Editor To component
  9. // Base component.
  10. // 1.00.00 - First build
  11. //
  12. // Check every tools and plugins we made for Unity at
  13. // https://www.assetstore.unity3d.com/en/publisher/4888
  14. //
  15. // THIS CODE AND INFORMATION IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND,
  16. // EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE IMPLIED
  17. // WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A PARTICULAR PURPOSE.
  18. using UnityEngine;
  19. using System.Collections;
  20. using UnityEngine.EventSystems;
  21. public class iTweenEditor : MonoBehaviour {
  22. public string name = "";
  23. public bool autoPlay = true;
  24. public float waitTime = 0.25f;
  25. public float tweenTime = 2.0f;
  26. public iTween.LoopType loopType = iTween.LoopType.none;
  27. public iTween.EaseType easeType = iTween.EaseType.linear;
  28. public bool ignoreTimescale = true;
  29. public virtual void iTweenPlay() { }
  30. public void LoadLevel( string screenName ) {
  31. Application.LoadLevel( screenName );
  32. }
  33. public void LoadLevelAdditive( string screenName ) {
  34. Application.LoadLevelAdditive( screenName );
  35. }
  36. public void EnableGameObject( GameObject go ) {
  37. go.SetActive( true );
  38. }
  39. public void DisableGameObject( GameObject go ) {
  40. go.SetActive( false );
  41. }
  42. public void DestroyGameObject( GameObject go ) {
  43. Destroy( go );
  44. }
  45. public void EnableMonoBehaviour( MonoBehaviour mb ) {
  46. mb.enabled = true;
  47. }
  48. public void DisableMonoBehaviour( MonoBehaviour mb ) {
  49. mb.enabled = false;
  50. }
  51. public void DestroyObject( Object obj) {
  52. Destroy( obj );
  53. }
  54. public void PlayTween( iTweenEditor tween ) {
  55. tween.iTweenPlay();
  56. }
  57. }