Esempio n. 1
0
    public static void Stop(UIDragRedGrid reg)
    {
        var com = reg.GetComponent <SpringRegGrid>();

        if (com != null)
        {
            com.isEnable = false;
        }
    }
Esempio n. 2
0
 public void SetCenterEvent(UIDragRedGrid drag)
 {
     m_SpringRegAnim = drag;
     if (Listener != null)
     {
         Listener.onClick += MoveToCenter;
     }
     else
     {
         Debug.LogError("RegGridCell Click Event Must Have UIEventListner Component");
     }
 }
Esempio n. 3
0
    public static void Begin(UIDragRedGrid reg, Vector3 fromFactor, Vector3 toFactor = default(Vector3), System.Action finishCallBack = null, float DuringTime = 1)
    {
        var com = reg.GetComponent <SpringRegGrid>();

        if (com == null)
        {
            com = reg.gameObject.AddComponent <SpringRegGrid>();
        }
        com.UIDragRed        = reg;
        com.isEnable         = true;
        com.fromDelta        = fromFactor;
        com.toDelta          = toFactor;
        com.m_FinishCallBack = finishCallBack;
        com.m_DuringTime     = DuringTime;
        com.m_CurTime        = 0;
        //Debug.Log("all>>" + (com.toDelta.x - com.fromDelta.x) );
    }