Simple Arms
This commit is contained in:
BIN
art/player/armless/arm.png
Normal file
BIN
art/player/armless/arm.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 118 B |
@@ -2,16 +2,16 @@
|
||||
|
||||
importer="texture"
|
||||
type="CompressedTexture2D"
|
||||
uid="uid://cftm2rdoikqc2"
|
||||
path="res://.godot/imported/botarm.png-d0bb7a3fee372e1a424b5e575d1ee2cb.ctex"
|
||||
uid="uid://ccuscvhy2sr7q"
|
||||
path="res://.godot/imported/arm.png-5502921e18475ef8df73868d13ef4f5d.ctex"
|
||||
metadata={
|
||||
"vram_texture": false
|
||||
}
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://art/player/armless/botarm.png"
|
||||
dest_files=["res://.godot/imported/botarm.png-d0bb7a3fee372e1a424b5e575d1ee2cb.ctex"]
|
||||
source_file="res://art/player/armless/arm.png"
|
||||
dest_files=["res://.godot/imported/arm.png-5502921e18475ef8df73868d13ef4f5d.ctex"]
|
||||
|
||||
[params]
|
||||
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 111 B |
Binary file not shown.
|
Before Width: | Height: | Size: 97 B |
@@ -1,34 +0,0 @@
|
||||
[remap]
|
||||
|
||||
importer="texture"
|
||||
type="CompressedTexture2D"
|
||||
uid="uid://dmq4e1e1ty6x1"
|
||||
path="res://.godot/imported/toparm.png-b0003d5d8add1187865aff116dcc91c8.ctex"
|
||||
metadata={
|
||||
"vram_texture": false
|
||||
}
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://art/player/armless/toparm.png"
|
||||
dest_files=["res://.godot/imported/toparm.png-b0003d5d8add1187865aff116dcc91c8.ctex"]
|
||||
|
||||
[params]
|
||||
|
||||
compress/mode=0
|
||||
compress/high_quality=false
|
||||
compress/lossy_quality=0.7
|
||||
compress/hdr_compression=1
|
||||
compress/normal_map=0
|
||||
compress/channel_pack=0
|
||||
mipmaps/generate=false
|
||||
mipmaps/limit=-1
|
||||
roughness/mode=0
|
||||
roughness/src_normal=""
|
||||
process/fix_alpha_border=true
|
||||
process/premult_alpha=false
|
||||
process/normal_map_invert_y=false
|
||||
process/hdr_as_srgb=false
|
||||
process/hdr_clamp_exposure=false
|
||||
process/size_limit=0
|
||||
detect_3d/compress_to=1
|
||||
@@ -50,4 +50,9 @@ func _input(event):
|
||||
"flick_down"
|
||||
)
|
||||
|
||||
$PinJoint2D/RightJointElbow/RightArmBot.apply_impulse(flick*100)
|
||||
var flick_rot :float= 0
|
||||
if flick.length_squared() != 0:
|
||||
flick_rot = flick.angle() - PI/8*3
|
||||
|
||||
$LeftArm.rotation = flick_rot
|
||||
$RightArm.rotation = flick_rot
|
||||
|
||||
56
player.tscn
56
player.tscn
@@ -1,16 +1,12 @@
|
||||
[gd_scene load_steps=7 format=3 uid="uid://btlutggxxokno"]
|
||||
[gd_scene load_steps=5 format=3 uid="uid://btlutggxxokno"]
|
||||
|
||||
[ext_resource type="Script" path="res://player.gd" id="1_8jh48"]
|
||||
[ext_resource type="Texture2D" uid="uid://b5jsyliv8lppk" path="res://art/player/armless/PlayerArmless.png" id="2_2ok64"]
|
||||
[ext_resource type="Texture2D" uid="uid://dmq4e1e1ty6x1" path="res://art/player/armless/toparm.png" id="3_gbp6t"]
|
||||
[ext_resource type="Texture2D" uid="uid://cftm2rdoikqc2" path="res://art/player/armless/botarm.png" id="4_fekg0"]
|
||||
[ext_resource type="Texture2D" uid="uid://ccuscvhy2sr7q" path="res://art/player/armless/arm.png" id="2_xl6gi"]
|
||||
|
||||
[sub_resource type="RectangleShape2D" id="RectangleShape2D_m60wa"]
|
||||
size = Vector2(22, 48)
|
||||
|
||||
[sub_resource type="RectangleShape2D" id="RectangleShape2D_1uecq"]
|
||||
size = Vector2(6, 10)
|
||||
|
||||
[node name="Player" type="CharacterBody2D"]
|
||||
collision_layer = 2
|
||||
collision_mask = 2
|
||||
@@ -20,46 +16,26 @@ script = ExtResource("1_8jh48")
|
||||
position = Vector2(-1, -24)
|
||||
shape = SubResource("RectangleShape2D_m60wa")
|
||||
|
||||
[node name="RightArm" type="Node2D" parent="."]
|
||||
position = Vector2(6, -30)
|
||||
scale = Vector2(2, 2)
|
||||
|
||||
[node name="RightArmSprite" type="Sprite2D" parent="RightArm"]
|
||||
texture_filter = 1
|
||||
position = Vector2(0, 5)
|
||||
texture = ExtResource("2_xl6gi")
|
||||
|
||||
[node name="PlayerSprite" type="Sprite2D" parent="."]
|
||||
texture_filter = 1
|
||||
position = Vector2(0, -24)
|
||||
scale = Vector2(2, 2)
|
||||
texture = ExtResource("2_2ok64")
|
||||
|
||||
[node name="PinJoint2D" type="PinJoint2D" parent="."]
|
||||
position = Vector2(6, -30)
|
||||
node_a = NodePath("..")
|
||||
node_b = NodePath("RightArmTop")
|
||||
bias = 0.9
|
||||
|
||||
[node name="RightArmTop" type="RigidBody2D" parent="PinJoint2D"]
|
||||
position = Vector2(3, 4)
|
||||
|
||||
[node name="RightArmTopSp" type="Sprite2D" parent="PinJoint2D/RightArmTop"]
|
||||
texture_filter = 1
|
||||
position = Vector2(0, 1)
|
||||
[node name="LeftArm" type="Node2D" parent="."]
|
||||
position = Vector2(-6, -30)
|
||||
scale = Vector2(2, 2)
|
||||
texture = ExtResource("3_gbp6t")
|
||||
|
||||
[node name="RightArmTopCol" type="CollisionShape2D" parent="PinJoint2D/RightArmTop"]
|
||||
position = Vector2(0, 1)
|
||||
shape = SubResource("RectangleShape2D_1uecq")
|
||||
|
||||
[node name="RightJointElbow" type="PinJoint2D" parent="PinJoint2D"]
|
||||
position = Vector2(3, 7)
|
||||
node_a = NodePath("../RightArmTop")
|
||||
node_b = NodePath("RightArmBot")
|
||||
bias = 0.9
|
||||
|
||||
[node name="RightArmBot" type="RigidBody2D" parent="PinJoint2D/RightJointElbow"]
|
||||
position = Vector2(3, 4)
|
||||
|
||||
[node name="RightArmBotSp" type="Sprite2D" parent="PinJoint2D/RightJointElbow/RightArmBot"]
|
||||
[node name="LeftArmSprite" type="Sprite2D" parent="LeftArm"]
|
||||
texture_filter = 1
|
||||
position = Vector2(-3, 1)
|
||||
scale = Vector2(2, 2)
|
||||
texture = ExtResource("4_fekg0")
|
||||
|
||||
[node name="RightArmBotCol" type="CollisionShape2D" parent="PinJoint2D/RightJointElbow/RightArmBot"]
|
||||
position = Vector2(-3, 1)
|
||||
shape = SubResource("RectangleShape2D_1uecq")
|
||||
position = Vector2(0, 5)
|
||||
texture = ExtResource("2_xl6gi")
|
||||
|
||||
Reference in New Issue
Block a user