123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275 |
- [gd_scene load_steps=17 format=2]
- [ext_resource path="res://NPC/soldier/soldieranim.tscn" type="PackedScene" id=1]
- [ext_resource path="res://art/NPC/soldier/helmet.png" type="Texture" id=2]
- [ext_resource path="res://art/NPC/soldier/soldieremotions.png" type="Texture" id=3]
- [ext_resource path="res://font/8bit.tres" type="DynamicFont" id=4]
- [ext_resource path="res://font/yoster.ttf" type="DynamicFontData" id=5]
- [ext_resource path="res://art/NPC/soldier/soldiertest.png" type="Texture" id=6]
- [ext_resource path="res://art/NPC/soldier/head2.png" type="Texture" id=7]
- [sub_resource type="GDScript" id=28]
- script/source = "extends Node2D
- export var animation = 'idle'
- export var flip_h = false
- var die = false
- func _ready():
- for x in get_tree().get_nodes_in_group('client'):
- print( x.usernamelist)
- $username.text = x.usernamelist[int(name)]
- func _physics_process(delta):
- if die:
- $SoldierAnim/AnimationPlayer.play('die4')
- else:
- $SoldierAnim/AnimationPlayer.play(animation)
- $SoldierAnim.scale.x = -1 if flip_h else 1
- func shooting():
- $SoldierAnim/AnimationPlayer3.play(\"point\")
- # yield(get_tree().create_timer(0.4),\"timeout\")
- # $SoldierAnim/AnimationPlayer3.stop()
- func level_up_anim():
- $AnimationPlayer.play('leveup')
- func message(arg):
- $message.text = arg
- $AnimationPlayer3.play(\"msg\")
- func _die():
- print('die3')
- die = true
- # Called every frame. 'delta' is the elapsed time since the previous frame.
- #func _process(delta):
- # pass
- "
- [sub_resource type="Animation" id=29]
- resource_name = "leveup"
- length = 2.0
- tracks/0/type = "value"
- tracks/0/path = NodePath("Label/Label:rect_position")
- tracks/0/interp = 1
- tracks/0/loop_wrap = true
- tracks/0/imported = false
- tracks/0/enabled = true
- tracks/0/keys = {
- "times": PoolRealArray( 0, 2 ),
- "transitions": PoolRealArray( 1, 1 ),
- "update": 0,
- "values": [ Vector2( -29.5, -6 ), Vector2( -29.5, -67.1752 ) ]
- }
- tracks/1/type = "value"
- tracks/1/path = NodePath("Label/Label:rect_scale")
- tracks/1/interp = 1
- tracks/1/loop_wrap = true
- tracks/1/imported = false
- tracks/1/enabled = true
- tracks/1/keys = {
- "times": PoolRealArray( 0, 0.2, 1.3, 2 ),
- "transitions": PoolRealArray( 1, 1, 1, 1 ),
- "update": 0,
- "values": [ Vector2( 0, 3 ), Vector2( 1, 1 ), Vector2( 1, 1 ), Vector2( 3, 0 ) ]
- }
- tracks/2/type = "value"
- tracks/2/path = NodePath("Line2D:modulate")
- tracks/2/interp = 1
- tracks/2/loop_wrap = true
- tracks/2/imported = false
- tracks/2/enabled = true
- tracks/2/keys = {
- "times": PoolRealArray( 0, 0.2, 1.3, 2 ),
- "transitions": PoolRealArray( 1, 1, 1, 1 ),
- "update": 0,
- "values": [ Color( 1, 1, 1, 0 ), Color( 1, 1, 1, 1 ), Color( 1, 1, 1, 1 ), Color( 1, 1, 1, 0 ) ]
- }
- [sub_resource type="Animation" id=30]
- resource_name = "leveup"
- length = 0.2
- loop = true
- tracks/0/type = "value"
- tracks/0/path = NodePath("Label/Label:custom_colors/font_color")
- tracks/0/interp = 1
- tracks/0/loop_wrap = true
- tracks/0/imported = false
- tracks/0/enabled = true
- tracks/0/keys = {
- "times": PoolRealArray( 0, 0.1 ),
- "transitions": PoolRealArray( 1, 1 ),
- "update": 0,
- "values": [ Color( 1, 0.717647, 0.305882, 1 ), Color( 0.631373, 1, 1, 1 ) ]
- }
- tracks/1/type = "value"
- tracks/1/path = NodePath("Label/Label:custom_colors/font_outline_modulate")
- tracks/1/interp = 1
- tracks/1/loop_wrap = true
- tracks/1/imported = false
- tracks/1/enabled = true
- tracks/1/keys = {
- "times": PoolRealArray( 0, 0.1 ),
- "transitions": PoolRealArray( 1, 1 ),
- "update": 0,
- "values": [ Color( 1, 0.156863, 0.0470588, 1 ), Color( 0.0784314, 0.286275, 0.552941, 1 ) ]
- }
- [sub_resource type="Shader" id=31]
- code = "shader_type canvas_item;
- render_mode blend_mix;
- void vertex(){
- VERTEX.y += (sin(TIME*32f)* mix(VERTEX.x,1f,0.8));
- }"
- [sub_resource type="ShaderMaterial" id=32]
- shader = SubResource( 31 )
- [sub_resource type="Gradient" id=33]
- offsets = PoolRealArray( 0.510949, 1 )
- colors = PoolColorArray( 1, 1, 1, 0.411765, 1, 1, 1, 0 )
- [sub_resource type="DynamicFont" id=34]
- size = 12
- outline_size = 2
- font_data = ExtResource( 5 )
- [sub_resource type="Animation" id=35]
- length = 0.001
- tracks/0/type = "value"
- tracks/0/path = NodePath("message:visible")
- tracks/0/interp = 1
- tracks/0/loop_wrap = true
- tracks/0/imported = false
- tracks/0/enabled = true
- tracks/0/keys = {
- "times": PoolRealArray( 0 ),
- "transitions": PoolRealArray( 1 ),
- "update": 0,
- "values": [ true ]
- }
- tracks/1/type = "value"
- tracks/1/path = NodePath("message:rect_scale")
- tracks/1/interp = 1
- tracks/1/loop_wrap = true
- tracks/1/imported = false
- tracks/1/enabled = true
- tracks/1/keys = {
- "times": PoolRealArray( 0 ),
- "transitions": PoolRealArray( 1 ),
- "update": 0,
- "values": [ Vector2( 1e-05, 1e-05 ) ]
- }
- [sub_resource type="Animation" id=36]
- resource_name = "msg"
- length = 5.0
- tracks/0/type = "value"
- tracks/0/path = NodePath("message:visible")
- tracks/0/interp = 1
- tracks/0/loop_wrap = true
- tracks/0/imported = false
- tracks/0/enabled = true
- tracks/0/keys = {
- "times": PoolRealArray( 0, 5 ),
- "transitions": PoolRealArray( 1, 1 ),
- "update": 1,
- "values": [ true, false ]
- }
- tracks/1/type = "value"
- tracks/1/path = NodePath("message:rect_scale")
- tracks/1/interp = 2
- tracks/1/loop_wrap = true
- tracks/1/imported = false
- tracks/1/enabled = true
- tracks/1/keys = {
- "times": PoolRealArray( 0, 0.2, 0.4, 4.6, 4.8, 5 ),
- "transitions": PoolRealArray( 1, 1, 1, 1, 1, 1 ),
- "update": 0,
- "values": [ Vector2( 1e-05, 1e-05 ), Vector2( 1.25, 1.25 ), Vector2( 1.25, 1.25 ), Vector2( 1.25, 1.25 ), Vector2( 1.25, 1.25 ), Vector2( 1e-05, 1e-05 ) ]
- }
- [node name="playersprite" type="Node2D" groups=["playersprite"]]
- z_index = 999
- script = SubResource( 28 )
- [node name="AnimationPlayer" type="AnimationPlayer" parent="."]
- anims/leveup = SubResource( 29 )
- [node name="AnimationPlayer2" type="AnimationPlayer" parent="."]
- autoplay = "leveup"
- anims/leveup = SubResource( 30 )
- [node name="Line2D" type="Line2D" parent="."]
- modulate = Color( 1, 1, 1, 0 )
- material = SubResource( 32 )
- points = PoolVector2Array( 0, 25, -0.651, -65 )
- width = 32.0
- default_color = Color( 1, 1, 1, 1 )
- gradient = SubResource( 33 )
- [node name="Label" type="Node2D" parent="."]
- [node name="Label" type="Label" parent="Label"]
- anchor_left = 0.5
- anchor_top = 0.5
- anchor_right = 0.5
- anchor_bottom = 0.5
- margin_left = -29.5
- margin_top = -6.0
- margin_right = 29.5
- margin_bottom = 6.0
- rect_scale = Vector2( 1e-05, 3 )
- rect_pivot_offset = Vector2( 27.5174, 6.3988 )
- custom_colors/font_color = Color( 1, 0.717647, 0.305882, 1 )
- custom_colors/font_outline_modulate = Color( 1, 0.156863, 0.0470588, 1 )
- custom_fonts/font = SubResource( 34 )
- text = "Level Up"
- align = 1
- valign = 1
- [node name="message" type="Label" parent="."]
- margin_left = -50.0
- margin_top = -131.839
- margin_right = 50.0
- margin_bottom = -71.839
- rect_scale = Vector2( 1e-05, 1e-05 )
- rect_pivot_offset = Vector2( 50, 0 )
- custom_fonts/font = ExtResource( 4 )
- align = 1
- valign = 1
- autowrap = true
- clip_text = true
- [node name="ColorRect" type="ColorRect" parent="message"]
- show_behind_parent = true
- anchor_right = 1.0
- anchor_bottom = 1.0
- color = Color( 0, 0, 0, 0.333333 )
- [node name="AnimationPlayer3" type="AnimationPlayer" parent="."]
- anims/RESET = SubResource( 35 )
- anims/msg = SubResource( 36 )
- [node name="SoldierAnim" parent="." instance=ExtResource( 1 )]
- position = Vector2( 0, -21 )
- z_index = 4
- text = null
- text1 = ExtResource( 6 )
- text2 = ExtResource( 7 )
- text3 = ExtResource( 3 )
- text4 = ExtResource( 2 )
- [node name="username" type="Label" parent="."]
- anchor_right = 1.0
- margin_left = -316.031
- margin_top = -46.0209
- margin_right = 323.969
- margin_bottom = -32.0209
- custom_fonts/font = ExtResource( 4 )
- align = 1
- valign = 1
|