Revision 45e0065d
Added by Leszek Koltunski over 2 years ago
src/main/java/org/distorted/objectlib/helpers/BlockController.java | ||
---|---|---|
43 | 43 |
public static final int CONTROL_PLACE_0 =20; |
44 | 44 |
public static final int CONTROL_PLACE_1 =21; |
45 | 45 |
|
46 |
private static final long THRESHHOLD_0 = 3000;
|
|
47 |
private static final long THRESHHOLD_1 = 25000;
|
|
48 |
private static final long THRESHHOLD_2 = 5000;
|
|
49 |
private static final long THRESHHOLD_3 = 45000;
|
|
46 |
private static final long THRESHHOLD_0 = 6000;
|
|
47 |
private static final long THRESHHOLD_1 = 50000;
|
|
48 |
private static final long THRESHHOLD_2 = 10000;
|
|
49 |
private static final long THRESHHOLD_3 = 90000;
|
|
50 | 50 |
|
51 | 51 |
private static long mPauseTime, mResumeTime; |
52 | 52 |
|
src/main/java/org/distorted/objectlib/main/ObjectControl.java | ||
---|---|---|
612 | 612 |
mScreenHeight= height; |
613 | 613 |
mScreenMin = Math.min(width,height); |
614 | 614 |
|
615 |
if( mObjectNode!=null ) mObjectNode.setSize(width,height); |
|
616 |
|
|
615 | 617 |
TwistyObject object = mPreRender.getObject(); |
616 | 618 |
|
617 | 619 |
if( object!=null ) |
618 | 620 |
{ |
619 | 621 |
object.setTexture(); |
620 |
if( mObjectNode!=null ) |
|
621 |
{ |
|
622 |
object.setObjectRatioNow(1.0f,mObjectNode.getMinSize()); |
|
623 |
} |
|
622 |
object.setNodeSize(mScreenMin); |
|
624 | 623 |
} |
625 |
|
|
626 |
if( mObjectNode!=null ) mObjectNode.setSize(width,height); |
|
627 | 624 |
} |
628 | 625 |
|
629 | 626 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
src/main/java/org/distorted/objectlib/main/TwistyObject.java | ||
---|---|---|
1124 | 1124 |
|
1125 | 1125 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
1126 | 1126 |
|
1127 |
void setObjectRatioNow(float sc, int nodeMinSize)
|
|
1127 |
void setObjectRatioNow(float sc, int nodeSize) |
|
1128 | 1128 |
{ |
1129 | 1129 |
mObjectScreenRatio = sc; |
1130 |
float scale = mObjectScreenRatio*mInitScreenRatio*nodeMinSize/mSize;
|
|
1130 |
float scale = mObjectScreenRatio*mInitScreenRatio*nodeSize/mSize; |
|
1131 | 1131 |
mObjectScale.set(scale,scale,scale); |
1132 | 1132 |
} |
1133 | 1133 |
|
1134 | 1134 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
1135 | 1135 |
|
1136 |
void setObjectRatio(float sizeChange, int nodeMinSize)
|
|
1136 |
void setObjectRatio(float sizeChange, int nodeSize) |
|
1137 | 1137 |
{ |
1138 | 1138 |
mObjectScreenRatio *= (1.0f+sizeChange)/2; |
1139 | 1139 |
|
1140 | 1140 |
if( mObjectScreenRatio>MAX_SIZE_CHANGE) mObjectScreenRatio = MAX_SIZE_CHANGE; |
1141 | 1141 |
if( mObjectScreenRatio<MIN_SIZE_CHANGE) mObjectScreenRatio = MIN_SIZE_CHANGE; |
1142 | 1142 |
|
1143 |
setObjectRatioNow(mObjectScreenRatio, nodeMinSize); |
|
1143 |
setObjectRatioNow(mObjectScreenRatio, nodeSize); |
|
1144 |
} |
|
1145 |
|
|
1146 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
|
1147 |
|
|
1148 |
void setNodeSize(int nodeSize) |
|
1149 |
{ |
|
1150 |
setObjectRatioNow(mObjectScreenRatio, nodeSize); |
|
1144 | 1151 |
} |
1145 | 1152 |
|
1146 | 1153 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
Also available in: Unified diff
Correct the next bug with settign the object size.
Multiply the time limits in BlockController by 2 - this way we can see if the ratio of (UI+Touch)/Thread Firebase non-fatals will observably drop below the current value of 4.