Skip to content

Commit

Permalink
working trail + candy spawn + boss at spawn + candy types + count points
Browse files Browse the repository at this point in the history
  • Loading branch information
Cod3lta committed Nov 30, 2021
1 parent 47494d3 commit 048d530
Show file tree
Hide file tree
Showing 37 changed files with 807 additions and 154 deletions.
3 changes: 2 additions & 1 deletion assets/bosses/idle/boss-black-idle.png.import
Original file line number Diff line number Diff line change
Expand Up @@ -20,14 +20,15 @@ compress/hdr_mode=0
compress/bptc_ldr=0
compress/normal_map=0
flags/repeat=0
flags/filter=true
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
process/normal_map_invert_y=false
stream=false
size_limit=0
detect_3d=true
Expand Down
3 changes: 2 additions & 1 deletion assets/bosses/idle/boss-red-idle.png.import
Original file line number Diff line number Diff line change
Expand Up @@ -20,14 +20,15 @@ compress/hdr_mode=0
compress/bptc_ldr=0
compress/normal_map=0
flags/repeat=0
flags/filter=true
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
process/normal_map_invert_y=false
stream=false
size_limit=0
detect_3d=true
Expand Down
16 changes: 16 additions & 0 deletions assets/candy/candy-icon.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
35 changes: 35 additions & 0 deletions assets/candy/candy-icon.svg.import
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
[remap]

importer="texture"
type="StreamTexture"
path="res://.import/candy-icon.svg-b0ecad2afa4bc5d345d2a6ee18c96d31.stex"
metadata={
"vram_texture": false
}

[deps]

source_file="res://assets/candy/candy-icon.svg"
dest_files=[ "res://.import/candy-icon.svg-b0ecad2afa4bc5d345d2a6ee18c96d31.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=true
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
process/normal_map_invert_y=false
stream=false
size_limit=0
detect_3d=true
svg/scale=1.0
35 changes: 35 additions & 0 deletions assets/candy/mandarin-icon.svg.import
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
[remap]

importer="texture"
type="StreamTexture"
path="res://.import/mandarin-icon.svg-19bf430e5b349b7fee565c515e46cf10.stex"
metadata={
"vram_texture": false
}

[deps]

source_file="res://assets/candy/mandarin-icon.svg"
dest_files=[ "res://.import/mandarin-icon.svg-19bf430e5b349b7fee565c515e46cf10.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=true
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
process/normal_map_invert_y=false
stream=false
size_limit=0
detect_3d=true
svg/scale=1.0
35 changes: 35 additions & 0 deletions assets/candy/peanut-icon.svg.import
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
[remap]

importer="texture"
type="StreamTexture"
path="res://.import/peanut-icon.svg-3aea6e39c4269dbc4ed342e3fc052a8e.stex"
metadata={
"vram_texture": false
}

[deps]

source_file="res://assets/candy/peanut-icon.svg"
dest_files=[ "res://.import/peanut-icon.svg-3aea6e39c4269dbc4ed342e3fc052a8e.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=true
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
process/normal_map_invert_y=false
stream=false
size_limit=0
detect_3d=true
svg/scale=1.0
52 changes: 52 additions & 0 deletions project.godot
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,58 @@

config_version=4

_global_script_classes=[ {
"base": "Node2D",
"class": "Candy",
"language": "GDScript",
"path": "res://src/actors/candy/candy.gd"
}, {
"base": "Node2D",
"class": "Game",
"language": "GDScript",
"path": "res://src/game.gd"
}, {
"base": "Candy",
"class": "MandarinLarge",
"language": "GDScript",
"path": "res://src/actors/candy/types/mandarinLarge.gd"
}, {
"base": "Candy",
"class": "MandarinSmall",
"language": "GDScript",
"path": "res://src/actors/candy/types/mandarinSmall.gd"
}, {
"base": "Candy",
"class": "PeanutLarge",
"language": "GDScript",
"path": "res://src/actors/candy/types/peanutLarge.gd"
}, {
"base": "Candy",
"class": "PeanutSmall",
"language": "GDScript",
"path": "res://src/actors/candy/types/peanutSmall.gd"
}, {
"base": "KinematicBody2D",
"class": "Player",
"language": "GDScript",
"path": "res://src/actors/player/player.gd"
}, {
"base": "Position2D",
"class": "Spawner",
"language": "GDScript",
"path": "res://src/scripts/server/candySpawners/spawner.gd"
} ]
_global_script_class_icons={
"Candy": "res://assets/candy/candy-icon.svg",
"Game": "",
"MandarinLarge": "res://assets/candy/mandarin-big.png",
"MandarinSmall": "res://assets/candy/mandarin-small.png",
"PeanutLarge": "res://assets/candy/peanut-big.png",
"PeanutSmall": "res://assets/candy/peanut-small.png",
"Player": "",
"Spawner": ""
}

[application]

config/name="schoolboybattle"
Expand Down
22 changes: 22 additions & 0 deletions src/actors/boss/Boss.gd
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
extends Node2D


enum TYPE_E {NICOLAS=0, FOUETTARD=1}

export(int, "St Nicolas", "Pere Fouettard") var type = TYPE_E.NICOLAS


# Called when the node enters the scene tree for the first time.
func _ready():
var sprite_frames: SpriteFrames

if type == TYPE_E.FOUETTARD:
sprite_frames = preload("res://src/actors/boss/spriteFrames/pereFouettard.tres")
elif type == TYPE_E.NICOLAS:
sprite_frames = preload("res://src/actors/boss/spriteFrames/stNicolas.tres")
$AnimatedSprite.set_sprite_frames(sprite_frames)


# Called every frame. 'delta' is the elapsed time since the previous frame.
#func _process(delta):
# pass
15 changes: 15 additions & 0 deletions src/actors/boss/Boss.tscn
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
[gd_scene load_steps=3 format=2]

[ext_resource path="res://src/actors/boss/spriteFrames/pereFouettard.tres" type="SpriteFrames" id=1]
[ext_resource path="res://src/actors/boss/Boss.gd" type="Script" id=2]

[node name="Boss" type="Node2D"]
script = ExtResource( 2 )

[node name="AnimatedSprite" type="AnimatedSprite" parent="."]
position = Vector2( 0, -150 )
scale = Vector2( 10, 10 )
frames = ExtResource( 1 )
animation = "idle"
frame = 1
playing = true
35 changes: 35 additions & 0 deletions src/actors/boss/spriteFrames/pereFouettard.tres
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
[gd_resource type="SpriteFrames" load_steps=8 format=2]

[ext_resource path="res://assets/bosses/idle/boss-black-idle.png" type="Texture" id=1]

[sub_resource type="AtlasTexture" id=1]
atlas = ExtResource( 1 )
region = Rect2( 0, 0, 26, 39 )

[sub_resource type="AtlasTexture" id=2]
atlas = ExtResource( 1 )
region = Rect2( 26, 0, 26, 39 )

[sub_resource type="AtlasTexture" id=3]
atlas = ExtResource( 1 )
region = Rect2( 52, 0, 26, 39 )

[sub_resource type="AtlasTexture" id=4]
atlas = ExtResource( 1 )
region = Rect2( 78, 0, 26, 39 )

[sub_resource type="AtlasTexture" id=5]
atlas = ExtResource( 1 )
region = Rect2( 104, 0, 26, 39 )

[sub_resource type="AtlasTexture" id=6]
atlas = ExtResource( 1 )
region = Rect2( 130, 0, 26, 39 )

[resource]
animations = [ {
"frames": [ SubResource( 1 ), SubResource( 2 ), SubResource( 3 ), SubResource( 4 ), SubResource( 5 ), SubResource( 6 ) ],
"loop": true,
"name": "idle",
"speed": 3.0
} ]
35 changes: 35 additions & 0 deletions src/actors/boss/spriteFrames/stNicolas.tres
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
[gd_resource type="SpriteFrames" load_steps=8 format=2]

[ext_resource path="res://assets/bosses/idle/boss-red-idle.png" type="Texture" id=1]

[sub_resource type="AtlasTexture" id=1]
atlas = ExtResource( 1 )
region = Rect2( 0, 0, 26, 39 )

[sub_resource type="AtlasTexture" id=2]
atlas = ExtResource( 1 )
region = Rect2( 26, 0, 26, 39 )

[sub_resource type="AtlasTexture" id=3]
atlas = ExtResource( 1 )
region = Rect2( 52, 0, 26, 39 )

[sub_resource type="AtlasTexture" id=4]
atlas = ExtResource( 1 )
region = Rect2( 78, 0, 26, 39 )

[sub_resource type="AtlasTexture" id=5]
atlas = ExtResource( 1 )
region = Rect2( 104, 0, 26, 39 )

[sub_resource type="AtlasTexture" id=6]
atlas = ExtResource( 1 )
region = Rect2( 130, 0, 26, 39 )

[resource]
animations = [ {
"frames": [ SubResource( 1 ), SubResource( 2 ), SubResource( 3 ), SubResource( 4 ), SubResource( 5 ), SubResource( 6 ) ],
"loop": true,
"name": "idle",
"speed": 3.0
} ]
Loading

0 comments on commit 048d530

Please sign in to comment.