Exemplo n.º 1
0
        public static CCMoveToAction GetSSAction(GameObject gameObject, Vector3 _target, float speed, ISSActionCallback _callback)
        {
            CCMoveToAction action = ScriptableObject.CreateInstance <CCMoveToAction>();

            action.target     = _target;
            action.speed      = speed;
            action.gameobject = gameObject;
            action.transform  = gameObject.transform;
            action.callback   = _callback;

            return(action);
        }
Exemplo n.º 2
0
        public void FlyUFO(List <GameObject> waitToFly, Ruler ruler, int round)
        {
            List <SSAction> toMove = new List <SSAction>();

            for (int i = 0; i < waitToFly.Count; i++)
            {
                toMove.Add(CCMoveToAction.GetSSAction(waitToFly[i], ruler.getDes(waitToFly[i].transform.position), ruler.getSpeed(round) * AnimateSpeed, null));
            }
            sequenceAction action = sequenceAction.GetSSAction(1, 0, toMove, this);

            addAction(action);
        }
Exemplo n.º 3
0
        public void FlyUFO(List <GameObject> waitToFly, Ruler ruler, int round)
        {
            SSAction action;
            float    waitTime = 0;

            for (int i = 0; i < waitToFly.Count; i++)
            {
                Debug.Log("Flying");
                action = CCMoveToAction.GetSSAction(waitToFly[i], ruler.getDes(waitToFly[i].transform.position), ruler.getSpeed(round) * AnimateSpeed, this);
                if (i == 0)
                {
                    addAction(action);
                }
                else
                {
                    addWaitAction(action);
                    StartCoroutine(setNextFly(waitTime, action));
                }
                waitTime += ruler.getIntervals(round);
            }
        }
Exemplo n.º 4
0
        public void FlyUFO(GameObject gameObject, Ruler ruler, int round)
        {
            CCMoveToAction action = CCMoveToAction.GetSSAction(gameObject, ruler.getDes(gameObject.transform.position), ruler.getSpeed(round) * AnimateSpeed, this);

            addAction(action);
        }