Ejemplo n.º 1
0
 public static SSActionManager GetInstance()
 {
     if (_instance == null)
     {
         _instance = new SSActionManager();
     }
     return(_instance);
 }
Ejemplo n.º 2
0
        public void RunAction(GameObject obj, Vector3 target, float speed, ISSActionCallback monitor)
        {
            this.obj     = obj;
            this.target  = target;
            this.speed   = speed;
            this.monitor = monitor;
            GameSceneController.GetInstance().setMoving(true);

            if (target.y < obj.transform.position.y)
            {
                Vector3 targetZ = new Vector3(target.x, obj.transform.position.y, target.z);
                SSActionManager.GetInstance().ApplyCCMoveToAction(obj, targetZ, speed, this);
            }
            else
            {
                Vector3 targetY = new Vector3(target.x, target.y, obj.transform.position.z);
                SSActionManager.GetInstance().ApplyCCMoveToAction(obj, targetY, speed, this);
            }
        }
Ejemplo n.º 3
0
 public void OnActionCompleted(SSAction action)
 {
     SSActionManager.GetInstance().ApplyCCMoveToAction(obj, target, speed, null);
 }