Exemplo n.º 1
0
 public void RunAction(GameObject gameobject, SSAction action, ISSActionCallback manager)
 {
     action.gameobject = gameobject;
     action.transform  = gameobject.transform;
     action.callback   = manager;
     waitingAdd.Add(action);
     action.Start();
 }
Exemplo n.º 2
0
 public void Run(GameObject gameObject, SSAction action, ISSActionCallback callback)
 {
     action.MyGameObject = gameObject;
     action.Callback     = callback;
     action.MyTransform  = gameObject.transform;
     Add.Add(action);
     action.Start();
 }
Exemplo n.º 3
0
 public void reset()
 {
     enable     = false;
     destroy    = false;
     gameobject = null;
     transform  = null;
     callback   = null;
 }
 public void RunAction(GameObject objParam, SSAction action, ISSActionCallback manager)
 {
     action.gameObject = objParam;
     action.transform  = objParam.transform;
     action.callback   = manager;
     waitingAdd.Add(action);
     action.Start();
 }
Exemplo n.º 5
0
 public void runAction(GameObject gameObject, SSAction action, ISSActionCallback callback)
 {
     action.gameObject = gameObject;
     action.transform  = gameObject.transform;
     action.callback   = callback;
     watingAddAction.Add(action);
     action.Start();
 }
Exemplo n.º 6
0
 public void RunAction(GameObject gameObject, SSAction action, ISSActionCallback whoToNotify)
 {
     action.gameObject = gameObject;
     action.transform  = gameObject.transform;
     action.callback   = whoToNotify;
     waitingToAdd.Add(action);
     action.Start();
 }
Exemplo n.º 7
0
 public void RunAction(GameObject gameobject, SSAction action, ISSActionCallback callback)
 {
     action.transform = gameobject.transform;
     action.target    = gameobject.transform.position;
     action.initPos   = gameobject.transform.position;
     action.animator  = gameobject.GetComponent <Animator>();
     action.callback  = callback;
     action.Start();
 }
Exemplo n.º 8
0
 public void RunAction(GameObject gameObject, SSAction action, ISSActionCallback manager)
 {
     Debug.Log(gameObject.GetInstanceID());
     action.gameObject = gameObject;
     action.transform  = gameObject.transform;
     action.callback   = manager;
     waitingAdd.Add(action);
     action.Start();
 }
Exemplo n.º 9
0
 public void RunAction(GameObject gameobject, SSAction action, ISSActionCallback manager)
 {
     action.gameobject = gameobject;
     action.transform  = gameobject.transform;
     action.callback   = manager;
     waitingAdd.Add(action);
     action.Start();
     // Debug.Log("SSAction Manager called RunAction, "+waitingAdd.Count);
 }
Exemplo n.º 10
0
        public static ArrowShakeAction GetSSAction(GameObject gameObject, ISSActionCallback _callback)
        {
            ArrowShakeAction action = ScriptableObject.CreateInstance <ArrowShakeAction>();

            action.gameobject = gameObject;
            action.startPos   = gameObject.transform.position;
            action.callback   = _callback;
            return(action);
        }
Exemplo n.º 11
0
 public void RunAction(GameObject gameObject, SSAction action, ISSActionCallback manager)
 {
     action.gameObject = gameObject;
     Debug.Log(action.gameObject.GetComponent <Rigidbody>().useGravity);
     action.transform = gameObject.transform;
     action.callback  = manager;
     waitingAdd.Add(action);
     action.Start();
 }
Exemplo n.º 12
0
        public static RandomMoveAction GetSSAction(GameObject gameObject, ISSActionCallback _callback)
        {
            RandomMoveAction action = ScriptableObject.CreateInstance <RandomMoveAction>();

            action.gameobject = gameObject;
            action.transform  = gameObject.transform;
            action.callback   = _callback;

            return(action);
        }
Exemplo n.º 13
0
 public void RunAction(
     GameObject obj,
     SSAction act,
     ISSActionCallback manager)
 {
     act.Obj      = obj;
     act.Tra      = obj.transform;
     act.Callback = manager;
     waitAdd.Add(act);
     act.Start();
 }
Exemplo n.º 14
0
    public void RunAction(GameObject gameObject, SSAction action, ISSActionCallback manager)

    {
        action.gameObject = gameObject;

        action.callback = manager;

        gameObject.GetComponent <DiskData>().currentSSAction = action;

        waitingAdd.Add(action);

        action.Start();
    }
Exemplo n.º 15
0
    public void RunAction(GameObject gameobject, SSAction action, ISSActionCallback manager)
    {
        action.gameobject = gameobject;
        // just let it move relative to their father
        action.transform = gameobject.transform;
        action.callback  = manager;

        /* !!!!!!!!!!!!!!!!!!!!!!!!!!
         * bug happen here --20170320 2306
         * if this action is used twice, we need to reset
         * action.destory and action.enable
         * But this is not a good convention
         * -- by BowenWu
         */
        action.destory = false;
        action.enable  = true;
        waitingAdd.Add(action);
        action.Start();
    }
Exemplo n.º 16
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);
            }
        }
Exemplo n.º 17
0
        public static DirectMoveAction GetSSAction(GameObject gameObject, GameObject _target, ISSActionCallback _callback)
        {
            DirectMoveAction action = ScriptableObject.CreateInstance <DirectMoveAction>();

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

            return(action);
        }
Exemplo n.º 18
0
 public void MoveBoat(GameObject gameObject, ISSActionCallback callback)
 {
     moveToAction = CCMoveToAction.GetSSAction(-gameObject.transform.position, 10 * Time.deltaTime);
     this.RunAction(gameObject, moveToAction, this);
 }
Exemplo n.º 19
0
 public void OnBoat(GameObject gameObject, ISSActionCallback callback)
 {
     userClickAction = UserClickAction.GetSSAction();
     this.RunAction(gameObject, userClickAction, callback);
 }
Exemplo n.º 20
0
    public SSAction ApplyCCMoveToYZAction(GameObject obj, Vector3 target, float speed, ISSActionCallback completed)
    {
        CCMoveToYZAction ac = obj.AddComponent <CCMoveToYZAction>();

        ac.RunAction(obj, target, speed, completed);
        return(ac);
    }
Exemplo n.º 21
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.º 22
0
        public static ArrowShootAction GetSSAction(GameObject gameObject, Vector3 wind, ISSActionCallback _callback)
        {
            ArrowShootAction action = ScriptableObject.CreateInstance <ArrowShootAction>();

            action.gameobject = gameObject;
            action.force      = new Vector3(0, 0, 20);
            action.wind       = wind;
            action.rigidbody  = gameObject.GetComponent <Rigidbody>();
            action.callback   = _callback;
            return(action);
        }
Exemplo n.º 23
0
        public static sequenceAction GetSSAction(int repeat, int start, List <SSAction> sequence, ISSActionCallback _callback)
        {
            sequenceAction action = ScriptableObject.CreateInstance <sequenceAction>();

            action.repeat   = repeat;
            action.sequence = sequence;
            action.start    = start;
            action.callback = _callback;
            return(action);
        }
Exemplo n.º 24
0
 public void RunAction(SSAction action, ISSActionCallback manager)
 {
     action.callback = manager;
     waitngAdd.Add(action);
     action.Start();
 }
Exemplo n.º 25
0
 public void setCallback(ISSActionCallback _callback)
 {
     callback = _callback;
 }
Exemplo n.º 26
0
        public static PlayerMoveAction GetSSAction(GameObject gameObject, float _TranslationX, float _TranslationY, ISSActionCallback _callback)
        {
            PlayerMoveAction action = ScriptableObject.CreateInstance <PlayerMoveAction>();

            action.TranslationX = _TranslationX;
            action.TranslationY = _TranslationY;
            action.gameobject   = gameObject;
            action.transform    = gameObject.transform;
            action.callback     = _callback;

            return(action);
        }