Ejemplo n.º 1
0
    public static CCMoveAction GetSSAction(int newState)
    {
        CCMoveAction action = ScriptableObject.CreateInstance <CCMoveAction> ();

        action.newState = newState;
        return(action);
    }
Ejemplo n.º 2
0
    public static CCMoveAction GetSSAction(Vector3 distance, float speed)
    {
        CCMoveAction action = ScriptableObject.CreateInstance <CCMoveAction>();

        action.distance = distance;
        action.speed    = speed;
        return(action);
    }
Ejemplo n.º 3
0
 protected new void Start()
 {
     sceneController = (FirstController)Director.getInstance().sceneController;
     if (sceneController.is_physics == false)
     {
         sceneController.actionManager = this;
     }
     Fly.Add(CCMoveAction.GetSSAction());
 }
    protected new void Start()
    {
        object_speed    = 4.0f;
        boat_speed      = 4.0f;
        sceneController = (GenGameObjects)SSDirector.getInstance().currentSceneController;
        sceneController.actionManager = this;

        move_up            = CCMoveAction.GetSSAction(new Vector3(0, 1, 0), object_speed);
        move_down          = CCMoveAction.GetSSAction(new Vector3(0, -1, 0), object_speed);
        move_to_boat_left  = CCMoveToAction.GetSSAction(new Vector3(-2.3f, 2, 0), object_speed);
        move_to_boat_right = CCMoveToAction.GetSSAction(new Vector3(-1.2f, 2, 0), object_speed);

        get_on_boat_left = CCSequenceAction.GetSSAction(0, 0, new List <SSAction> {
            move_up, move_to_boat_left, move_down
        });
        get_on_boat_right = CCSequenceAction.GetSSAction(0, 0, new List <SSAction> {
            move_up, move_to_boat_right, move_down
        });

        boat_to_end   = CCMoveToAction.GetSSAction(new Vector3(1.7f, 0, 0), boat_speed);
        boat_to_begin = CCMoveToAction.GetSSAction(new Vector3(-1.7f, 0, 0), boat_speed);
    }
Ejemplo n.º 5
0
    public float time;     //运动时间

    public static CCMoveAction GetSSAction()
    {
        CCMoveAction action = ScriptableObject.CreateInstance <CCMoveAction>();

        return(action);
    }
Ejemplo n.º 6
0
 protected new void Start()
 {
     sceneController = (FirstController)Director.getInstance().sceneController;
     sceneController.actionManager = this;
     Fly.Add(CCMoveAction.GetSSAction());
 }
Ejemplo n.º 7
0
 public void MoveRunAction(GameObject gameObject, int newState)
 {
     this.RunAction(gameObject, CCMoveAction.GetSSAction(newState), this);
 }