public static void StopMove(this Transform trans) { StartMove move = trans.GetComponent <StartMove>(); if (!move) { move = trans.gameObject.AddComponent <StartMove>(); } move.StopMove(); }
public static void DoMove(this Transform trans, Vector3 toPos, float time, bool useWorldPos, CTween.EaseType method, CTween.EndHandler endEvent, bool xEnable, bool yEnable, bool zEnable) { StartMove move = trans.GetComponent <StartMove>(); if (!move) { move = trans.gameObject.AddComponent <StartMove>(); } move.Move(toPos, time, useWorldPos, method, endEvent, xEnable, yEnable, zEnable); }