Skip to content

Commit

Permalink
Adjust mob direction due to PathFollow2D change
Browse files Browse the repository at this point in the history
  • Loading branch information
Chris Bradfield committed Dec 13, 2017
1 parent 256ea73 commit 92a1ca3
Show file tree
Hide file tree
Showing 16 changed files with 59 additions and 3 deletions.
4 changes: 2 additions & 2 deletions Main.gd
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,10 @@ func _on_MobTimer_timeout():
$MobPath/MobSpawnLocation.set_offset(randi())
var mob = Mob.instance()
add_child(mob)
var direction = $MobPath/MobSpawnLocation.rotation
var direction = $MobPath/MobSpawnLocation.rotation + PI/2
mob.position = $MobPath/MobSpawnLocation.position
# add some randomness to the direction
direction += rand_range(-PI/4, PI/4)
#direction += rand_range(-PI/4, PI/4)
mob.rotation = direction
mob.set_linear_velocity(Vector2(rand_range(mob.MIN_SPEED, mob.MAX_SPEED), 0).rotated(direction))

Expand Down
2 changes: 1 addition & 1 deletion Main.tscn
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ curve = SubResource( 1 )
[node name="MobSpawnLocation" type="PathFollow2D" parent="MobPath"]

position = Vector2( 1.70602, 3.56798 )
rotation = 1.57017
rotation = -0.000630111
offset = 0.0
h_offset = 0.0
v_offset = 0.0
Expand Down
4 changes: 4 additions & 0 deletions art/House In a Forest Loop.ogg.import
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@ importer="ogg_vorbis"
type="AudioStreamOGGVorbis"
path="res://.import/House In a Forest Loop.ogg-1a6a72ae843ad792b7039931227e8d50.oggstr"

[deps]

source_md5="c395b0cc351a71713417cf862282849f"

[params]

loop=true
Expand Down
4 changes: 4 additions & 0 deletions art/enemyFlyingAlt_1.png.import
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@ importer="texture"
type="StreamTexture"
path="res://.import/enemyFlyingAlt_1.png-559f599b16c69b112c1b53f6332e9489.stex"

[deps]

source_md5="64d9fdc23f76112a64a283673e3fd8dd"

[params]

compress/mode=0
Expand Down
4 changes: 4 additions & 0 deletions art/enemyFlyingAlt_2.png.import
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@ importer="texture"
type="StreamTexture"
path="res://.import/enemyFlyingAlt_2.png-31dc7310eda6e1b721224f3cd932c076.stex"

[deps]

source_md5="5281b0d2b947deb09cbf95ecf9628ae7"

[params]

compress/mode=0
Expand Down
4 changes: 4 additions & 0 deletions art/enemySwimming_1.png.import
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@ importer="texture"
type="StreamTexture"
path="res://.import/enemySwimming_1.png-dd0e11759dc3d624c8a704f6e98a3d80.stex"

[deps]

source_md5="5e557d1bd564dd553650de1c38746ed9"

[params]

compress/mode=0
Expand Down
4 changes: 4 additions & 0 deletions art/enemySwimming_2.png.import
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@ importer="texture"
type="StreamTexture"
path="res://.import/enemySwimming_2.png-4c0cbc0732264c4ea3290340bd4a0a62.stex"

[deps]

source_md5="d04b001ba2f4ac6884fdbe44b55fa656"

[params]

compress/mode=0
Expand Down
4 changes: 4 additions & 0 deletions art/enemyWalking_1.png.import
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@ importer="texture"
type="StreamTexture"
path="res://.import/enemyWalking_1.png-5af6eedbe61b701677d490ffdc1e6471.stex"

[deps]

source_md5="0e417b74e72f5d8f4aca0e557a735643"

[params]

compress/mode=0
Expand Down
4 changes: 4 additions & 0 deletions art/enemyWalking_2.png.import
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@ importer="texture"
type="StreamTexture"
path="res://.import/enemyWalking_2.png-67c480ed60c35e95f5acb0436246b935.stex"

[deps]

source_md5="838f40a8b77a0cb387dc5e5aff6bd8d5"

[params]

compress/mode=0
Expand Down
4 changes: 4 additions & 0 deletions art/gameover.wav.import
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@ importer="wav"
type="AudioStreamSample"
path="res://.import/gameover.wav-98c95c744b35280048c2bd093cf8a356.sample"

[deps]

source_md5="fe94a3a7558cff917a5500a1298fdcac"

[params]

force/8_bit=false
Expand Down
4 changes: 4 additions & 0 deletions art/playerGrey_up1.png.import
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@ importer="texture"
type="StreamTexture"
path="res://.import/playerGrey_up1.png-6bd114d0a6beac91f48e3a7314d44564.stex"

[deps]

source_md5="f84241d41055080a3393c9a8619f172b"

[params]

compress/mode=0
Expand Down
4 changes: 4 additions & 0 deletions art/playerGrey_up2.png.import
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@ importer="texture"
type="StreamTexture"
path="res://.import/playerGrey_up2.png-d6aba85f5f2675ebc7045efa7552ee79.stex"

[deps]

source_md5="57618c302a312d248705c7f045978765"

[params]

compress/mode=0
Expand Down
4 changes: 4 additions & 0 deletions art/playerGrey_walk1.png.import
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@ importer="texture"
type="StreamTexture"
path="res://.import/playerGrey_walk1.png-c4773fe7a7bf85d7ab732eb4458c2742.stex"

[deps]

source_md5="7892ed98ba910fbda0d37266127e96bb"

[params]

compress/mode=0
Expand Down
4 changes: 4 additions & 0 deletions art/playerGrey_walk2.png.import
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@ importer="texture"
type="StreamTexture"
path="res://.import/playerGrey_walk2.png-34d2d916366100182d08037c51884043.stex"

[deps]

source_md5="9fc73e1224a6b16d8fb5d0f667e3aed2"

[params]

compress/mode=0
Expand Down
4 changes: 4 additions & 0 deletions art/set3_tiles.png.import
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@ importer="texture"
type="StreamTexture"
path="res://.import/set3_tiles.png-7dd06b1fc0bcfaa06e9dd732f61382a2.stex"

[deps]

source_md5="eef34d896b231438a2d97707c0ab06a2"

[params]

compress/mode=0
Expand Down
4 changes: 4 additions & 0 deletions icon.png.import
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@ importer="texture"
type="StreamTexture"
path="res://.import/icon.png-487276ed1e3a0c39cad0279d744ee560.stex"

[deps]

source_md5="7b0d811088c13a3b6d79f9895b9f2935"

[params]

compress/mode=0
Expand Down

0 comments on commit 92a1ca3

Please sign in to comment.