Reorganized player, camera, ball

This commit is contained in:
Rob Kelly 2024-11-17 14:07:28 -07:00
parent 5fd2433937
commit 5cfb1fce96
22 changed files with 32 additions and 22 deletions

View File

@ -24,10 +24,12 @@ const IRON_DAMPING := 9999.0
var _zones: Array[BallZone] = []
@onready
var normal_physics: PhysicsMaterial = preload("res://src/player/physics_ball/normal_physics.tres")
@onready
var iron_physics: PhysicsMaterial = preload("res://src/player/physics_ball/iron_physics.tres")
@onready var normal_physics: PhysicsMaterial = preload(
"res://src/equipment/balls/physics_ball/normal_physics.tres"
)
@onready var iron_physics: PhysicsMaterial = preload(
"res://src/equipment/balls/physics_ball/iron_physics.tres"
)
## Called by a water area when this ball enters it

View File

@ -1,7 +1,7 @@
[gd_scene load_steps=8 format=3 uid="uid://dfttci386ohip"]
[ext_resource type="Script" path="res://src/player/physics_ball/game_ball.gd" id="1_iwh2u"]
[ext_resource type="PhysicsMaterial" uid="uid://3bih72l068ic" path="res://src/player/physics_ball/normal_physics.tres" id="1_l23pw"]
[ext_resource type="Script" path="res://src/equipment/balls/physics_ball/game_ball.gd" id="1_iwh2u"]
[ext_resource type="PhysicsMaterial" uid="uid://3bih72l068ic" path="res://src/equipment/balls/physics_ball/normal_physics.tres" id="1_l23pw"]
[ext_resource type="Texture2D" uid="uid://ckhiq6rfjv63u" path="res://assets/textures/gfolfball/gfolfball.png" id="1_y3q5j"]
[ext_resource type="Texture2D" uid="uid://btntjs7mbdigu" path="res://assets/textures/gfolfball/gfolfball_normal.png" id="2_mx7l6"]

View File

@ -1,11 +1,11 @@
[gd_scene load_steps=17 format=3 uid="uid://cy7t2tc4y3b4"]
[ext_resource type="Script" path="res://src/player/shot_setup/shot_setup.gd" id="1_r6ei4"]
[ext_resource type="PackedScene" uid="uid://dfttci386ohip" path="res://src/player/physics_ball/physics_ball.tscn" id="2_1i5j5"]
[ext_resource type="PackedScene" uid="uid://c2k88ns0h5ie1" path="res://src/ui/arrow/arrow.tscn" id="2_s70wl"]
[ext_resource type="PackedScene" uid="uid://dfttci386ohip" path="res://src/equipment/balls/physics_ball/physics_ball.tscn" id="2_1i5j5"]
[ext_resource type="PackedScene" uid="uid://c2k88ns0h5ie1" path="res://src/ui/3d/arrow/arrow.tscn" id="2_s70wl"]
[ext_resource type="PackedScene" uid="uid://1s3gywmoi20e" path="res://src/characters/player_characters/gfolf_girl/gfolf_girl.tscn" id="3_e4aur"]
[ext_resource type="PackedScene" uid="uid://fht6j87o8ecr" path="res://src/ui/projectile_arc/projectile_arc.tscn" id="4_ry2ho"]
[ext_resource type="PackedScene" uid="uid://dbdul15c4oblg" path="res://src/ui/projected_target.tscn" id="6_mynqj"]
[ext_resource type="PackedScene" uid="uid://fht6j87o8ecr" path="res://src/ui/3d/projectile_arc/projectile_arc.tscn" id="4_ry2ho"]
[ext_resource type="PackedScene" uid="uid://dbdul15c4oblg" path="res://src/ui/3d/projected_target.tscn" id="6_mynqj"]
[sub_resource type="StandardMaterial3D" id="StandardMaterial3D_lnol1"]
albedo_color = Color(0, 0.537255, 1, 1)

View File

@ -0,0 +1,2 @@
class_name WorldPlayer extends Node
## Container for the state of the player within the world.

View File

@ -0,0 +1,6 @@
[gd_scene load_steps=2 format=3 uid="uid://q8vdqfewwvsy"]
[ext_resource type="Script" path="res://src/player/world_player/world_player.gd" id="1_2wo11"]
[node name="WorldPlayer" type="Node"]
script = ExtResource("1_2wo11")

View File

@ -1,14 +1,14 @@
@tool
extends Node3D
const COLOR_PARAMETER := "albedo"
enum Loop {
RESET,
BOB_TIP,
BOB_TAIL,
}
const COLOR_PARAMETER := "albedo"
@export var loop_animation: Loop:
set(value):
if is_instance_valid(animation_player):

View File

@ -1,7 +1,7 @@
[gd_scene load_steps=9 format=3 uid="uid://c2k88ns0h5ie1"]
[ext_resource type="PackedScene" uid="uid://bw54bi35myvpg" path="res://assets/models/ui/arrow/arrow.glb" id="1_xifl6"]
[ext_resource type="Script" path="res://src/ui/arrow/arrow.gd" id="2_0viam"]
[ext_resource type="Script" path="res://src/ui/3d/arrow/arrow.gd" id="2_0viam"]
[ext_resource type="Material" uid="uid://d3ka0yjhxu5ks" path="res://assets/materials/gummy_material.tres" id="3_g7vwe"]
[sub_resource type="Animation" id="Animation_hsqkd"]

View File

@ -1,6 +1,6 @@
[gd_scene load_steps=9 format=3 uid="uid://fht6j87o8ecr"]
[ext_resource type="Script" path="res://src/ui/projectile_arc/projectile_arc.gd" id="1_vafqi"]
[ext_resource type="Script" path="res://src/ui/3d/projectile_arc/projectile_arc.gd" id="1_vafqi"]
[ext_resource type="Shader" path="res://src/shaders/plasma.gdshader" id="2_pi36v"]
[sub_resource type="Curve3D" id="Curve3D_rfv3d"]

View File

@ -22,7 +22,7 @@ var invert_pitch: bool = ProjectSettings.get_setting("game/config/controls/camer
@onready var _target := Vector2(rotation.x, rotation.y)
static var scene := preload("res://src/player/free_camera/free_camera.tscn")
static var scene := preload("res://src/ui/camera/free_camera/free_camera.tscn")
func _unhandled_input(event: InputEvent) -> void:

View File

@ -1,6 +1,6 @@
[gd_scene load_steps=3 format=3 uid="uid://dd17ce110sw6p"]
[ext_resource type="Script" path="res://src/player/free_camera/free_camera.gd" id="1_3gm3q"]
[ext_resource type="Script" path="res://src/ui/camera/free_camera/free_camera.gd" id="1_3gm3q"]
[sub_resource type="SphereShape3D" id="SphereShape3D_wmusx"]

View File

@ -9,7 +9,7 @@ const POSITION_ACCELERATION := 4.0
@onready var camera: Camera3D = %Camera
static var scene := preload("res://src/player/orbital_camera/orbital_camera.tscn")
static var scene := preload("res://src/ui/camera/orbital_camera/orbital_camera.tscn")
func _physics_process(delta: float) -> void:

View File

@ -1,6 +1,6 @@
[gd_scene load_steps=2 format=3 uid="uid://de5onfk2tyr1d"]
[ext_resource type="Script" path="res://src/player/orbital_camera/orbital_camera.gd" id="1_nvlic"]
[ext_resource type="Script" path="res://src/ui/camera/orbital_camera/orbital_camera.gd" id="1_nvlic"]
[node name="OrbitalCamera" type="Node3D"]
script = ExtResource("1_nvlic")

View File

@ -1,6 +1,6 @@
[gd_scene load_steps=2 format=3 uid="uid://ceu57tasi270s"]
[ext_resource type="Script" path="res://src/player/tracking_camera/tracking_camera.gd" id="1_352mq"]
[ext_resource type="Script" path="res://src/ui/camera/tracking_camera/tracking_camera.gd" id="1_352mq"]
[node name="TrackingCamera" type="Camera3D"]
script = ExtResource("1_352mq")

View File

@ -1,8 +1,8 @@
[gd_scene load_steps=7 format=3 uid="uid://445qd7m4qe2j"]
[ext_resource type="Script" path="res://src/player/shot_setup/club_selector/club_selector.gd" id="1_cttgc"]
[ext_resource type="Script" path="res://src/ui/shot_hud/club_selector/club_selector.gd" id="1_cttgc"]
[ext_resource type="Script" path="res://src/ui/decorations/arc.gd" id="2_vijl7"]
[ext_resource type="Script" path="res://src/ui/double_rotator.gd" id="3_0ptmq"]
[ext_resource type="Script" path="res://src/ui/decorations/double_rotator.gd" id="3_0ptmq"]
[sub_resource type="Animation" id="Animation_crn6i"]
length = 0.001

View File

@ -2,7 +2,7 @@
[ext_resource type="Script" path="res://src/ui/shot_hud/shot_hud.gd" id="1_x5b4c"]
[ext_resource type="Shader" path="res://src/shaders/canvas_retro.gdshader" id="1_ybxxp"]
[ext_resource type="PackedScene" uid="uid://445qd7m4qe2j" path="res://src/player/shot_setup/club_selector/club_selector.tscn" id="2_1hdub"]
[ext_resource type="PackedScene" uid="uid://445qd7m4qe2j" path="res://src/ui/shot_hud/club_selector/club_selector.tscn" id="2_1hdub"]
[sub_resource type="Animation" id="Animation_3xds6"]
resource_name = "RESET"