Skip to content

Commit 8fc1ab6

Browse files
author
prisonerjohn@gmail.com
committed
Reverted commit 116.
1 parent 98389a7 commit 8fc1ab6

38 files changed

+154
-1196
lines changed

src/net/nexttext/Book.java

Lines changed: 36 additions & 310 deletions
Large diffs are not rendered by default.

src/net/nexttext/TextObjectBuilder.java

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@
2020
package net.nexttext;
2121

2222
import net.nexttext.behaviour.AbstractBehaviour;
23-
import net.nexttext.behaviour.Behaviour;
2423
import net.nexttext.property.Property;
2524

2625
import java.awt.FontMetrics;
@@ -41,8 +40,6 @@
4140

4241
import processing.core.*;
4342

44-
import net.nexttext.behaviour.physics.Move;
45-
4643
/**
4744
* Factory class used for creating TextObjects and adding them to NextText.
4845
*
@@ -169,6 +166,7 @@ public void setAddToSpatialList(boolean addToSpatialList) {
169166
this.addToSpatialList = addToSpatialList;
170167
}
171168

169+
172170
int align = PConstants.LEFT;
173171
/** Set the horizontal alignment type of the group around the position. */
174172
public void setTextAlign(int align) {

src/net/nexttext/behaviour/control/DebugLog.java

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -98,20 +98,4 @@ public void complete(TextObject to) {
9898
action.complete(to);
9999
}
100100
}
101-
/**
102-
* Set functions to change the prefix and action.
103-
* @param prefix
104-
*/
105-
public void set(String prefix) {
106-
this.prefix = prefix;
107-
}
108-
/**
109-
*
110-
* @param prefix
111-
* @param action
112-
*/
113-
public void set(String prefix, Action action) {
114-
this.prefix = prefix;
115-
this.action = action;
116-
}
117101
}

src/net/nexttext/behaviour/control/Delay.java

Lines changed: 0 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -35,16 +35,6 @@ public class Delay extends AbstractAction {
3535
Action action;
3636
long timeLeft; // for handling clock discrepancies
3737

38-
/**
39-
* Creates a Delay for the given action.
40-
* Default delay time is 10 seconds.
41-
*/
42-
public Delay( Action action) {
43-
this.action = action;
44-
this.timeLeft = 10000;
45-
properties().init("Duration", new NumberProperty(10000));
46-
}
47-
4838
/**
4939
* Creates a Delay for the given action.
5040
*
@@ -101,32 +91,4 @@ public ActionResult behave(TextObject to) {
10191
}
10292
return new ActionResult(false, true, false);
10393
}
104-
105-
/**
106-
* Change the action to delay.
107-
*/
108-
public void set( Action action) {
109-
this.action = action;
110-
}
111-
112-
/**
113-
* Change the delay time (in seconds).
114-
* @param duration
115-
*/
116-
public void set( float duration) {
117-
this.timeLeft = 1000 * (long)duration;
118-
((NumberProperty)properties().get("Duration")).set(1000* duration);
119-
}
120-
121-
/**
122-
* Change delay time and action to delay.
123-
*
124-
* @param duration In seconds
125-
*/
126-
public void set( Action action, float duration ) {
127-
set(action);
128-
set(duration);
129-
}
130-
131-
13294
}

src/net/nexttext/behaviour/control/Descend.java

Lines changed: 0 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -75,9 +75,6 @@ public Descend(Action descendantAction) {
7575
*/
7676
public Descend(Action descendantAction, int depth) {
7777
this.descendantAction = descendantAction;
78-
if(depth <= 0) {
79-
depth = 1;
80-
}
8178
this.depth = depth;
8279
this.descendantReqProps = descendantAction.getRequiredProperties();
8380
}
@@ -157,35 +154,4 @@ private void initRequiredProperties(TextObject to) {
157154
initedDescendants.put(to, true);
158155
}
159156
}
160-
161-
/**
162-
* Change the action to apply to descendants.
163-
* @param descendantAction
164-
*/
165-
public void set(Action descendantAction) {
166-
this.descendantAction= descendantAction;
167-
}
168-
169-
/**
170-
* Change the depth.
171-
*
172-
* @param depth is a non-negative integer indicating the number of levels
173-
* to descend in the TextObject hierarchy to get the TextObjects to be
174-
* acted on.
175-
*/
176-
public void set( int depth) {
177-
if(depth <= 0) {
178-
depth = 1;
179-
}
180-
this.depth = depth;
181-
}
182-
/**
183-
* Change both the action and depth.
184-
* @param desccendantAction
185-
* @param depth
186-
*/
187-
public void set(Action desccendantAction, int depth) {
188-
set(descendantAction);
189-
set(depth);
190-
}
191157
}

src/net/nexttext/behaviour/control/IsInside.java

Lines changed: 1 addition & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -47,22 +47,5 @@ public boolean condition( TextObject to ) {
4747
Rectangle objectBB = to.getBoundingPolygon().getBounds();
4848

4949
return area.intersects(objectBB);
50-
}
51-
52-
/**
53-
* Set functions to change the area, trua action and false action
54-
* @param area
55-
* @param trueAction
56-
* @param falseAction
57-
*/
58-
59-
public void set(Shape area, Action trueAction, Action falseAction) {
60-
set(trueAction, falseAction);
61-
this.area = area;
62-
}
63-
64-
public void set(Shape area) {
65-
this.area = area;
66-
}
67-
50+
}
6851
}

src/net/nexttext/behaviour/control/Multiplexer.java

Lines changed: 0 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -41,35 +41,6 @@ public class Multiplexer extends AbstractAction {
4141
protected List<Action> actions;
4242
protected HashMap<Action, HashSet<TextObject>> doneWithObject;
4343

44-
/**
45-
* Creates a Multiplexer with an array of Actions. Actions will repeat indefinitely by default.
46-
* @param actionsArray
47-
*/
48-
public Multiplexer(Action[] actionsArray) {
49-
actions = new ArrayList<Action>();
50-
doneWithObject = new HashMap<Action, HashSet<TextObject>>();
51-
for (Action a: actionsArray) {
52-
Repeat r = new Repeat(a);
53-
add(r);
54-
}
55-
}
56-
57-
/**
58-
* Creates a Multiplexer with an array of Actions. Actions will repeat the specified
59-
* number of times.
60-
* @param actionsArray
61-
* @param repetitions
62-
*/
63-
64-
public Multiplexer(Action[] actionsArray, int repetitions) {
65-
actions = new ArrayList<Action>();
66-
doneWithObject = new HashMap<Action, HashSet<TextObject>>();
67-
for (Action a: actionsArray) {
68-
Repeat r = new Repeat(a, repetitions);
69-
add(r);
70-
}
71-
}
72-
7344
/**
7445
* @param actions a List containing Action objects.
7546
*/

src/net/nexttext/behaviour/control/OnCollision.java

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -123,12 +123,4 @@ public ActionResult behave(TextObject to) {
123123
public Map<String, Property> getRequiredProperties() {
124124
return action.getRequiredProperties();
125125
}
126-
127-
/**
128-
* Change tha action to perform on a collision
129-
* @param action
130-
*/
131-
public void set(Action action) {
132-
this.action = action;
133-
}
134126
}

src/net/nexttext/behaviour/control/OnDrag.java

Lines changed: 0 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -149,24 +149,4 @@ public PVector getLocation() {
149149
return lastDragged.getPositionAbsolute();
150150
}
151151
}
152-
153-
/**
154-
* Set functions to change the button to check and the true and false actions
155-
* @param buttonToCheck
156-
* @param trueAction
157-
* @param falseAction
158-
*/
159-
public void set(int buttonToCheck, Action trueAction, Action falseAction) {
160-
set(trueAction, falseAction);
161-
this.buttonToCheck = buttonToCheck;
162-
}
163-
164-
public void set(int buttonToCheck, Action trueAction) {
165-
set(trueAction);
166-
this.buttonToCheck = buttonToCheck;
167-
}
168-
169-
public void set(int buttonToCheck) {
170-
this.buttonToCheck = buttonToCheck;
171-
}
172152
}

src/net/nexttext/behaviour/control/OnMouseDepressed.java

Lines changed: 2 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -37,8 +37,8 @@ public class OnMouseDepressed extends Condition {
3737
int buttonToCheck;
3838

3939
/**
40-
* Creates an OnMouseDepressed which performs the given Action when the left mouse
41-
* is pressed.
40+
* Creates an OnMouseDepressed which performs the given Action when the mouse
41+
* button 1 is pressed.
4242
*
4343
* @param trueAction the Action to perform when the mouse button 1 is pressed
4444
*/
@@ -92,24 +92,4 @@ public OnMouseDepressed(int buttonToCheck, Action trueAction, Action falseAction
9292
public boolean condition(TextObject to) {
9393
return mouse.isPressed(buttonToCheck);
9494
}
95-
96-
/**
97-
* Set functions to change the button to check and the true and false actions
98-
* @param buttonToCheck
99-
* @param trueAction
100-
* @param falseAction
101-
*/
102-
public void set(int buttonToCheck, Action trueAction, Action falseAction) {
103-
set(trueAction, falseAction);
104-
this.buttonToCheck = buttonToCheck;
105-
}
106-
107-
public void set(int buttonToCheck, Action trueAction) {
108-
set(trueAction);
109-
this.buttonToCheck = buttonToCheck;
110-
}
111-
112-
public void set(int buttonToCheck) {
113-
this.buttonToCheck = buttonToCheck;
114-
}
11595
}

0 commit comments

Comments
 (0)