mirror of
https://github.com/kristoferssolo/FuncIt.git
synced 2025-10-21 19:30:35 +00:00
Merge branch 'singleplayer_goal_implementation'
This commit is contained in:
commit
cd6cb9f512
87
source/assets/scripts/ts_bot_handlers/ts_bot_handlergd.gd
Normal file
87
source/assets/scripts/ts_bot_handlers/ts_bot_handlergd.gd
Normal file
@ -0,0 +1,87 @@
|
||||
extends KinematicBody2D
|
||||
|
||||
const GRAVITY = 5
|
||||
|
||||
var liftSpeed = 0
|
||||
var accelerationSpeed = 2
|
||||
var deccelerationSpeed = 20
|
||||
var maxSpeed = 250
|
||||
|
||||
var worldSpace2d = null
|
||||
var coreRay = {}
|
||||
|
||||
var desiredLocation = Vector2(0,0)
|
||||
var movementVector = Vector2(0,0)
|
||||
var weightVector = Vector2(0,0)
|
||||
var interactionRays = []
|
||||
var degreeTracker
|
||||
|
||||
var startVector = Vector2(0,5)
|
||||
var startPosition = Vector2(0,5)
|
||||
var maxRay = 65
|
||||
var interactionRay = null
|
||||
|
||||
var degreeStep = 60
|
||||
var fireRate = 12
|
||||
var time = 0
|
||||
var rotationAmount = 0
|
||||
var rand_generate = RandomNumberGenerator.new()
|
||||
|
||||
var timer = 15
|
||||
|
||||
export(int, "Passive", "Friendly", "Agressive") var Mode
|
||||
|
||||
func _ready():
|
||||
desiredLocation = position
|
||||
startVector += global_position
|
||||
pass
|
||||
|
||||
func _physics_process(delta):
|
||||
time += delta
|
||||
timer += delta
|
||||
rand_generate.randomize()
|
||||
get_interaction()
|
||||
if interactionRays[0]["interacted"]:
|
||||
if liftSpeed > 0: liftSpeed = move_toward(liftSpeed, 0, deccelerationSpeed)
|
||||
elif position.y - desiredLocation.y > 1:
|
||||
liftSpeed -= accelerationSpeed
|
||||
elif position.y - desiredLocation.y < -1:
|
||||
liftSpeed += GRAVITY
|
||||
for ray in interactionRays:
|
||||
if ray["interacted"]:
|
||||
liftSpeed += -ray["end"].normalized().y * maxSpeed
|
||||
liftSpeed = clamp(liftSpeed, -maxSpeed, maxSpeed)
|
||||
move_and_slide(Vector2(0,liftSpeed))
|
||||
if Mode == 0:
|
||||
$ts_bot_sprite.play("passive_idle")
|
||||
$TsBotSpriteWeaponOn.hide()
|
||||
$TsBotSpriteWeaponOff.hide()
|
||||
elif Mode == 1:
|
||||
$ts_bot_sprite.play("friendly_idle")
|
||||
$TsBotSpriteWeaponOn.hide()
|
||||
$TsBotSpriteWeaponOff.show()
|
||||
elif Mode == 2:
|
||||
if fireRate < 20: fireRate = 5*fireRate
|
||||
$ts_bot_sprite.play("agressive_idle")
|
||||
$TsBotSpriteWeaponOn.show()
|
||||
$TsBotSpriteWeaponOff.hide()
|
||||
if time > 60 / fireRate and Mode >= 1:
|
||||
rotationAmount = rand_generate.randi_range(1,36)
|
||||
$TsBotSpriteWeaponOff.rotation = 360/rotationAmount
|
||||
$TsBotSpriteWeaponOn.rotation = 360/rotationAmount
|
||||
time = 0
|
||||
|
||||
func get_interaction():
|
||||
degreeTracker = 0
|
||||
interactionRays = []
|
||||
worldSpace2d = get_world_2d().direct_space_state
|
||||
while degreeTracker < 360 + degreeStep:
|
||||
interactionRay = worldSpace2d.intersect_ray(startVector, Vector2(0,maxRay).rotated(deg2rad(degreeTracker)) + global_position, [self])
|
||||
var interacted = false
|
||||
if "position" in interactionRay and interactionRay["collider"].is_in_group("Player"):
|
||||
interacted = true
|
||||
if timer > 15:
|
||||
Mode += 1
|
||||
timer = 0
|
||||
interactionRays.append({"start": startVector, "end": Vector2(0,maxRay).rotated(deg2rad(degreeTracker)) + global_position, "degrees": degreeTracker,"ray": interactionRay, "interacted": interacted})
|
||||
degreeTracker += degreeStep
|
||||
File diff suppressed because one or more lines are too long
|
After Width: | Height: | Size: 6.3 KiB |
File diff suppressed because one or more lines are too long
|
After Width: | Height: | Size: 6.3 KiB |
File diff suppressed because one or more lines are too long
|
After Width: | Height: | Size: 6.3 KiB |
@ -0,0 +1,39 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="43" height="133" viewBox="0 0 43 133">
|
||||
<defs>
|
||||
<clipPath id="clip-TS_bot_sprite_weapon_off">
|
||||
<rect width="43" height="133"/>
|
||||
</clipPath>
|
||||
</defs>
|
||||
<g id="TS_bot_sprite_weapon_off" clip-path="url(#clip-TS_bot_sprite_weapon_off)">
|
||||
<g id="Group_2" data-name="Group 2" transform="translate(0 44.999)">
|
||||
<path id="Path_17" data-name="Path 17" d="M.9-.224,13.742,58.309" transform="translate(0.5 21.5)" fill="none" stroke="#707070" stroke-width="2"/>
|
||||
<line id="Line_2" data-name="Line 2" y1="58" x2="14" transform="translate(27.5 21.5)" fill="none" stroke="#707070" stroke-width="2"/>
|
||||
<path id="Path_18" data-name="Path 18" d="M0,0,5.233,8.111" transform="translate(29.5 41.5)" fill="none" stroke="#707070" stroke-width="2"/>
|
||||
<path id="Path_16" data-name="Path 16" d="M6,0,.369,8.62v2.255" transform="translate(7.5 40.5)" fill="none" stroke="#707070" stroke-width="2"/>
|
||||
<g id="Subtraction_3" data-name="Subtraction 3" transform="translate(440)" fill="#e5e5e5">
|
||||
<path d="M -412.0003051757812 87.00071716308594 L -412.2888488769531 87.00057983398438 C -413.1568603515625 84.05756378173828 -415.8560485839844 81.99980163574219 -418.99951171875 81.99980163574219 C -422.1430358886719 81.99980163574219 -424.8424987792969 84.05752563476562 -425.7108764648438 87.00019836425781 L -425.9996032714844 87.00019836425781 L -425.9996032714844 41.25419998168945 L -425.9996032714844 40.59622192382812 L -426.6038818359375 40.33583450317383 C -434.1343078613281 37.09091567993164 -439.0001220703125 29.69744682312012 -439.0001220703125 21.5001049041748 C -439.0001220703125 16.02424621582031 -436.86767578125 10.87616348266602 -432.99560546875 7.004187107086182 C -429.1236267089844 3.132328271865845 -423.9756469726562 0.999998927116394 -418.5 0.999998927116394 C -413.0243530273438 0.999998927116394 -407.8764038085938 3.132328271865845 -404.0044250488281 7.004187107086182 C -400.1323547363281 10.87617492675781 -397.9999084472656 16.02425765991211 -397.9999084472656 21.5001049041748 C -397.9999084472656 25.76485824584961 -399.2969055175781 29.85295104980469 -401.7507019042969 33.32243347167969 C -404.1514282226562 36.71688079833984 -407.4705505371094 39.27438735961914 -411.3492126464844 40.71844482421875 L -412.0003051757812 40.96084594726562 L -412.0003051757812 41.65559768676758 L -412.0003051757812 87.00071716308594 Z" stroke="none"/>
|
||||
<path d="M -424.9996032714844 83.69438171386719 C -423.5262145996094 82.02700805664062 -421.3735961914062 80.99980163574219 -418.99951171875 80.99980163574219 C -416.6255798339844 80.99980163574219 -414.4735107421875 82.02663421630859 -413.0003051757812 83.69404602050781 L -413.0003051757812 40.26609039306641 L -411.6981201171875 39.78128051757812 C -408.0086975097656 38.40770721435547 -404.8512573242188 35.9745979309082 -402.567138671875 32.74499893188477 C -400.2334289550781 29.44529151916504 -398.9999084472656 25.5568790435791 -398.9999084472656 21.5001049041748 C -398.9999084472656 16.29135894775391 -401.0283203125 11.39439868927002 -404.7115173339844 7.711305618286133 C -408.3946533203125 4.028318881988525 -413.2914733886719 1.999998927116394 -418.5 1.999998927116394 C -423.7085571289062 1.999998927116394 -428.6053771972656 4.028318881988525 -432.2884826660156 7.711292266845703 C -435.9716796875 11.39439868927002 -438.0001220703125 16.29135894775391 -438.0001220703125 21.5001049041748 C -438.0001220703125 29.29773139953613 -433.3714904785156 36.33071899414062 -426.2081298828125 39.41746520996094 L -424.9996032714844 39.93824005126953 L -424.9996032714844 83.69438171386719 M -411.0003051757812 88.00119781494141 L -413.0830383300781 88.00019836425781 C -413.5689086914062 85.10242462158203 -416.0567321777344 82.99980163574219 -418.99951171875 82.99980163574219 C -421.9422912597656 82.99980163574219 -424.4308776855469 85.10277557373047 -424.9168701171875 88.00019836425781 L -426.9996032714844 88.00019836425781 L -426.9996032714844 41.25419998168945 C -434.8968811035156 37.85120010375977 -440.0001220703125 30.09690475463867 -440.0001220703125 21.5001049041748 C -440.0001220703125 15.75711917877197 -437.7636413574219 10.35790538787842 -433.7026977539062 6.297065734863281 C -429.641845703125 2.236345529556274 -424.2427368164062 -1.092529259949515e-06 -418.5 -1.092529259949515e-06 C -412.7572631835938 -1.092529259949515e-06 -407.3581848144531 2.236345529556274 -403.2973327636719 6.297065734863281 C -399.2363891601562 10.35790538787842 -396.9999084472656 15.75711917877197 -396.9999084472656 21.5001049041748 C -396.9999084472656 25.97281265258789 -398.3603820800781 30.26057243347168 -400.9342651367188 33.89985275268555 C -403.4515991210938 37.45919799804688 -406.932373046875 40.14109039306641 -411.0003051757812 41.65559768676758 L -411.0003051757812 88.00119781494141 Z" stroke="none" fill="#dedede"/>
|
||||
</g>
|
||||
<g id="Ellipse_21" data-name="Ellipse 21" transform="translate(19 35)" fill="#b2b2b2" stroke="#dedede" stroke-width="1">
|
||||
<circle cx="2" cy="2" r="2" stroke="none"/>
|
||||
<circle cx="2" cy="2" r="1.5" fill="none"/>
|
||||
</g>
|
||||
<g id="Ellipse_22" data-name="Ellipse 22" transform="translate(10 6)" fill="#dedede" stroke="#e8e8e8" stroke-width="5">
|
||||
<circle cx="11" cy="11" r="11" stroke="none"/>
|
||||
<circle cx="11" cy="11" r="8.5" fill="none"/>
|
||||
</g>
|
||||
<g id="Rectangle_6" data-name="Rectangle 6" transform="translate(20 42)" fill="#dedede" stroke="#e8e8e8" stroke-width="1">
|
||||
<rect width="2" height="12" stroke="none"/>
|
||||
<rect x="-0.5" y="-0.5" width="3" height="13" fill="none"/>
|
||||
</g>
|
||||
<g id="Rectangle_7" data-name="Rectangle 7" transform="translate(20 56)" fill="#dedede" stroke="#e8e8e8" stroke-width="1">
|
||||
<rect width="2" height="10" stroke="none"/>
|
||||
<rect x="-0.5" y="-0.5" width="3" height="11" fill="none"/>
|
||||
</g>
|
||||
<g id="Rectangle_8" data-name="Rectangle 8" transform="translate(20 70)" fill="#dedede" stroke="#e8e8e8" stroke-width="1">
|
||||
<rect width="2" height="8" stroke="none"/>
|
||||
<rect x="-0.5" y="-0.5" width="3" height="9" fill="none"/>
|
||||
</g>
|
||||
</g>
|
||||
</g>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 6.1 KiB |
@ -0,0 +1,39 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="43" height="133" viewBox="0 0 43 133">
|
||||
<defs>
|
||||
<clipPath id="clip-TS_bot_sprite_weapon_on">
|
||||
<rect width="43" height="133"/>
|
||||
</clipPath>
|
||||
</defs>
|
||||
<g id="TS_bot_sprite_weapon_on" clip-path="url(#clip-TS_bot_sprite_weapon_on)">
|
||||
<g id="Group_3" data-name="Group 3" transform="translate(0 44.999)">
|
||||
<path id="Path_17" data-name="Path 17" d="M.9-.224,13.742,58.309" transform="translate(0.5 21.5)" fill="none" stroke="#707070" stroke-width="2"/>
|
||||
<line id="Line_2" data-name="Line 2" y1="58" x2="14" transform="translate(27.5 21.5)" fill="none" stroke="#707070" stroke-width="2"/>
|
||||
<path id="Path_18" data-name="Path 18" d="M0,0,5.233,8.111" transform="translate(29.5 41.5)" fill="none" stroke="#707070" stroke-width="2"/>
|
||||
<path id="Path_16" data-name="Path 16" d="M6,0,.369,8.62v2.255" transform="translate(7.5 40.5)" fill="none" stroke="#707070" stroke-width="2"/>
|
||||
<g id="Subtraction_3" data-name="Subtraction 3" transform="translate(440)" fill="#e5e5e5">
|
||||
<path d="M -412.0003051757812 87.00071716308594 L -412.2888488769531 87.00057983398438 C -413.1568603515625 84.05756378173828 -415.8560485839844 81.99980163574219 -418.99951171875 81.99980163574219 C -422.1430358886719 81.99980163574219 -424.8424987792969 84.05752563476562 -425.7108764648438 87.00019836425781 L -425.9996032714844 87.00019836425781 L -425.9996032714844 41.25419998168945 L -425.9996032714844 40.59622192382812 L -426.6038818359375 40.33583450317383 C -434.1343078613281 37.09091567993164 -439.0001220703125 29.69744682312012 -439.0001220703125 21.5001049041748 C -439.0001220703125 16.02424621582031 -436.86767578125 10.87616348266602 -432.99560546875 7.004187107086182 C -429.1236267089844 3.132328271865845 -423.9756469726562 0.999998927116394 -418.5 0.999998927116394 C -413.0243530273438 0.999998927116394 -407.8764038085938 3.132328271865845 -404.0044250488281 7.004187107086182 C -400.1323547363281 10.87617492675781 -397.9999084472656 16.02425765991211 -397.9999084472656 21.5001049041748 C -397.9999084472656 25.76485824584961 -399.2969055175781 29.85295104980469 -401.7507019042969 33.32243347167969 C -404.1514282226562 36.71688079833984 -407.4705505371094 39.27438735961914 -411.3492126464844 40.71844482421875 L -412.0003051757812 40.96084594726562 L -412.0003051757812 41.65559768676758 L -412.0003051757812 87.00071716308594 Z" stroke="none"/>
|
||||
<path d="M -424.9996032714844 83.69438171386719 C -423.5262145996094 82.02700805664062 -421.3735961914062 80.99980163574219 -418.99951171875 80.99980163574219 C -416.6255798339844 80.99980163574219 -414.4735107421875 82.02663421630859 -413.0003051757812 83.69404602050781 L -413.0003051757812 40.26609039306641 L -411.6981201171875 39.78128051757812 C -408.0086975097656 38.40770721435547 -404.8512573242188 35.9745979309082 -402.567138671875 32.74499893188477 C -400.2334289550781 29.44529151916504 -398.9999084472656 25.5568790435791 -398.9999084472656 21.5001049041748 C -398.9999084472656 16.29135894775391 -401.0283203125 11.39439868927002 -404.7115173339844 7.711305618286133 C -408.3946533203125 4.028318881988525 -413.2914733886719 1.999998927116394 -418.5 1.999998927116394 C -423.7085571289062 1.999998927116394 -428.6053771972656 4.028318881988525 -432.2884826660156 7.711292266845703 C -435.9716796875 11.39439868927002 -438.0001220703125 16.29135894775391 -438.0001220703125 21.5001049041748 C -438.0001220703125 29.29773139953613 -433.3714904785156 36.33071899414062 -426.2081298828125 39.41746520996094 L -424.9996032714844 39.93824005126953 L -424.9996032714844 83.69438171386719 M -411.0003051757812 88.00119781494141 L -413.0830383300781 88.00019836425781 C -413.5689086914062 85.10242462158203 -416.0567321777344 82.99980163574219 -418.99951171875 82.99980163574219 C -421.9422912597656 82.99980163574219 -424.4308776855469 85.10277557373047 -424.9168701171875 88.00019836425781 L -426.9996032714844 88.00019836425781 L -426.9996032714844 41.25419998168945 C -434.8968811035156 37.85120010375977 -440.0001220703125 30.09690475463867 -440.0001220703125 21.5001049041748 C -440.0001220703125 15.75711917877197 -437.7636413574219 10.35790538787842 -433.7026977539062 6.297065734863281 C -429.641845703125 2.236345529556274 -424.2427368164062 -1.092529259949515e-06 -418.5 -1.092529259949515e-06 C -412.7572631835938 -1.092529259949515e-06 -407.3581848144531 2.236345529556274 -403.2973327636719 6.297065734863281 C -399.2363891601562 10.35790538787842 -396.9999084472656 15.75711917877197 -396.9999084472656 21.5001049041748 C -396.9999084472656 25.97281265258789 -398.3603820800781 30.26057243347168 -400.9342651367188 33.89985275268555 C -403.4515991210938 37.45919799804688 -406.932373046875 40.14109039306641 -411.0003051757812 41.65559768676758 L -411.0003051757812 88.00119781494141 Z" stroke="none" fill="#dedede"/>
|
||||
</g>
|
||||
<g id="Path_19" data-name="Path 19" transform="translate(19 35)" fill="#60ff9f">
|
||||
<path d="M 2 3.5 C 1.172899961471558 3.5 0.5 2.827100038528442 0.5 2 C 0.5 1.172899961471558 1.172899961471558 0.5 2 0.5 C 2.827100038528442 0.5 3.5 1.172899961471558 3.5 2 C 3.5 2.827100038528442 2.827100038528442 3.5 2 3.5 Z" stroke="none"/>
|
||||
<path d="M 2 1 C 1.448600053787231 1 1 1.448600053787231 1 2 C 1 2.551399946212769 1.448600053787231 3 2 3 C 2.551399946212769 3 3 2.551399946212769 3 2 C 3 1.448600053787231 2.551399946212769 1 2 1 M 2 0 C 3.104569911956787 0 4 0.8954300880432129 4 2 C 4 3.104569911956787 3.104569911956787 4 2 4 C 0.8954300880432129 4 0 3.104569911956787 0 2 C 0 0.8954300880432129 0.8954300880432129 0 2 0 Z" stroke="none" fill="#dedede"/>
|
||||
</g>
|
||||
<g id="Ellipse_22" data-name="Ellipse 22" transform="translate(10 6)" fill="#dedede" stroke="#e8e8e8" stroke-width="5">
|
||||
<circle cx="11" cy="11" r="11" stroke="none"/>
|
||||
<circle cx="11" cy="11" r="8.5" fill="none"/>
|
||||
</g>
|
||||
<g id="Rectangle_6" data-name="Rectangle 6" transform="translate(20 42)" fill="#dedede" stroke="#e8e8e8" stroke-width="1">
|
||||
<rect width="2" height="12" stroke="none"/>
|
||||
<rect x="-0.5" y="-0.5" width="3" height="13" fill="none"/>
|
||||
</g>
|
||||
<g id="Rectangle_7" data-name="Rectangle 7" transform="translate(20 56)" fill="#dedede" stroke="#e8e8e8" stroke-width="1">
|
||||
<rect width="2" height="10" stroke="none"/>
|
||||
<rect x="-0.5" y="-0.5" width="3" height="11" fill="none"/>
|
||||
</g>
|
||||
<g id="Rectangle_8" data-name="Rectangle 8" transform="translate(20 70)" fill="#dedede" stroke="#e8e8e8" stroke-width="1">
|
||||
<rect width="2" height="8" stroke="none"/>
|
||||
<rect x="-0.5" y="-0.5" width="3" height="9" fill="none"/>
|
||||
</g>
|
||||
</g>
|
||||
</g>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 6.6 KiB |
@ -49,16 +49,16 @@ animations = [ {
|
||||
"name": "idle",
|
||||
"speed": 12.0
|
||||
}, {
|
||||
"frames": [ ExtResource( 38 ), ExtResource( 35 ), ExtResource( 41 ), ExtResource( 37 ), ExtResource( 19 ), ExtResource( 18 ), ExtResource( 40 ) ],
|
||||
"loop": false,
|
||||
"name": "transition_up",
|
||||
"speed": 24.0
|
||||
}, {
|
||||
"frames": [ ExtResource( 30 ), ExtResource( 42 ), ExtResource( 16 ), ExtResource( 29 ), ExtResource( 25 ), ExtResource( 31 ), ExtResource( 21 ), ExtResource( 32 ), ExtResource( 39 ), ExtResource( 20 ), ExtResource( 22 ), ExtResource( 23 ), ExtResource( 33 ) ],
|
||||
"loop": true,
|
||||
"name": "idle_down",
|
||||
"speed": 12.0
|
||||
}, {
|
||||
"frames": [ ExtResource( 38 ), ExtResource( 35 ), ExtResource( 41 ), ExtResource( 37 ), ExtResource( 19 ), ExtResource( 18 ), ExtResource( 40 ) ],
|
||||
"loop": false,
|
||||
"name": "transition_up",
|
||||
"speed": 24.0
|
||||
}, {
|
||||
"frames": [ ExtResource( 17 ), ExtResource( 34 ), ExtResource( 28 ), ExtResource( 26 ), ExtResource( 24 ), ExtResource( 27 ), ExtResource( 36 ) ],
|
||||
"loop": false,
|
||||
"name": "transition_down",
|
||||
@ -76,7 +76,7 @@ position = Vector2( -3.36365, 0 )
|
||||
scale = Vector2( 0.75, 0.75 )
|
||||
frames = SubResource( 1 )
|
||||
animation = "idle"
|
||||
frame = 7
|
||||
frame = 12
|
||||
playing = true
|
||||
|
||||
[node name="trinity_site_level_layout-level_design_z-index_0_grass_type-2" type="Sprite" parent="."]
|
||||
|
||||
@ -171,7 +171,7 @@
|
||||
|
||||
[sub_resource type="SpriteFrames" id=1]
|
||||
animations = [ {
|
||||
"frames": [ ExtResource( 48 ), ExtResource( 4 ), ExtResource( 3 ), ExtResource( 46 ), ExtResource( 47 ), ExtResource( 32 ), ExtResource( 13 ), ExtResource( 40 ), ExtResource( 6 ), ExtResource( 15 ), ExtResource( 22 ), ExtResource( 14 ), ExtResource( 9 ), ExtResource( 37 ), ExtResource( 23 ), ExtResource( 39 ), ExtResource( 20 ), ExtResource( 18 ), ExtResource( 7 ), ExtResource( 34 ) ],
|
||||
"frames": [ ExtResource( 99 ), ExtResource( 83 ), ExtResource( 109 ), ExtResource( 111 ), ExtResource( 101 ), ExtResource( 96 ), ExtResource( 79 ), ExtResource( 132 ), ExtResource( 119 ), ExtResource( 80 ), ExtResource( 85 ), ExtResource( 86 ), ExtResource( 87 ), ExtResource( 106 ), ExtResource( 121 ), ExtResource( 129 ), ExtResource( 100 ), ExtResource( 108 ), ExtResource( 110 ), ExtResource( 120 ) ],
|
||||
"loop": true,
|
||||
"name": "move-speed-left-01",
|
||||
"speed": 35.0
|
||||
@ -198,7 +198,7 @@ animations = [ {
|
||||
}, {
|
||||
"frames": [ ExtResource( 99 ), ExtResource( 83 ), ExtResource( 109 ), ExtResource( 111 ), ExtResource( 101 ), ExtResource( 96 ), ExtResource( 79 ), ExtResource( 132 ), ExtResource( 119 ), ExtResource( 80 ), ExtResource( 85 ), ExtResource( 86 ), ExtResource( 87 ), ExtResource( 106 ), ExtResource( 121 ), ExtResource( 129 ), ExtResource( 100 ), ExtResource( 108 ), ExtResource( 110 ), ExtResource( 120 ) ],
|
||||
"loop": true,
|
||||
"name": "idle-speed-right-04",
|
||||
"name": "idle-speed-left-01",
|
||||
"speed": 25.0
|
||||
}, {
|
||||
"frames": [ ExtResource( 99 ), ExtResource( 83 ), ExtResource( 109 ), ExtResource( 111 ), ExtResource( 101 ), ExtResource( 96 ), ExtResource( 79 ), ExtResource( 132 ), ExtResource( 119 ), ExtResource( 80 ), ExtResource( 85 ), ExtResource( 86 ), ExtResource( 87 ), ExtResource( 106 ), ExtResource( 121 ), ExtResource( 129 ), ExtResource( 100 ), ExtResource( 108 ), ExtResource( 110 ), ExtResource( 120 ) ],
|
||||
@ -250,6 +250,26 @@ animations = [ {
|
||||
"loop": true,
|
||||
"name": "move-speed-left-03",
|
||||
"speed": 35.0
|
||||
}, {
|
||||
"frames": [ ExtResource( 48 ), ExtResource( 4 ), ExtResource( 3 ), ExtResource( 46 ), ExtResource( 47 ), ExtResource( 32 ), ExtResource( 13 ), ExtResource( 40 ), ExtResource( 6 ), ExtResource( 15 ), ExtResource( 22 ), ExtResource( 14 ), ExtResource( 9 ), ExtResource( 37 ), ExtResource( 23 ), ExtResource( 39 ), ExtResource( 20 ), ExtResource( 18 ), ExtResource( 7 ), ExtResource( 34 ) ],
|
||||
"loop": true,
|
||||
"name": "boost-speed-left-01",
|
||||
"speed": 50.0
|
||||
}, {
|
||||
"frames": [ ExtResource( 114 ), ExtResource( 128 ), ExtResource( 93 ), ExtResource( 107 ), ExtResource( 117 ), ExtResource( 102 ), ExtResource( 81 ), ExtResource( 118 ), ExtResource( 76 ), ExtResource( 115 ), ExtResource( 127 ), ExtResource( 123 ), ExtResource( 113 ), ExtResource( 77 ), ExtResource( 78 ), ExtResource( 124 ), ExtResource( 94 ), ExtResource( 112 ), ExtResource( 131 ), ExtResource( 95 ) ],
|
||||
"loop": true,
|
||||
"name": "move-speed-right-03",
|
||||
"speed": 35.0
|
||||
}, {
|
||||
"frames": [ ExtResource( 73 ), ExtResource( 57 ), ExtResource( 65 ), ExtResource( 64 ), ExtResource( 54 ), ExtResource( 71 ), ExtResource( 58 ), ExtResource( 66 ), ExtResource( 62 ), ExtResource( 59 ), ExtResource( 56 ), ExtResource( 60 ), ExtResource( 63 ), ExtResource( 50 ), ExtResource( 61 ), ExtResource( 67 ), ExtResource( 72 ), ExtResource( 51 ), ExtResource( 68 ), ExtResource( 69 ) ],
|
||||
"loop": true,
|
||||
"name": "move-speed-left-02",
|
||||
"speed": 35.0
|
||||
}, {
|
||||
"frames": [ ExtResource( 162 ), ExtResource( 135 ), ExtResource( 146 ), ExtResource( 141 ), ExtResource( 143 ), ExtResource( 163 ), ExtResource( 149 ), ExtResource( 136 ), ExtResource( 154 ), ExtResource( 137 ), ExtResource( 165 ), ExtResource( 142 ), ExtResource( 139 ), ExtResource( 159 ), ExtResource( 140 ), ExtResource( 155 ), ExtResource( 144 ), ExtResource( 151 ), ExtResource( 153 ), ExtResource( 166 ) ],
|
||||
"loop": true,
|
||||
"name": "boost-speed-left-04",
|
||||
"speed": 50.0
|
||||
} ]
|
||||
|
||||
[sub_resource type="CircleShape2D" id=2]
|
||||
@ -301,12 +321,14 @@ animations = [ {
|
||||
"loop": true,
|
||||
"name": "02",
|
||||
"speed": 5.0
|
||||
}, {
|
||||
"frames": [ ExtResource( 27 ) ],
|
||||
"loop": true,
|
||||
"name": "01",
|
||||
"speed": 5.0
|
||||
} ]
|
||||
|
||||
[node name="player" type="KinematicBody2D" groups=[
|
||||
"Net",
|
||||
"Player",
|
||||
]]
|
||||
[node name="player" type="KinematicBody2D" groups=["Net", "Player"]]
|
||||
script = ExtResource( 11 )
|
||||
|
||||
[node name="trajectories" type="Node2D" parent="."]
|
||||
|
||||
60
source/entities/ts_bot/ts_bot.tscn
Normal file
60
source/entities/ts_bot/ts_bot.tscn
Normal file
@ -0,0 +1,60 @@
|
||||
[gd_scene load_steps=10 format=2]
|
||||
|
||||
[ext_resource path="res://source/assets/sprites/character/ts_bot/TS_bot_sprite_agressive.svg" type="Texture" id=1]
|
||||
[ext_resource path="res://source/assets/scripts/ts_bot_handlers/ts_bot_handlergd.gd" type="Script" id=2]
|
||||
[ext_resource path="res://source/assets/sprites/character/ts_bot/TS_bot_sprite_passive.svg" type="Texture" id=3]
|
||||
[ext_resource path="res://source/assets/sprites/character/ts_bot/TS_bot_sprite_friendly.svg" type="Texture" id=4]
|
||||
[ext_resource path="res://source/assets/sprites/character/ts_bot/TS_bot_sprite_weapon_on.svg" type="Texture" id=5]
|
||||
[ext_resource path="res://source/assets/sprites/character/ts_bot/TS_bot_sprite_weapon_off.svg" type="Texture" id=6]
|
||||
|
||||
[sub_resource type="CircleShape2D" id=1]
|
||||
radius = 30.0
|
||||
|
||||
[sub_resource type="CapsuleShape2D" id=2]
|
||||
radius = 22.0
|
||||
height = 46.0
|
||||
|
||||
[sub_resource type="SpriteFrames" id=3]
|
||||
animations = [ {
|
||||
"frames": [ ExtResource( 1 ) ],
|
||||
"loop": true,
|
||||
"name": "agressive_idle",
|
||||
"speed": 5.0
|
||||
}, {
|
||||
"frames": [ ExtResource( 4 ) ],
|
||||
"loop": true,
|
||||
"name": "friendly_idle",
|
||||
"speed": 5.0
|
||||
}, {
|
||||
"frames": [ ExtResource( 3 ) ],
|
||||
"loop": true,
|
||||
"name": "passive_idle",
|
||||
"speed": 5.0
|
||||
} ]
|
||||
|
||||
[node name="ts_bot" type="KinematicBody2D"]
|
||||
script = ExtResource( 2 )
|
||||
|
||||
[node name="main_bot_collider" type="CollisionShape2D" parent="."]
|
||||
position = Vector2( 0, -8 )
|
||||
shape = SubResource( 1 )
|
||||
|
||||
[node name="outer_bot_collider" type="CollisionShape2D" parent="."]
|
||||
position = Vector2( 0, -8 )
|
||||
shape = SubResource( 2 )
|
||||
|
||||
[node name="ts_bot_sprite" type="AnimatedSprite" parent="."]
|
||||
position = Vector2( 0, 5 )
|
||||
scale = Vector2( 0.6, 0.6 )
|
||||
frames = SubResource( 3 )
|
||||
animation = "passive_idle"
|
||||
|
||||
[node name="TsBotSpriteWeaponOff" type="Sprite" parent="."]
|
||||
position = Vector2( 0, -8 )
|
||||
scale = Vector2( 0.6, 0.6 )
|
||||
texture = ExtResource( 6 )
|
||||
|
||||
[node name="TsBotSpriteWeaponOn" type="Sprite" parent="."]
|
||||
position = Vector2( 0, -8 )
|
||||
scale = Vector2( 0.6, 0.6 )
|
||||
texture = ExtResource( 5 )
|
||||
@ -3,6 +3,7 @@
|
||||
[ext_resource path="res://source/assets/scripts/server_handlers/trinity_site_level_playground.gd" type="Script" id=1]
|
||||
[ext_resource path="res://source/assets/scripts/ui_element_handlers/UI.gd" type="Script" id=2]
|
||||
[ext_resource path="res://source/levels/trinity_site/images/trinity_site_level_layout_level_design_z_index_0.svg" type="Texture" id=3]
|
||||
[ext_resource path="res://source/entities/ts_bot/ts_bot.tscn" type="PackedScene" id=4]
|
||||
[ext_resource path="res://source/levels/trinity_site/images/trinity_site_level_layout_level_design_z_index_4.svg" type="Texture" id=7]
|
||||
[ext_resource path="res://source/levels/trinity_site/images/trinity_site_level_layout_level_design_z_index_3.svg" type="Texture" id=8]
|
||||
[ext_resource path="res://source/entities/grass/grass_node.tscn" type="PackedScene" id=9]
|
||||
|
||||
@ -54,8 +54,8 @@ margin_left = -150.0
|
||||
margin_top = -36.0
|
||||
margin_right = 150.0
|
||||
margin_bottom = 36.0
|
||||
custom_fonts/font = ExtResource( 5 )
|
||||
custom_colors/font_color = Color( 0, 0, 0, 1 )
|
||||
custom_fonts/font = ExtResource( 5 )
|
||||
text = "PLAY"
|
||||
align = 1
|
||||
valign = 1
|
||||
@ -79,8 +79,8 @@ margin_left = -98.8223
|
||||
margin_top = -36.0
|
||||
margin_right = 134.178
|
||||
margin_bottom = 36.0
|
||||
custom_fonts/font = ExtResource( 5 )
|
||||
custom_colors/font_color = Color( 0, 0, 0, 1 )
|
||||
custom_fonts/font = ExtResource( 5 )
|
||||
text = "LAN Party"
|
||||
align = 1
|
||||
valign = 1
|
||||
@ -111,8 +111,8 @@ margin_left = -150.0
|
||||
margin_top = -36.0
|
||||
margin_right = 150.0
|
||||
margin_bottom = 36.0
|
||||
custom_fonts/font = ExtResource( 5 )
|
||||
custom_colors/font_color = Color( 0, 0, 0, 1 )
|
||||
custom_fonts/font = ExtResource( 5 )
|
||||
text = "EXIT"
|
||||
align = 1
|
||||
valign = 1
|
||||
|
||||
@ -21,16 +21,16 @@ use_mipmaps = true
|
||||
use_filter = true
|
||||
font_data = ExtResource( 2 )
|
||||
|
||||
[sub_resource type="StyleBoxEmpty" id=2]
|
||||
|
||||
[sub_resource type="StyleBoxEmpty" id=3]
|
||||
|
||||
[sub_resource type="DynamicFont" id=4]
|
||||
size = 36
|
||||
use_mipmaps = true
|
||||
use_filter = true
|
||||
font_data = ExtResource( 2 )
|
||||
|
||||
[sub_resource type="StyleBoxEmpty" id=2]
|
||||
|
||||
[sub_resource type="StyleBoxEmpty" id=3]
|
||||
|
||||
[sub_resource type="DynamicFont" id=5]
|
||||
size = 36
|
||||
use_mipmaps = true
|
||||
@ -94,8 +94,8 @@ margin_left = -150.0
|
||||
margin_top = -36.0
|
||||
margin_right = 150.0
|
||||
margin_bottom = 36.0
|
||||
custom_fonts/font = ExtResource( 8 )
|
||||
custom_colors/font_color = Color( 0, 0, 0, 1 )
|
||||
custom_fonts/font = ExtResource( 8 )
|
||||
text = "CREATE SERVER"
|
||||
align = 1
|
||||
valign = 1
|
||||
@ -118,8 +118,8 @@ anchor_bottom = 0.5
|
||||
margin_left = -233.0
|
||||
margin_top = -36.0
|
||||
margin_bottom = 36.0
|
||||
custom_fonts/font = ExtResource( 8 )
|
||||
custom_colors/font_color = Color( 0, 0, 0, 1 )
|
||||
custom_fonts/font = ExtResource( 8 )
|
||||
text = "JOIN SERVER"
|
||||
align = 1
|
||||
valign = 1
|
||||
@ -154,8 +154,8 @@ margin_left = -150.0
|
||||
margin_top = -36.0
|
||||
margin_right = 150.0
|
||||
margin_bottom = 36.0
|
||||
custom_fonts/font = ExtResource( 8 )
|
||||
custom_colors/font_color = Color( 0, 0, 0, 1 )
|
||||
custom_fonts/font = ExtResource( 8 )
|
||||
text = "RETURN"
|
||||
align = 1
|
||||
valign = 1
|
||||
@ -186,8 +186,8 @@ margin_left = -225.0
|
||||
margin_top = -25.0
|
||||
margin_right = -225.0
|
||||
margin_bottom = -25.0
|
||||
custom_fonts/font = SubResource( 1 )
|
||||
custom_colors/font_color = Color( 0, 0, 0, 1 )
|
||||
custom_fonts/font = SubResource( 1 )
|
||||
text = "Enter your username"
|
||||
align = 1
|
||||
valign = 1
|
||||
@ -218,10 +218,10 @@ margin_left = -175.0
|
||||
margin_top = -28.0
|
||||
margin_right = 175.0
|
||||
margin_bottom = 28.0
|
||||
custom_colors/selection_color = Color( 0.8, 0.8, 0.8, 1 )
|
||||
custom_fonts/font = SubResource( 4 )
|
||||
custom_styles/focus = SubResource( 2 )
|
||||
custom_styles/normal = SubResource( 3 )
|
||||
custom_fonts/font = SubResource( 4 )
|
||||
custom_colors/selection_color = Color( 0.8, 0.8, 0.8, 1 )
|
||||
align = 1
|
||||
placeholder_text = "username"
|
||||
__meta__ = {
|
||||
@ -242,8 +242,8 @@ margin_bottom = 97.0
|
||||
[node name="Label" type="Label" parent="multiplayer_configure/popup_screen/panel/confirm"]
|
||||
anchor_right = 1.0
|
||||
anchor_bottom = 1.0
|
||||
custom_fonts/font = SubResource( 5 )
|
||||
custom_colors/font_color = Color( 0, 0, 0, 1 )
|
||||
custom_fonts/font = SubResource( 5 )
|
||||
text = "CONFIRM"
|
||||
align = 1
|
||||
valign = 1
|
||||
@ -304,8 +304,8 @@ margin_left = -74.5
|
||||
margin_top = -32.0
|
||||
margin_right = 74.5
|
||||
margin_bottom = 32.0
|
||||
custom_fonts/font = ExtResource( 10 )
|
||||
custom_colors/font_color = Color( 0, 0, 0, 1 )
|
||||
custom_fonts/font = ExtResource( 10 )
|
||||
text = "START"
|
||||
align = 1
|
||||
valign = 1
|
||||
@ -324,8 +324,8 @@ margin_left = 621.0
|
||||
margin_top = 464.0
|
||||
margin_right = 1259.0
|
||||
margin_bottom = 576.0
|
||||
custom_fonts/font = SubResource( 6 )
|
||||
custom_colors/font_color = Color( 0.439216, 0.666667, 1, 0.27451 )
|
||||
custom_fonts/font = SubResource( 6 )
|
||||
align = 1
|
||||
valign = 1
|
||||
__meta__ = {
|
||||
@ -343,8 +343,8 @@ margin_left = 823.5
|
||||
margin_top = 580.0
|
||||
margin_right = 1056.5
|
||||
margin_bottom = 609.0
|
||||
custom_fonts/font = SubResource( 7 )
|
||||
custom_colors/font_color = Color( 0.439216, 0.666667, 1, 0.27451 )
|
||||
custom_fonts/font = SubResource( 7 )
|
||||
text = "WAITING FOR PLAYERS"
|
||||
align = 1
|
||||
valign = 1
|
||||
|
||||
Loading…
Reference in New Issue
Block a user