Skip to content

Commit 1ff65d6

Browse files
authored
fix warnings (#380)
1 parent 2f00e84 commit 1ff65d6

File tree

15 files changed

+27
-28
lines changed

15 files changed

+27
-28
lines changed

Arcade/Flixius/source/EnemyPod.hx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ class EnemyPod extends FlxSprite
2626
alpha = _dying;
2727
if (_dying <= 0)
2828
{
29-
velocity.set();
29+
velocity.zero();
3030
alive = false;
3131
exists = false;
3232
}

Arcade/Flixius/source/EnemySpinner.hx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ class EnemySpinner extends FlxSprite
2626
alpha = _dying;
2727
if (_dying <= 0)
2828
{
29-
velocity.set();
29+
velocity.zero();
3030
alive = false;
3131
exists = false;
3232
}

Arcade/Flixius/source/PlayState.hx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ class PlayState extends FlxState
5555

5656
_stars = new FlxStarField2D(0, 0, FlxG.width, FlxG.height, 60);
5757
_stars.bgColor = 0x0;
58-
_stars.scrollFactor.set();
58+
_stars.scrollFactor.zero();
5959
_stars.setStarSpeed(0, 0);
6060
add(_stars);
6161

@@ -129,20 +129,20 @@ class PlayState extends FlxState
129129

130130
_txtScore = new FlxText(FlxG.width - 202, 2, 200, "0", 8);
131131
_txtScore.alignment = FlxTextAlign.RIGHT;
132-
_txtScore.scrollFactor.set();
132+
_txtScore.scrollFactor.zero();
133133
add(_txtScore);
134134

135135
_healthBar = new FlxBar(2, 2, FlxBarFillDirection.LEFT_TO_RIGHT, 90, 6, _sprPlayer, "health", 0, 10, true);
136136
_healthBar.createGradientBar([0xcc111111], [0xffff0000, 0xff00ff00], 1, 0, true, 0xcc333333);
137-
_healthBar.scrollFactor.set();
137+
_healthBar.scrollFactor.zero();
138138
add(_healthBar);
139139

140140
var shine:FlxSprite = FlxGradient.createGradientFlxSprite(Std.int(_healthBar.width), Std.int(_healthBar.height),
141141
[0x66ffffff, 0xffffffff, 0x66ffffff, 0x11ffffff, 0x0]);
142142
shine.alpha = .5;
143143
shine.x = _healthBar.x;
144144
shine.y = _healthBar.y;
145-
shine.scrollFactor.set();
145+
shine.scrollFactor.zero();
146146
add(shine);
147147

148148
FlxG.camera.setScrollBoundsRect(_map.x, _map.y, _map.width, _map.height, true);

Arcade/FlxLightPuzzle/source/Circle.hx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,12 +35,12 @@ class Circle
3535
else
3636
closest = segment.start.addNew(segment.vector.clone().normalize().scale(proj));
3737

38-
closest.subtractPoint(center);
38+
closest.subtract(center);
3939

4040
if (closest.lengthSquared >= radius * radius)
4141
closest.set(Math.NaN, Math.NaN);
4242

43-
closest.addPoint(center);
43+
closest.add(center);
4444

4545
return closest;
4646
}

Arcade/FlxLightPuzzle/source/Segment.hx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ class Segment
5252
return false;
5353

5454
var v1 = segment.start.clone();
55-
v1.subtractPoint(start);
55+
v1.subtract(start);
5656

5757
if (v1.crossProductLength(vector) > FlxPoint.EPSILON_SQUARED)
5858
{

Arcade/FlxTeroids/source/PlayerShip.hx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ class PlayerShip extends FlxSprite
4141
angularVelocity += 240;
4242
}
4343

44-
acceleration.set();
44+
acceleration.zero();
4545

4646
if (FlxG.keys.anyPressed([W, UP]))
4747
{

Effects/FlxSpriteFilters/source/PlayState.hx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,5 @@
11
package;
22

3-
import openfl.filters.DisplacementMapFilterMode;
4-
import openfl.utils.Assets;
5-
import openfl.filters.DisplacementMapFilter;
63
import flash.filters.BitmapFilter;
74
import flash.filters.BlurFilter;
85
import flash.filters.DropShadowFilter;
@@ -13,7 +10,10 @@ import flixel.FlxState;
1310
import flixel.graphics.frames.FlxFilterFrames;
1411
import flixel.text.FlxText;
1512
import flixel.tweens.FlxTween;
13+
import openfl.filters.DisplacementMapFilter;
14+
import openfl.filters.DisplacementMapFilterMode;
1615
import openfl.geom.Point;
16+
import openfl.utils.Assets;
1717

1818
#if flash
1919
import flash.filters.BevelFilter;
@@ -204,7 +204,7 @@ class PlayState extends FlxState
204204
function updateFilter(spr:FlxSprite, sprFilter:FlxFilterFrames)
205205
{
206206
// Reset the offset, it will ballon with each apply call
207-
spr.offset.set();
207+
spr.offset.zero();
208208
sprFilter.applyToSprite(spr, false, true);
209209
}
210210
}

Effects/Parallax/source/Flake.hx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ class Flake extends FlxSprite
5555
if (_level == 3)
5656
{
5757
scrollFactor.x = 1;
58-
velocity.set();
58+
velocity.zero();
5959
y = FlxG.height - 65;
6060
}
6161
else

Effects/Parallax/source/PlayState.hx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ class PlayState extends FlxState
2727
{
2828
// build a gradient sky for the background - make it as big as our screen, and, it's going to be stationary
2929
var sky:FlxSprite = FlxGradient.createGradientFlxSprite(FlxG.width, FlxG.height, [0xff6dcff6, 0xff333333], 16);
30-
sky.scrollFactor.set();
30+
sky.scrollFactor.zero();
3131
add(sky);
3232

3333
var uncoloredMountain:FlxSprite = new FlxSprite(0, 0, "assets/mountains.png");
@@ -45,7 +45,7 @@ class PlayState extends FlxState
4545
// this is just a solid-gradient to go behind our ground
4646
var _sprSolid = FlxGradient.createGradientFlxSprite(FlxG.width, 64, [0xff333333, 0xff000000], 8);
4747
_sprSolid.y = FlxG.height - 64;
48-
_sprSolid.scrollFactor.set();
48+
_sprSolid.scrollFactor.zero();
4949
add(_sprSolid);
5050

5151
// a tileblock of stuff to go between the player and the mountains
@@ -69,7 +69,7 @@ class PlayState extends FlxState
6969
var txtInst:FlxText = new FlxText(0, FlxG.height - 16, FlxG.width, "Left/Right to Move");
7070
txtInst.alignment = FlxTextAlign.CENTER;
7171
txtInst.setBorderStyle(FlxTextBorderStyle.SHADOW, 0xff333333, 1, 1);
72-
txtInst.scrollFactor.set();
72+
txtInst.scrollFactor.zero();
7373
add(txtInst);
7474

7575
// we're going to have some snow or ash flakes drifting down at different 'levels'. We need a lot of them for the effect to work nicely

Features/Pathfinding/source/BigMoverPathfinder.hx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ class BigMoverPathfinder extends FlxDiagonalPathfinder
6363
);
6464

6565
for (p in path)
66-
p.addPoint(offset);
66+
p.add(offset);
6767

6868
offset.put();
6969

0 commit comments

Comments
 (0)