Пример #1
0
 protected virtual void Start()
 {
     if (!CUtils.EqualVector3(transform.position, pointA.position))
     {
         iTween.MoveTo(gameObject, iTween.Hash("position", pointA.position, "speed", speed, "easeType", easetype, "oncomplete", "OnMoveToPointComplete"));
     }
     else
     {
         OnMoveToPointComplete();
     }
 }
Пример #2
0
    private void Start()
    {
        pointA = new Vector3(fromX, transform.position.y, transform.position.z);
        pointB = new Vector3(toX, transform.position.y, transform.position.z);

        if (!CUtils.EqualVector3(transform.position, pointA))
        {
            iTween.MoveTo(gameObject, iTween.Hash("position", pointA, "speed", speed, "easeType", iTween.EaseType.linear, "oncomplete", "OnMoveToPointComplete"));
        }
        else
        {
            OnMoveToPointComplete();
        }
    }
Пример #3
0
    private void OnStart()
    {
        if (temp == null)
        {
            enabled = false;
            return;
        }

        if (!CUtils.EqualVector3(transform.position, pointA))
        {
            iTween.MoveTo(temp, iTween.Hash("position", pointA, "speed", speed, "easeType", easyType, "oncomplete", "OnMoveToPointComplete", "oncompletetarget", gameObject, "onupdatetarget", gameObject, "onupdate", "OnUpdate"));
        }
        else
        {
            OnMoveToPointComplete();
        }
        enabled = false;
    }