Browse Source

clamped player position, some art updates

master
as4s4hetic 3 years ago
parent
commit
f0ade5d211
  1. 2
      Resources/woods.tres
  2. 17
      Scripts/Ch1S1.gd
  3. 0
      Scripts/Covers.gd
  4. 2
      Scripts/ScrollCamera.gd
  5. 12
      Story/Ch1S1.tscn
  6. BIN
      Tiles/road.png

2
Resources/woods.tres

@ -221,7 +221,7 @@ @@ -221,7 +221,7 @@
14/texture = ExtResource( 15 )
14/tex_offset = Vector2( 0, 0 )
14/modulate = Color( 1, 1, 1, 1 )
14/region = Rect2( 0, 0, 240, 180 )
14/region = Rect2( 0, 0, 240, 240 )
14/tile_mode = 0
14/occluder_offset = Vector2( 0, 0 )
14/navigation_offset = Vector2( 0, 0 )

17
Scripts/Ch1S1.gd

@ -0,0 +1,17 @@ @@ -0,0 +1,17 @@
extends Node2D
onready var player = get_node("Player")
# Declare member variables here. Examples:
# var a = 2
# var b = "text"
# Called when the node enters the scene tree for the first time.
func _ready():
pass # Replace with function body.
# Called every frame. 'delta' is the elapsed time since the previous frame.
func _process(delta):
player.position.y = clamp(player.position.y, 460, 500)
pass

0
Story/Covers.gd → Scripts/Covers.gd

2
Story/ScrollCamera.gd → Scripts/ScrollCamera.gd

@ -17,4 +17,4 @@ onready var target = get_node("../Player") @@ -17,4 +17,4 @@ onready var target = get_node("../Player")
func _process (delta):
position = target.position
position.y -= 180
position.y -= 240

12
Story/Ch1S1.tscn

@ -1,10 +1,12 @@ @@ -1,10 +1,12 @@
[gd_scene load_steps=4 format=2]
[gd_scene load_steps=5 format=2]
[ext_resource path="res://Resources/woods.tres" type="TileSet" id=1]
[ext_resource path="res://Scenes/Player.tscn" type="PackedScene" id=2]
[ext_resource path="res://Story/ScrollCamera.gd" type="Script" id=3]
[ext_resource path="res://Scripts/ScrollCamera.gd" type="Script" id=3]
[ext_resource path="res://Scripts/Ch1S1.gd" type="Script" id=4]
[node name="Ch1S1" type="Node2D"]
script = ExtResource( 4 )
[node name="ScrollCamera" type="Camera2D" parent="."]
current = true
@ -93,7 +95,7 @@ motion_mirroring = Vector2( 1440, 0 ) @@ -93,7 +95,7 @@ motion_mirroring = Vector2( 1440, 0 )
tile_set = ExtResource( 1 )
cell_y_sort = true
format = 1
tile_data = PoolIntArray( -262138, 19, 0, -131071, 18, 0 )
tile_data = PoolIntArray( -131071, 18, 0 )
[node name="Grass" type="TileMap" parent="Background/Close"]
tile_set = ExtResource( 1 )
@ -118,7 +120,7 @@ format = 1 @@ -118,7 +120,7 @@ format = 1
tile_data = PoolIntArray( 65536, 7, 0, 65538, 15, 0, 65540, 15, 0, 65542, 15, 0, 65544, 15, 0, 65546, 15, 0, 65548, 15, 0, 65550, 15, 0, 65552, 15, 0, 65554, 15, 0, 65556, 15, 0, 65558, 15, 0, 65560, 15, 0, 65562, 15, 0, 65564, 15, 0, 65566, 15, 0, 65568, 15, 0, 65570, 15, 0, 65572, 15, 0, 65574, 15, 0, 65576, 15, 0, 65578, 15, 0, 65580, 15, 0, 65582, 15, 0, 720896, 16, 0 )
[node name="Player" parent="." instance=ExtResource( 2 )]
position = Vector2( 472, 433 )
position = Vector2( 480, 480 )
[node name="Foreground" type="ParallaxBackground" parent="."]
layer = 1
@ -143,4 +145,4 @@ tile_set = ExtResource( 1 ) @@ -143,4 +145,4 @@ tile_set = ExtResource( 1 )
cell_size = Vector2( 60, 60 )
cell_y_sort = true
format = 1
tile_data = PoolIntArray( -65518, 19, 0, 65548, 18, 0, 393216, 12, 0, 393220, 12, 0, 393224, 12, 0, 393228, 12, 0, 393232, 12, 0, 393236, 12, 0, 589824, 13, 0, 589828, 13, 0, 589832, 13, 0, 589836, 13, 0, 589840, 13, 0, 589844, 13, 0 )
tile_data = PoolIntArray( 18, 19, 0, 458752, 12, 0, 458756, 12, 0, 458760, 12, 0, 458764, 12, 0, 458768, 12, 0, 458772, 12, 0, 655360, 13, 0, 655364, 13, 0, 655368, 13, 0, 655372, 13, 0, 655376, 13, 0, 655380, 13, 0 )

BIN
Tiles/road.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 637 B

After

Width:  |  Height:  |  Size: 810 B

Loading…
Cancel
Save