Ejemplo n.º 1
0
        public float speed = 15; //移动速度;

        public static CCMove GetSSAction(Vector3 dst)
        {
            CCMove action = ScriptableObject.CreateInstance <CCMove>();

            action.dst = dst;
            return(action);
        }
Ejemplo n.º 2
0
        public void MoveBoat()
        {
            CCMove ccMove;

            if (!left)
            {
                ccMove = CCMove.GetSSAction(new Vector3(-0.21f, 0.57f, 3.65f));
            }
            else
            {
                ccMove = CCMove.GetSSAction(new Vector3(2.79f, 0.57f, 3.65f));
            }
            var actionManager = ((FirstController)SSDirector.GetInstance().CurrentSceneController).actionManager;

            actionManager.RunAction(obj, ccMove, (CCActionManager)actionManager);
            for (int i = 0; i < characters.Length; i++)
            {
                if ((characters[i] != null))
                {
                    characters[i].ChangeSide();
                }
            }
            left = !left;
        }
Ejemplo n.º 3
0
        public void MoveObject(GameObject obj, Vector3 dst)
        {
            CCMove MoveAction = CCMove.GetSSAction(dst);

            this.RunAction(obj, MoveAction, this);
        }