Basic Swinging Arm
This commit is contained in:
102
player.tscn
102
player.tscn
@@ -1,63 +1,65 @@
|
||||
[gd_scene load_steps=10 format=3 uid="uid://btlutggxxokno"]
|
||||
[gd_scene load_steps=7 format=3 uid="uid://btlutggxxokno"]
|
||||
|
||||
[ext_resource type="Script" path="res://player.gd" id="1_8jh48"]
|
||||
[ext_resource type="Texture2D" uid="uid://yfxicvvu3j1k" path="res://art/player/Player1.png" id="1_wikqw"]
|
||||
[ext_resource type="Texture2D" uid="uid://ctik1n8vyproe" path="res://art/player/Player2.png" id="2_31x2h"]
|
||||
[ext_resource type="Texture2D" uid="uid://c5jkrxnrk8s4y" path="res://art/player/Player3.png" id="3_xoeqj"]
|
||||
[ext_resource type="Texture2D" uid="uid://bxg6vu3byvcfa" path="res://art/player/Player4.png" id="4_08rsg"]
|
||||
[ext_resource type="Texture2D" uid="uid://dfia7yrc5ds2w" path="res://art/player/throw/PlayerThrow1.png" id="6_yjoir"]
|
||||
[ext_resource type="Texture2D" uid="uid://isrtm6ip2y5a" path="res://art/player/throw/PlayerThrow2.png" id="7_qb6xx"]
|
||||
|
||||
[sub_resource type="SpriteFrames" id="SpriteFrames_obpd0"]
|
||||
animations = [{
|
||||
"frames": [{
|
||||
"duration": 1.0,
|
||||
"texture": ExtResource("1_wikqw")
|
||||
}, {
|
||||
"duration": 1.0,
|
||||
"texture": ExtResource("2_31x2h")
|
||||
}, {
|
||||
"duration": 1.0,
|
||||
"texture": ExtResource("3_xoeqj")
|
||||
}, {
|
||||
"duration": 1.0,
|
||||
"texture": ExtResource("4_08rsg")
|
||||
}],
|
||||
"loop": true,
|
||||
"name": &"still",
|
||||
"speed": 5.0
|
||||
}, {
|
||||
"frames": [{
|
||||
"duration": 1.0,
|
||||
"texture": ExtResource("6_yjoir")
|
||||
}, {
|
||||
"duration": 1.0,
|
||||
"texture": ExtResource("7_qb6xx")
|
||||
}],
|
||||
"loop": true,
|
||||
"name": &"throw",
|
||||
"speed": 5.0
|
||||
}]
|
||||
[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"]
|
||||
|
||||
[sub_resource type="RectangleShape2D" id="RectangleShape2D_m60wa"]
|
||||
size = Vector2(27.5, 48)
|
||||
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
|
||||
script = ExtResource("1_8jh48")
|
||||
|
||||
[node name="PlayerSprite" type="AnimatedSprite2D" parent="."]
|
||||
[node name="CollisionShape2D" type="CollisionShape2D" parent="."]
|
||||
position = Vector2(-1, -24)
|
||||
shape = SubResource("RectangleShape2D_m60wa")
|
||||
|
||||
[node name="PlayerSprite" type="Sprite2D" parent="."]
|
||||
texture_filter = 1
|
||||
position = Vector2(0, -24)
|
||||
scale = Vector2(2, 2)
|
||||
sprite_frames = SubResource("SpriteFrames_obpd0")
|
||||
animation = &"throw"
|
||||
frame = 1
|
||||
frame_progress = 0.593015
|
||||
texture = ExtResource("2_2ok64")
|
||||
|
||||
[node name="FrisbeeLocation" type="Node2D" parent="PlayerSprite"]
|
||||
position = Vector2(-0.5, 2.5)
|
||||
[node name="PinJoint2D" type="PinJoint2D" parent="."]
|
||||
position = Vector2(6, -30)
|
||||
node_a = NodePath("..")
|
||||
node_b = NodePath("RightArmTop")
|
||||
bias = 0.9
|
||||
|
||||
[node name="CollisionShape2D" type="CollisionShape2D" parent="."]
|
||||
z_index = -1
|
||||
position = Vector2(0.25, -24)
|
||||
shape = SubResource("RectangleShape2D_m60wa")
|
||||
[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)
|
||||
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"]
|
||||
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")
|
||||
|
||||
Reference in New Issue
Block a user