// =================================================================================== // UNITY METHODS --------------------------------------------------------------------- private void OnEnable() { src = target as HOTweenManager; srcGO = src.gameObject; isActive = (srcGO.activeSelf == true); enabled = IsSingleManager(); }
private void Disable(DisabledReason p_reason) { enabled = false; disabledReason = p_reason; src = null; undoManager = null; }
// =================================================================================== // UNITY METHODS --------------------------------------------------------------------- private void OnEnable() { src = target as HOTweenManager; srcGO = src.gameObject; #if UNITY_3_5 isActive = ( srcGO.active ); #else isActive = (srcGO.activeSelf); #endif enabled = IsSingleManager(); }
// =================================================================================== // UNITY METHODS --------------------------------------------------------------------- private void OnEnable() { src = target as HOTweenManager; srcGO = src.gameObject; #if (UNITY_4_0 || UNITY_4_1 || UNITY_4_2 || UNITY_4_3 || UNITY_4_4 || UNITY_4_5 || UNITY_4_6) isActive = srcGO.activeInHierarchy; #else isActive = (srcGO.activeSelf == true); #endif enabled = IsSingleManager(); }
// =================================================================================== // UNITY METHODS --------------------------------------------------------------------- private void OnEnable() { src = target as HOTweenManager; srcGO = src.gameObject; #if (UNITY_4_0 || UNITY_4_1 || UNITY_4_2 || UNITY_4_3 || UNITY_4_4 || UNITY_4_5 || UNITY_4_6) isActive = srcGO.activeInHierarchy; #else isActive = ( srcGO.active == true ); #endif enabled = IsSingleManager(); }
// =================================================================================== // UNITY METHODS --------------------------------------------------------------------- private void OnEnable() { src = target as HOTweenManager; srcGO = src.gameObject; #if UNITY_3_5 isActive = (srcGO.active); #else isActive = (srcGO.activeSelf); #endif enabled = IsSingleManager(); }
private void Enable(HOTweenManager p_source) { enabled = true; src = p_source; HOTweenEditorGUI.panelMode = HOTweenPanelMode.Default; undoManager = new HOEditorUndoManager(src, "HOTween Editor"); if (src.tweenDatas == null) { src.tweenDatas = new List <HOTweenManager.HOTweenData>(); } }
public static void GUIStart(IHOTweenPanel panel, HOTweenManager src, HOEditorUndoManager undoManager, int labelsWidth, int fieldsWidth) { // Ensure that only one panel is in a state different from the default one if (!isManagerGUI && HOTweenEditorGUI.panel != null && panelMode != HOTweenPanelMode.Default) { panelMode = HOTweenPanelMode.Default; HOTweenEditorGUI.panel.Repaint(); } isManagerGUI = true; HOTweenEditorGUI.src = src; GUIStart(panel, undoManager, labelsWidth, fieldsWidth); }
// =================================================================================== // UNITY METHODS --------------------------------------------------------------------- void Awake() { HOTween.Init(true, true, true); // Store Tweeners generated by this component generatedTweeners = new List <Holoville.HOTween.Tweener>(); foreach (HOTweenManager.HOTweenData twData in tweenDatas) { generatedTweeners.Add(HOTweenManager.CreateTween(twData, globalDelay, globalTimeScale)); } if (destroyAfterSetup) { DoDestroy(); } }
static int SortTweenDatasById(HOTweenManager.HOTweenData t1, HOTweenManager.HOTweenData t2) { if (t1.targetRoot == null && t2.targetRoot == null) return SortTweenDatasByCreationTime(t1, t2); if (String.IsNullOrEmpty(t1.id) && String.IsNullOrEmpty(t2.id)) return SortTweenDatasByGO(t1, t2); if (String.IsNullOrEmpty(t1.id)) return 1; if (String.IsNullOrEmpty(t2.id)) return -1; int v = String.Compare(t1.id, t2.id); if (v != 0) return v; return SortTweenDatasByCreationTime(t1, t2); }
static int SortTweenDatas(HOTweenManager.HOTweenData t1, HOTweenManager.HOTweenData t2) { switch (src.sortMode) { case SortMode.ByGameObject: return SortTweenDatasByGO(t1, t2); case SortMode.ById: return SortTweenDatasById(t1, t2); default: return SortTweenDatasByCreationTime(t1, t2); } }
static int SortTweenDatasByCreationTime(HOTweenManager.HOTweenData t1, HOTweenManager.HOTweenData t2) { if (t1.creationTime > t2.creationTime) return 1; if (t1.creationTime < t2.creationTime) return -1; return 0; }
static int SortPropDatas(HOTweenManager.HOPropData p1, HOTweenManager.HOPropData p2) { return String.Compare(p1.propName, p2.propName); }
static int SortTweenDatas(HOTweenManager.HOTweenData t1, HOTweenManager.HOTweenData t2) { if (t1.targetRoot == null && t2.targetRoot == null) return SortTweenDatasByCreationTime(t1, t2); if (t1.targetRoot == null) return -1; if (t2.targetRoot == null) return 1; int v = String.Compare(t1.targetRoot.name, t2.targetRoot.name); if (v != 0) return v; return SortTweenDatasByCreationTime(t1, t2); }
/// <summary> /// Stores in dictionaries the valid plugins and plugins enums for the given target and property. /// </summary> static void StoreValidPluginsFor(Type p_targetType, HOTweenManager.HOPropData p_propData) { List<PluginData> li = new List<PluginData>(); foreach (PluginData plugData in pluginDatas) { if ((plugData.validTargetTypes == null || Array.IndexOf(plugData.validTargetTypes, p_targetType) != -1) && (plugData.validPropTypes == null || Array.IndexOf(plugData.validPropTypes, p_propData.propType) != -1) ) { li.Add(plugData); } } li.Sort(SortPluginDatas); dcPropDataToValidPluginDatas[p_propData] = li; string[] plugNames = new string[li.Count]; for (int i = 0; i < plugNames.Length; ++i) { plugNames[i] = li[i].name; } dcPropDataToValidPluginsEnum[p_propData] = plugNames; }
private void Enable(HOTweenManager p_source) { enabled = true; src = p_source; HOTweenEditorGUI.panelMode = HOTweenPanelMode.Default; undoManager = new HOEditorUndoManager(src, "HOTween Editor"); if (src.tweenDatas == null) src.tweenDatas = new List<HOTweenManager.HOTweenData>(); }