Merge branch 'master' of git.touhou.dev:StellatedCUBE/Jam10
This commit is contained in:
commit
f21126b136
10 changed files with 529 additions and 18 deletions
|
@ -165,6 +165,16 @@ const TILE_SET_MAP_ELEMS = {
|
|||
MapElemType.LEDGE: [19, 20, 21, 22],
|
||||
MapElemType.OOB_LOWER: [23],
|
||||
},
|
||||
"SnowySlopes": {
|
||||
MapElemType.SQUARE: [0, 1, 2, 3, 4, 5, 6, 7, 8, 21],
|
||||
MapElemType.SLOPE_LEFT: [9, 11],
|
||||
MapElemType.SLOPE_RIGHT: [10, 12],
|
||||
MapElemType.SMALL_SLOPE_LEFT_1: [13, 17],
|
||||
MapElemType.SMALL_SLOPE_LEFT_2: [15, 19],
|
||||
MapElemType.SMALL_SLOPE_RIGHT_1: [14, 18],
|
||||
MapElemType.SMALL_SLOPE_RIGHT_2: [16, 20],
|
||||
MapElemType.LEDGE: [],
|
||||
},
|
||||
}
|
||||
|
||||
const UNIT_SPRITES = {
|
||||
|
@ -183,16 +193,16 @@ const UNIT_SPRITES = {
|
|||
}
|
||||
|
||||
const UNIT_TYPE_MOVE_SPEEDS = {
|
||||
UnitType.PLAYER: 8,
|
||||
UnitType.PLAYER: 5,
|
||||
UnitType.NPC: 3,
|
||||
}
|
||||
|
||||
const UNIT_TYPE_JUMP_SPEEDS = {
|
||||
UnitType.PLAYER: 5,
|
||||
UnitType.PLAYER: 4.5,
|
||||
}
|
||||
|
||||
const SCALE_FACTOR = 2.4
|
||||
const GRID_SIZE = 20 # pixels
|
||||
const SCALE_FACTOR = 1
|
||||
const GRID_SIZE = 48 # pixels
|
||||
const GRAVITY = 16.1 # gravity = 32.17 ft/s^2, grid unit is 2ft
|
||||
const MAX_FALL_SPEED = -37
|
||||
const ACCELERATION = 35
|
||||
|
|
|
@ -285,6 +285,9 @@ func check_collision(unit : Unit, collider, collision_into_directions, delta):
|
|||
if unit.get_condition(Constants.UnitCondition.IS_ON_GROUND, false):
|
||||
# also shorten vertical component to preserve move vector direction
|
||||
unit.v_speed *= factor
|
||||
# slow down unit if DownhillAutoscroller:
|
||||
if unit is DownhillAutoscrollerPlayer:
|
||||
unit.target_move_speed = unit.min_speed
|
||||
else:
|
||||
# ceiling collision (horizontal only for now)
|
||||
var new_cc_y : float = intersects_results[1].y - Constants.QUANTUM_DIST
|
||||
|
|
|
@ -54,8 +54,10 @@ func _ready():
|
|||
pos = Vector2(position.x / Constants.GRID_SIZE, position.y / -Constants.GRID_SIZE)
|
||||
position.x = position.x * Constants.SCALE_FACTOR
|
||||
position.y = position.y * Constants.SCALE_FACTOR
|
||||
scale.x = Constants.SCALE_FACTOR
|
||||
scale.y = Constants.SCALE_FACTOR
|
||||
# scale.x = Constants.SCALE_FACTOR
|
||||
# scale.y = Constants.SCALE_FACTOR
|
||||
scale.x = 2.4
|
||||
scale.y = 2.4
|
||||
|
||||
func init_unit_w_scene(scene):
|
||||
self.scene = scene
|
||||
|
|
|
@ -3,9 +3,9 @@ extends Player
|
|||
class_name DownhillAutoscrollerPlayer
|
||||
|
||||
export var min_speed : float = 3
|
||||
export var max_speed : float = 16
|
||||
export var player_initiated_acceleration : float = 8
|
||||
export var boost_per_second : float = 10
|
||||
export var max_speed : float = 11
|
||||
export var player_initiated_acceleration : float = 5
|
||||
export var boost_per_second : float = 6
|
||||
|
||||
var last_contacted_map_elem_type : int = Constants.MapElemType.SQUARE
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue