From f64ace3402d895ae19111bbacb4a86f8de2414d8 Mon Sep 17 00:00:00 2001 From: Logan Date: Fri, 17 Jul 2020 16:24:04 -0500 Subject: [PATCH 1/3] Wands will autoshoot when button is held --- characters/Player.tscn | 25 +++++++++---------------- magic/Wands/BasicWand.tscn | 17 +++++++++++++++++ script/BasicWand.gd | 15 +++++++++++++++ script/player.gd | 16 ++++------------ 4 files changed, 45 insertions(+), 28 deletions(-) create mode 100644 magic/Wands/BasicWand.tscn create mode 100644 script/BasicWand.gd diff --git a/characters/Player.tscn b/characters/Player.tscn index 48e302e..951a3f3 100644 --- a/characters/Player.tscn +++ b/characters/Player.tscn @@ -3,8 +3,8 @@ [ext_resource path="res://script/player.gd" type="Script" id=1] [ext_resource path="res://meta/BoundedCamera.tscn" type="PackedScene" id=2] [ext_resource path="res://script/PlayerStateMachine.gd" type="Script" id=3] -[ext_resource path="res://art/Wand.png" type="Texture" id=4] -[ext_resource path="res://art/WizardM.png" type="Texture" id=5] +[ext_resource path="res://art/WizardM.png" type="Texture" id=4] +[ext_resource path="res://magic/Wands/BasicWand.tscn" type="PackedScene" id=5] [sub_resource type="OccluderPolygon2D" id=1] polygon = PoolVector2Array( -7, 0, -7, -2, -6, -2, -6, -3, -5, -3, -5, -5, -6, -5, -6, -10, -7, -10, -7, -12, -6, -12, -6, -19, -4, -19, -4, -18, -3, -18, -3, -17, 1, -17, 1, -16, 3, -16, 3, -15, 4, -15, 4, -14, 5, -14, 5, -13, 6, -13, 6, -12, 7, -12, 7, -10, 6, -10, 6, -9, 5, -9, 5, -8, 6, -8, 6, -4, 5, -4, 5, 0, -7, 0 ) @@ -77,22 +77,9 @@ drag_margin_bottom = 0.0 [node name="PlayerStateMachine" type="Node" parent="."] script = ExtResource( 3 ) -[node name="HoldPosition" type="Position2D" parent="."] -position = Vector2( 0, -6 ) -rotation = 1.5708 - -[node name="Wand" type="Sprite" parent="HoldPosition"] -position = Vector2( 9, -4.76837e-007 ) -rotation = 1.5708 -texture = ExtResource( 4 ) - -[node name="ProjectileSpawn" type="Position2D" parent="HoldPosition"] -position = Vector2( 17, -9.53674e-007 ) -rotation = 1.5708 - [node name="Sprite" type="Sprite" parent="."] position = Vector2( 0, -12 ) -texture = ExtResource( 5 ) +texture = ExtResource( 4 ) vframes = 3 hframes = 4 @@ -126,4 +113,10 @@ position = Vector2( 0, -7 ) [node name="CollisionPolygon2D" type="CollisionPolygon2D" parent="Hitbox"] visible = false polygon = PoolVector2Array( -6, -12, -6, -5, -7, -5, -7, -3, -6, -3, -6, 2, -5, 2, -5, 4, -6, 4, -6, 5, -7, 5, -7, 7, 5, 7, 5, 3, 6, 3, 6, -1, 5, -1, 5, -2, 6, -2, 6, -3, 7, -3, 7, -5, 6, -5, 6, -6, 5, -6, 5, -7, 4, -7, 4, -8, 3, -8, 3, -9, 1, -9, 1, -10, -3, -10, -3, -11, -4, -11, -4, -12, -6, -12 ) + +[node name="HoldPosition" type="Position2D" parent="."] +position = Vector2( 0, -7 ) + +[node name="Wand" parent="HoldPosition" instance=ExtResource( 5 )] +position = Vector2( 14, 0 ) [connection signal="grounded_updated" from="." to="Node2D" method="_on_grounded_updated"] diff --git a/magic/Wands/BasicWand.tscn b/magic/Wands/BasicWand.tscn new file mode 100644 index 0000000..74a592c --- /dev/null +++ b/magic/Wands/BasicWand.tscn @@ -0,0 +1,17 @@ +[gd_scene load_steps=3 format=2] + +[ext_resource path="res://art/Wand.png" type="Texture" id=1] +[ext_resource path="res://script/BasicWand.gd" type="Script" id=2] + +[node name="Wand" type="Sprite"] +position = Vector2( 7, 0 ) +rotation = 1.5708 +texture = ExtResource( 1 ) +script = ExtResource( 2 ) + +[node name="ProjectileSpawn" type="Position2D" parent="."] +position = Vector2( -6.11959e-007, -7 ) + +[node name="ShootDelay" type="Timer" parent="."] +wait_time = 0.4 +one_shot = true diff --git a/script/BasicWand.gd b/script/BasicWand.gd new file mode 100644 index 0000000..5cce76d --- /dev/null +++ b/script/BasicWand.gd @@ -0,0 +1,15 @@ +extends Sprite + +onready var ShootDelay : Timer = $ShootDelay +onready var ProjectileSpawn : Timer = $ProjectileSpawn + +export var projectile_ps = globals.WHITE_PROJECTILE_PS + +func fire_projectile(rot): + if ShootDelay.is_stopped(): + var temp = projectile_ps.instance() + get_tree().current_scene.add_child(temp) + temp.global_position = ProjectileSpawn.global_position + temp.rotation_degrees = rot + temp.launch() + ShootDelay.start() \ No newline at end of file diff --git a/script/player.gd b/script/player.gd index c6b3753..db6db09 100644 --- a/script/player.gd +++ b/script/player.gd @@ -15,7 +15,6 @@ var walljump_height = 2.25 * 16 var jump_duration = 0.35 var is_grounded var touching_wall = 0 -var projectile_ps = globals.WHITE_PROJECTILE_PS onready var Spr: Sprite = $Sprite onready var Occluder: LightOccluder2D = $Sprite/LightOccluder2D @@ -25,6 +24,7 @@ onready var ShootDelay: Timer = $ShootDelay onready var StateMachine: Node = $PlayerStateMachine onready var HoldPosition: Node2D = $HoldPosition onready var ProjectileSpawn: Node2D = $HoldPosition/ProjectileSpawn +onready var Wand: Sprite = $HoldPosition/Wand @@ -43,10 +43,9 @@ func handle_move_input(): input_direction = int(Input.is_action_pressed("right")) - int(Input.is_action_pressed("left")) velocity.x = lerp(velocity.x, speed * input_direction, get_movement_weight()) HoldPosition.look_at(get_global_mouse_position()) - HoldPosition.rotation_degrees - if Input.is_action_just_pressed("shoot"): - fire_projectile() + if Input.is_action_pressed("shoot"): + Wand.fire_projectile(HoldPosition.rotation_degrees) if input_direction > 0: Spr.flip_h = false @@ -60,14 +59,7 @@ func jump(): velocity.y = max_jump_velocity CoyoteTimer.stop() -func fire_projectile(): - if ShootDelay.is_stopped(): - var temp = projectile_ps.instance() - get_tree().current_scene.add_child(temp) - temp.global_position = ProjectileSpawn.global_position - temp.rotation_degrees = HoldPosition.rotation_degrees - temp.launch() - ShootDelay.start() + func apply_gravity(delta, modifier = 1): velocity.y += gravity * delta * modifier From 4e42e3eb2c04f2cede7772cfbc0b91e0bc593c1d Mon Sep 17 00:00:00 2001 From: Logan Date: Fri, 17 Jul 2020 19:18:59 -0500 Subject: [PATCH 2/3] UI works --- SUPPORTERS.md | 36 ------- VERSION.md | 175 ---------------------------------- art/Pedestal.png | Bin 331 -> 300 bytes art/chest.png | Bin 0 -> 588 bytes art/chest.png.import | 34 +++++++ characters/Player.tscn | 26 ++--- levels/test.tscn | 4 +- magic/Wands/BasicWand.tscn | 2 +- meta/BoundedCamera.tscn | 2 +- project.godot | 3 + script/BasicWand.gd | 5 +- script/Projectile.gd | 5 +- script/player camera.gd | 9 +- script/player.gd | 17 ++++ ui/Energy.aseprite | Bin 0 -> 587 bytes ui/Energy.png | Bin 0 -> 173 bytes ui/Energy.png.import | 34 +++++++ ui/Hearts.png | Bin 0 -> 239 bytes ui/Hearts.png.import | 34 +++++++ ui/Player UI Frame.png | Bin 0 -> 424 bytes ui/Player UI Frame.png.import | 34 +++++++ ui/PlayerStats.gd | 30 ++++++ ui/PlayerStats.tscn | 36 +++++++ 23 files changed, 252 insertions(+), 234 deletions(-) delete mode 100644 SUPPORTERS.md delete mode 100644 VERSION.md create mode 100644 art/chest.png create mode 100644 art/chest.png.import create mode 100644 ui/Energy.aseprite create mode 100644 ui/Energy.png create mode 100644 ui/Energy.png.import create mode 100644 ui/Hearts.png create mode 100644 ui/Hearts.png.import create mode 100644 ui/Player UI Frame.png create mode 100644 ui/Player UI Frame.png.import create mode 100644 ui/PlayerStats.gd create mode 100644 ui/PlayerStats.tscn diff --git a/SUPPORTERS.md b/SUPPORTERS.md deleted file mode 100644 index a08f573..0000000 --- a/SUPPORTERS.md +++ /dev/null @@ -1,36 +0,0 @@ -This is a list of people who decided to support my plugin with donations. Even though they are not explicitly requested, they would help me pay a part of my university fees and also encourage me to keep my projects updated and make new ones. -*A huge thank you to:* -- Russel aka [masterworm2](https://github.com/masterworm2) -- Autcru aka [autcru](https://github.com/autcru) -- Itch.io users (can't publish their name until their agreement) - - - - - - - - - - - - - - - - - - - - - - - - - - - ------------------ -> This text file was created via [TextEditor Integration](https://github.com/fenix-hub/godot-engine.text-editor) inside Godot Engine's Editor. - - diff --git a/VERSION.md b/VERSION.md deleted file mode 100644 index f0796b6..0000000 --- a/VERSION.md +++ /dev/null @@ -1,175 +0,0 @@ -**version 0.1.5** -*added* -+ Light code clean -+ Some Bugfix -+ Plugin output for debug of some of the operations -+ Automatic Filling of sign in fields -+ Multiple files commit and changes commit -+ Every text and image file format supported -+ Filtering in committing -+ Autoload branches content - -*removed* -+ Single file commit -+ Only text file commit - ----------------------- - -**version 0.2.5** -*added* -+ Code clean -+ Chose branch to commit -+ Delete resource selected in repository -+ Filters: Exceptions, Only, Start from - ----------------------- - -**version 0.2.7** -*added* -+ Code clean -+ Fix some little animations -+ New commit method: tree created from blobs, creates a single commit with more files - -*removed* -+ Old commit method - ----------------------- - -**version 0.2.9** -*added* -+ Code clean -+ Bugfix with commits -+ A marker next to "Sign-in" buttons appears if a logfile is found - ----------------------- - -**version 0.3.1** -*added* -+ Several bugfixes - --------------------- - -**version 0.3.2** -*added* -+ New folder organization (whole plugin in *addon* folder) -+ New install method (AssetLib from GodotEngine Editor) - --------------------- - -**version 0.6.0** -*removed* -- old position: - - the plugin doesn't appear in docs anymore. Instead, it will load a new tool in the top toolbar -- old layout: - - RepositoryList and GistList now show more informations about their contents -- old repository's content system: - - Repositories contents are now listed in a tree way -- old "commit to repository" system and FILTERS: - - The old system was based on a Filtering system: I introduced filters to help people choose which file to exclude from your commit, which files should negate an exclusion, and eventually from which path to start. This system was based on the conception that the whole commit started from the `res://` path. Now, you can select in a more interactive way all files and folders you want to commit, and exclude them with a .gitignore system. - -*added* -+ Informations about repositories: - + Repositories now have their own icons: *lock* for private, *fork* for forked repositories, *gray repo* for own public repositories - + Repositories show their forked times and stars -+ License templates: new repositories can now be created with a license template from all availables github supported licenses -+ Repository contents system: - + files are now displayed in a compact, more readable tree system. Files and folders are differentiated, and folders can be folded and unfolded to show their contents - + you can now delete multiple files just CTRL/SHIFT selecting them. **remember:** folders cannot be deleted by github integrity rules. Delete all folder's contents to delete the folder itself - + you can now create a new branch from all selectable branches in your repository -+ **!Repository committing system**: - + [filtering] - + Since FILTERS are not supported anymore, the usage of `.gitignore` is now implemented. - + a `.gitignore` file is loaded from the repository you want to commit to. If this repository doesn't have a gitignore, an empty and new gitignore can be created and committed. - + the "gitignore editor" is shown next to the "committing tree" so you can procedurally select files and folders, and exclude/include them with the gitignore. *if you don't know how to use a gitignore, I recommend you to click on the `?` button in the bottom-right of the gitignore editor* - + the "edit .gitignore" button will prevent any unwanted modifications to be applied by any chance (miss-typing, or you just don't need to edit the gitignore since it was loaded from the repository) - + [file choosing] - + Since FILTERS are not supported anymore, the commit process won't start from the project folder. - + Now you can select multiple files and directories you want to commit through a file dialog showing your whole project folder. - + Files and directories can always be removed before committing -**Please, note that the gitignore filtering method is custom made. To fully support the same gitignore method applied by GitHub some tests are needed** -+ **Gists** can now be opened, edited, and pushed with a cusotm GitEditor. Gists which contain more than one file are supported, and you can edit more files at the same time. - --------------------- - -**version 0.6.2** -*fixed* -- new method to show contents of repositories: faster code and works better. Empty repositories won't be loaded -- now each loading has a loading screen covering the whole scene: no more missclicks during a repository loading or a commit -- new icons in repositories to visually show what's the content type ( adapted to Godot Engine's file types) - --------------------- - -**version 0.7.0** -*added* -- **pull / clone button** : you can now pull from any branch of a selected repository. A local copy of your repository with files relative to the selected branch will be created in a .zip file inside your 'res://' folder. In this way you will be able to manage your repository's files in the way you prefer. Pulling/Cloning works on public, private and forked repositories. - --------------------- - -**version 0.7.2** -*added* -- **debug messages checkbox** : a new checkbox will appear on the top-left corner of the GUI. With this checkbox you can decide if you want to get debug messages from this plugin or not. You can enable/disable it in any plugin tab - -*fidex* -- **deleting repository's resources** : with the previous version a bug occured and it wasn't possible to delete resources within a repository. - - -------------------- - -**version 0.7.4** -*added* -- **auto extraction** : the plugin is now able to auto-extract downloaded archives automatically. _your OS needs python_ to run the extraction script since it is not currently built in Godot Engine. It is still a beta script, so it is highly recommended to use it inside empty projects and have some tests. You can always report issues and contact me for any bug. -- **sing up link** : if you don't have an account, or want to create a new one, you can click on the *'Don't have a GitHub account yet?'* button in the main tab of the plugin - - -------------------- - -**version 0.7.5** -*fixed* -- **minor bugs** - --------------------- - -**version 0.7.8** -*fixed* -- *[!] icon for log file* appeared even though there weren't log files already stored -- increased the number of repositories that will be listed. Default GitHub repository listing provides only 30 repositories at time. Now the limit is increased to 100. - -*added* -- user's datas are now stored in an **encrypted file**, and datas are shared on an upper level folder. Now you won't need to save the same datas for each 'github integration' plugin you install in your new projects, but all the projects you have and in which you use this plugin will always use the same log file. This log file will be stored at `/AppData/Roaming/Godot/github_integration/` -- the plugin now supports two different unzipping methods, one with a *Python script* and one with a *GDScript*. The second one is offered by an external plugin, which is the [gdunzip](https://github.com/jellehermsen/gdunzip) plugin developed by [jellehermsen](https://github.com/jellehermsen) (please, check it out!!). **NOTE:** If you've got Python installed on your PC, it is recommended using the Python one, since the GDScript one is not developed by me and may not work. In that case, please make an issue with specific informations about the problem you've encountered, and I'll make sure to discuss about it with the developer. - --------------------- - -**version 0.8.2** -*fixed* -- autoload errors with 3.2 beta versions (and so on) -- some interface bugs -- minor bugfixes - -*added* -- **new authentication method** : it is now possible to log into your GitHub profile with an *Access Token*. Since GitHub will deprecate the basic authentication method (which consists of `your e-mail : your password`) this plugin will **only work** with your personal access token. -Please, visit [this site](https://help.github.com/en/github/authenticating-to-github/creating-a-personal-access-token-for-the-command-line) to understand what a Personal Access Token is, and how to use it. You will also find this link as a button in the plugin. - --------------------- - -**version 0.8.4** -*fixed* -- plugin ui -- extraction methods - -*added* -- introduced a java extraction method for zip files. - -------------------- -**version 0.9.0** -*fixed* -- opening shared repositories - -*added* -- new repositories explorer -- search bar for repositories - ------------------ -> This text file was created via [TextEditor Integration](https://github.com/fenix-hub/godot-engine.text-editor) inside Godot Engine's Editor. - - - - diff --git a/art/Pedestal.png b/art/Pedestal.png index 841052a4c2e507c4fe697fb557b2664fd05b7d11..f196d341ab92cd780a02473694df7bd8e691453a 100644 GIT binary patch delta 260 zcmV+f0sH>T0;~d%Fn<8%Nklz0!m6s|M6+KckdpG9u$s}lG6W))7Rs* zF+Vd9#Sl0HruoLLdw31dP*XxNgc+vUJ2;!+_aD4^85kHC7~Z^n&mbCtjERuf0(K0000< KMNUMnLSTX%@pjDs delta 292 zcmV+<0o(qp0?PuBFn<9BNkl3_O7p3Sz5wgh2frOr*XArWIoIwMG!&k8AQ~mBgBo1)Y&MdR+6s1fobb_fxfHxX6AXm`2qf8{G4En6*_=( zt}sf$7%TdNS8d0aPFs=40l~|JYXwg(QzRvVJwL$LRm%bZvVV60%XW|*HeDe^&!mMo z3X!Jz?f{Uc9B~xNx=aJl4-iKoJU`G1Xb(xGV7r?u3%BC=0k*rjdV-5MD-vA@CPw~3 zqf#rLTWu{&nN5b+9}flq$VaR`JYq2&-Gvv^5k4-T>J=z;$HnSxjJ(MIgiXUl-Eo0+ qg6t%I3oN^N_ZPx%21!IgR7i=6M?Slp|0!U zzC5K!0RZFiIJ0MxC*R$U;M7*=hqKJ@G?X%D?U3Vc0DxMw0JgYzC*Y3fb_BwzVqX2? z?48J5z~`$a!aBqSj=KS>6!87aOHNw;P6942D;P}*5dbh6%z3lQj|Ou9zWz`dP7VMt zwIy#~|5-6q0%scYR4E{ErkL98P67gFirW#H0@ATA0HD@B0$^zSv_BpK@Tui-SYkB2*sc2um2qi+lIzs!-i6h-D)UhVAH*1{GpnCQAE88(Y|I9 zH8Hhil%1?MO~y@aN&hC1+gCsV^(sU+OR`B?QyGsA_#%GZS42_u>U!Yu_+RzPF2Ar( a8UFzKbYiM{k8=S40000AjD&xEuO9rG9p-Whcc}6KPT|*wx~NF^>agLLIP>vcddr z48ELi!;d#N+8hWkz@%=bs(_1rPcZ1%wPxLr#yK$ZUA6%9i$0s6Qjjy1~o zB8w@SI3kE0YIq@q5jwhyreT2s`Gk{9ESUt7MwC@gQkC$xP!O~9MrKAQl*7-9QI(D~ vE=8&IYcahO4Rq`|DaPU;cPEB*=VV?2Iq9A*jv*Gk z$q5cj_51h#{r~;bqpUN}uatmUx{qnfP<_v=u!`iQpOaCOWS6r60;@ENcNWsrH zX=_xEIlOQ;WSP(SLq|^IuS+X~p%}l|UmlRX>zAf}{XcE~(Ry9o)&EaSWid=x@bxgS mLgZtGi{~A-xmmqrXIOB>HrVH2-439m89ZJ6T-G@yGywoPx$Vo5|nR9J=WnLUn!FcgHx5l2`Bkpqx4RJ0r+C>Pk{ae-BGgl$u$AsiqGlsoJ; zYh(;IHe0-hvD9%-MpT+I-(|fRzCOSZywqUN?tZ z-NfpEwoII)!##{+U1c$#I7#uiU$H+Nt>gBGBOdqbOMkZo=sdS~AJS z97?@D7ht{zP}g;wFL5T5T+N}@Q!fD4ED!)-*hz5RK~R^sK1VJGJ@xa=Qe8zp2YCl1 zzbMN~Z*#fmx4$h$EB literal 0 HcmV?d00001 diff --git a/ui/Player UI Frame.png.import b/ui/Player UI Frame.png.import new file mode 100644 index 0000000..68e0190 --- /dev/null +++ b/ui/Player UI Frame.png.import @@ -0,0 +1,34 @@ +[remap] + +importer="texture" +type="StreamTexture" +path="res://.import/Player UI Frame.png-919983870fbb940a7a6c9c573e72660f.stex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://ui/Player UI Frame.png" +dest_files=[ "res://.import/Player UI Frame.png-919983870fbb940a7a6c9c573e72660f.stex" ] + +[params] + +compress/mode=0 +compress/lossy_quality=0.7 +compress/hdr_mode=0 +compress/bptc_ldr=0 +compress/normal_map=0 +flags/repeat=0 +flags/filter=false +flags/mipmaps=false +flags/anisotropic=false +flags/srgb=2 +process/fix_alpha_border=true +process/premult_alpha=false +process/HDR_as_SRGB=false +process/invert_color=false +stream=false +size_limit=0 +detect_3d=false +svg/scale=1.0 diff --git a/ui/PlayerStats.gd b/ui/PlayerStats.gd new file mode 100644 index 0000000..3dad944 --- /dev/null +++ b/ui/PlayerStats.gd @@ -0,0 +1,30 @@ +extends CanvasLayer + +onready var Hearts: TextureProgress = $"Player UI Frame/Hearts" +onready var Energybar: TextureProgress = $"Player UI Frame/Energy" +onready var Regen: Timer = $Regen + +var health = 3 setget set_health, get_health +var energy = 0 setget set_energy, get_energy + +func _on_Regen_timeout(): + set_energy(get_energy() + 1) + +func _process(delta): + if get_energy() < Energybar.max_value and Regen.is_stopped(): + Regen.start() + +func set_health(value): + Hearts.value = clamp(value, Hearts.min_value, Hearts.max_value) + +func get_health(): + return Hearts.value + +func set_energy(value): + Energybar.value = clamp(value, Energybar.min_value, Energybar.max_value) + +func get_energy(): + return Energybar.value + +func interrupt_regen(): + Regen.start() diff --git a/ui/PlayerStats.tscn b/ui/PlayerStats.tscn new file mode 100644 index 0000000..3e04d88 --- /dev/null +++ b/ui/PlayerStats.tscn @@ -0,0 +1,36 @@ +[gd_scene load_steps=5 format=2] + +[ext_resource path="res://ui/PlayerStats.gd" type="Script" id=1] +[ext_resource path="res://ui/Player UI Frame.png" type="Texture" id=2] +[ext_resource path="res://ui/Hearts.png" type="Texture" id=3] +[ext_resource path="res://ui/Energy.png" type="Texture" id=4] + +[node name="Stats" type="CanvasLayer"] +script = ExtResource( 1 ) + +[node name="Player UI Frame" type="Sprite" parent="."] +position = Vector2( 160, 171 ) +texture = ExtResource( 2 ) + +[node name="Hearts" type="TextureProgress" parent="Player UI Frame"] +margin_left = -45.0 +margin_top = -6.0 +margin_right = 2.0 +margin_bottom = 6.0 +max_value = 3.0 +step = 0.5 +value = 3.0 +texture_progress = ExtResource( 3 ) + +[node name="Energy" type="TextureProgress" parent="Player UI Frame"] +margin_left = 6.0 +margin_top = -5.0 +margin_right = 44.0 +margin_bottom = 4.0 +max_value = 5.0 +texture_progress = ExtResource( 4 ) + +[node name="Regen" type="Timer" parent="."] +wait_time = 0.5 +one_shot = true +[connection signal="timeout" from="Regen" to="." method="_on_Regen_timeout"] From 95140d071d385274e3ef82b8ad7fd19f394fe0bb Mon Sep 17 00:00:00 2001 From: Logan Date: Fri, 17 Jul 2020 19:30:27 -0500 Subject: [PATCH 3/3] a --- characters/Player.tscn | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/characters/Player.tscn b/characters/Player.tscn index fb04164..7a44776 100644 --- a/characters/Player.tscn +++ b/characters/Player.tscn @@ -4,8 +4,8 @@ [ext_resource path="res://ui/PlayerStats.tscn" type="PackedScene" id=2] [ext_resource path="res://meta/BoundedCamera.tscn" type="PackedScene" id=3] [ext_resource path="res://script/PlayerStateMachine.gd" type="Script" id=4] -[ext_resource path="res://art/WizardM.png" type="Texture" id=5] -[ext_resource path="res://magic/Wands/BasicWand.tscn" type="PackedScene" id=6] +[ext_resource path="res://magic/Wands/BasicWand.tscn" type="PackedScene" id=5] +[ext_resource path="res://art/WizardM.png" type="Texture" id=6] [sub_resource type="OccluderPolygon2D" id=1] polygon = PoolVector2Array( -7, 0, -7, -2, -6, -2, -6, -3, -5, -3, -5, -5, -6, -5, -6, -10, -7, -10, -7, -12, -6, -12, -6, -19, -4, -19, -4, -18, -3, -18, -3, -17, 1, -17, 1, -16, 3, -16, 3, -15, 4, -15, 4, -14, 5, -14, 5, -13, 6, -13, 6, -12, 7, -12, 7, -10, 6, -10, 6, -9, 5, -9, 5, -8, 6, -8, 6, -4, 5, -4, 5, 0, -7, 0 ) @@ -81,9 +81,15 @@ drag_margin_bottom = 0.0 [node name="PlayerStateMachine" type="Node" parent="."] script = ExtResource( 4 ) +[node name="HoldPosition" type="Position2D" parent="."] +position = Vector2( 0, -7 ) + +[node name="Wand" parent="HoldPosition" instance=ExtResource( 5 )] +position = Vector2( 14, 0 ) + [node name="Sprite" type="Sprite" parent="."] position = Vector2( 0, -12 ) -texture = ExtResource( 5 ) +texture = ExtResource( 6 ) vframes = 3 hframes = 4 @@ -117,10 +123,4 @@ position = Vector2( 0, -7 ) [node name="CollisionPolygon2D" type="CollisionPolygon2D" parent="Hitbox"] visible = false polygon = PoolVector2Array( -6, -12, -6, -5, -7, -5, -7, -3, -6, -3, -6, 2, -5, 2, -5, 4, -6, 4, -6, 5, -7, 5, -7, 7, 5, 7, 5, 3, 6, 3, 6, -1, 5, -1, 5, -2, 6, -2, 6, -3, 7, -3, 7, -5, 6, -5, 6, -6, 5, -6, 5, -7, 4, -7, 4, -8, 3, -8, 3, -9, 1, -9, 1, -10, -3, -10, -3, -11, -4, -11, -4, -12, -6, -12 ) - -[node name="HoldPosition" type="Position2D" parent="."] -position = Vector2( 0, -7 ) - -[node name="Wand" parent="HoldPosition" instance=ExtResource( 6 )] -position = Vector2( 15, 0 ) [connection signal="grounded_updated" from="." to="Camera" method="_on_grounded_updated"]