✨ Off screen marker
This commit is contained in:
parent
482bfb04a0
commit
34a1b6133f
15
Scenes/OffScreenMarker.tscn
Normal file
15
Scenes/OffScreenMarker.tscn
Normal file
@ -0,0 +1,15 @@
|
|||||||
|
[gd_scene load_steps=3 format=3 uid="uid://bcnhxdbgcdsjb"]
|
||||||
|
|
||||||
|
[ext_resource type="Script" path="res://Scripts/Effects/OffScreenMarker.cs" id="1_8oti1"]
|
||||||
|
[ext_resource type="Texture2D" uid="uid://bn86o1gfcj502" path="res://Sprites/Alert.png" id="2_qatpw"]
|
||||||
|
|
||||||
|
[node name="OffScreenMarker" type="Node2D"]
|
||||||
|
script = ExtResource("1_8oti1")
|
||||||
|
|
||||||
|
[node name="Sprite2D" type="Sprite2D" parent="."]
|
||||||
|
|
||||||
|
[node name="Arrow" type="Sprite2D" parent="Sprite2D"]
|
||||||
|
position = Vector2(-20, 1.29804e-13)
|
||||||
|
rotation = 3.14159
|
||||||
|
scale = Vector2(0.04, 0.04)
|
||||||
|
texture = ExtResource("2_qatpw")
|
@ -1,4 +1,4 @@
|
|||||||
[gd_scene load_steps=12 format=3 uid="uid://b3gx0bl43lku3"]
|
[gd_scene load_steps=13 format=3 uid="uid://b3gx0bl43lku3"]
|
||||||
|
|
||||||
[ext_resource type="Script" path="res://Scripts/Player.cs" id="1_0btyt"]
|
[ext_resource type="Script" path="res://Scripts/Player.cs" id="1_0btyt"]
|
||||||
[ext_resource type="Texture2D" uid="uid://c4als6t3k4myc" path="res://Sprites/Player.png" id="1_cqpqa"]
|
[ext_resource type="Texture2D" uid="uid://c4als6t3k4myc" path="res://Sprites/Player.png" id="1_cqpqa"]
|
||||||
@ -7,6 +7,7 @@
|
|||||||
[ext_resource type="Script" path="res://Scripts/Logic/PlayerInput.cs" id="3_tvoua"]
|
[ext_resource type="Script" path="res://Scripts/Logic/PlayerInput.cs" id="3_tvoua"]
|
||||||
[ext_resource type="Theme" uid="uid://b4dcn26i0p6ym" path="res://AceTheme.tres" id="4_64t2j"]
|
[ext_resource type="Theme" uid="uid://b4dcn26i0p6ym" path="res://AceTheme.tres" id="4_64t2j"]
|
||||||
[ext_resource type="Script" path="res://Scripts/Effects/CameraShake.cs" id="4_fwngj"]
|
[ext_resource type="Script" path="res://Scripts/Effects/CameraShake.cs" id="4_fwngj"]
|
||||||
|
[ext_resource type="PackedScene" uid="uid://bcnhxdbgcdsjb" path="res://Scenes/OffScreenMarker.tscn" id="7_juwvx"]
|
||||||
|
|
||||||
[sub_resource type="CircleShape2D" id="CircleShape2D_68yf8"]
|
[sub_resource type="CircleShape2D" id="CircleShape2D_68yf8"]
|
||||||
radius = 25.6
|
radius = 25.6
|
||||||
@ -103,6 +104,9 @@ rotation_smoothing_enabled = true
|
|||||||
script = ExtResource("4_fwngj")
|
script = ExtResource("4_fwngj")
|
||||||
Noise = SubResource("FastNoiseLite_cfnx7")
|
Noise = SubResource("FastNoiseLite_cfnx7")
|
||||||
|
|
||||||
|
[node name="OffScreenMarker" parent="." node_paths=PackedStringArray("Tracking") instance=ExtResource("7_juwvx")]
|
||||||
|
Tracking = NodePath("..")
|
||||||
|
|
||||||
[node name="ReloadTimer" type="Timer" parent="."]
|
[node name="ReloadTimer" type="Timer" parent="."]
|
||||||
wait_time = 6.0
|
wait_time = 6.0
|
||||||
one_shot = true
|
one_shot = true
|
||||||
|
35
Scripts/Effects/OffScreenMarker.cs
Normal file
35
Scripts/Effects/OffScreenMarker.cs
Normal file
@ -0,0 +1,35 @@
|
|||||||
|
using Godot;
|
||||||
|
|
||||||
|
namespace AceField.Scripts.Effects;
|
||||||
|
|
||||||
|
public partial class OffScreenMarker : Node2D
|
||||||
|
{
|
||||||
|
public override void _Process(double delta)
|
||||||
|
{
|
||||||
|
var canvas = GetCanvasTransform();
|
||||||
|
var topLeft = -canvas.Origin / canvas.Scale;
|
||||||
|
var size = GetViewportRect().Size / canvas.Scale;
|
||||||
|
SetMarkerPosition(new Rect2(topLeft, size));
|
||||||
|
SetMarkerRotation();
|
||||||
|
}
|
||||||
|
|
||||||
|
private void SetMarkerPosition(Rect2 bounds)
|
||||||
|
{
|
||||||
|
var sprite = GetNode<Sprite2D>("Sprite2D");
|
||||||
|
sprite.GlobalPosition = new Vector2(
|
||||||
|
Mathf.Clamp(GlobalPosition.X, bounds.Position.X, bounds.End.X),
|
||||||
|
Mathf.Clamp(GlobalPosition.Y, bounds.Position.Y, bounds.End.Y)
|
||||||
|
);
|
||||||
|
|
||||||
|
if (bounds.HasPoint(GlobalPosition)) Hide();
|
||||||
|
else Show();
|
||||||
|
}
|
||||||
|
|
||||||
|
private void SetMarkerRotation()
|
||||||
|
{
|
||||||
|
var sprite = GetNode<Sprite2D>("Sprite2D");
|
||||||
|
var angle = (GlobalPosition - sprite.GlobalPosition).Angle();
|
||||||
|
sprite.GlobalRotation = angle;
|
||||||
|
sprite.GetNode<Sprite2D>("Arrow").GlobalRotation = 0;
|
||||||
|
}
|
||||||
|
}
|
BIN
Sprites/Alert.png
Normal file
BIN
Sprites/Alert.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 47 KiB |
34
Sprites/Alert.png.import
Normal file
34
Sprites/Alert.png.import
Normal file
@ -0,0 +1,34 @@
|
|||||||
|
[remap]
|
||||||
|
|
||||||
|
importer="texture"
|
||||||
|
type="CompressedTexture2D"
|
||||||
|
uid="uid://bn86o1gfcj502"
|
||||||
|
path="res://.godot/imported/Alert.png-add14bdc40d4ac79d18d2f38934b24e1.ctex"
|
||||||
|
metadata={
|
||||||
|
"vram_texture": false
|
||||||
|
}
|
||||||
|
|
||||||
|
[deps]
|
||||||
|
|
||||||
|
source_file="res://Sprites/Alert.png"
|
||||||
|
dest_files=["res://.godot/imported/Alert.png-add14bdc40d4ac79d18d2f38934b24e1.ctex"]
|
||||||
|
|
||||||
|
[params]
|
||||||
|
|
||||||
|
compress/mode=0
|
||||||
|
compress/high_quality=false
|
||||||
|
compress/lossy_quality=0.7
|
||||||
|
compress/hdr_compression=1
|
||||||
|
compress/normal_map=0
|
||||||
|
compress/channel_pack=0
|
||||||
|
mipmaps/generate=false
|
||||||
|
mipmaps/limit=-1
|
||||||
|
roughness/mode=0
|
||||||
|
roughness/src_normal=""
|
||||||
|
process/fix_alpha_border=true
|
||||||
|
process/premult_alpha=false
|
||||||
|
process/normal_map_invert_y=false
|
||||||
|
process/hdr_as_srgb=false
|
||||||
|
process/hdr_clamp_exposure=false
|
||||||
|
process/size_limit=0
|
||||||
|
detect_3d/compress_to=1
|
@ -1,14 +1,14 @@
|
|||||||
[preset.0]
|
[preset.0]
|
||||||
|
|
||||||
name="iOS"
|
name="Windows Desktop"
|
||||||
platform="iOS"
|
platform="Windows Desktop"
|
||||||
runnable=true
|
runnable=true
|
||||||
dedicated_server=false
|
dedicated_server=false
|
||||||
custom_features=""
|
custom_features=""
|
||||||
export_filter="all_resources"
|
export_filter="all_resources"
|
||||||
include_filter=""
|
include_filter=""
|
||||||
exclude_filter=""
|
exclude_filter=""
|
||||||
export_path=""
|
export_path="../../../Desktop/AceField.exe"
|
||||||
encryption_include_filters=""
|
encryption_include_filters=""
|
||||||
encryption_exclude_filters=""
|
encryption_exclude_filters=""
|
||||||
encrypt_pck=false
|
encrypt_pck=false
|
||||||
@ -18,59 +18,156 @@ encrypt_directory=false
|
|||||||
|
|
||||||
custom_template/debug=""
|
custom_template/debug=""
|
||||||
custom_template/release=""
|
custom_template/release=""
|
||||||
architectures/arm64=true
|
debug/export_console_wrapper=1
|
||||||
application/app_store_team_id=""
|
binary_format/embed_pck=true
|
||||||
application/code_sign_identity_debug=""
|
texture_format/bptc=true
|
||||||
application/export_method_debug=1
|
texture_format/s3tc=true
|
||||||
application/code_sign_identity_release=""
|
texture_format/etc=false
|
||||||
application/export_method_release=0
|
texture_format/etc2=false
|
||||||
application/targeted_device_family=2
|
binary_format/architecture="x86_64"
|
||||||
application/bundle_identifier=""
|
codesign/enable=false
|
||||||
application/signature=""
|
codesign/timestamp=true
|
||||||
application/short_version=""
|
codesign/timestamp_server_url=""
|
||||||
application/version=""
|
codesign/digest_algorithm=1
|
||||||
|
codesign/description=""
|
||||||
|
codesign/custom_options=PackedStringArray()
|
||||||
|
application/modify_resources=true
|
||||||
|
application/icon=""
|
||||||
|
application/console_wrapper_icon=""
|
||||||
application/icon_interpolation=4
|
application/icon_interpolation=4
|
||||||
application/launch_screens_interpolation=4
|
application/file_version=""
|
||||||
application/export_project_only=false
|
application/product_version=""
|
||||||
capabilities/access_wifi=false
|
application/company_name=""
|
||||||
capabilities/push_notifications=false
|
application/product_name=""
|
||||||
user_data/accessible_from_files_app=false
|
application/file_description=""
|
||||||
user_data/accessible_from_itunes_sharing=false
|
application/copyright=""
|
||||||
privacy/camera_usage_description=""
|
application/trademarks=""
|
||||||
privacy/camera_usage_description_localized={}
|
application/export_angle=0
|
||||||
privacy/microphone_usage_description=""
|
ssh_remote_deploy/enabled=false
|
||||||
privacy/microphone_usage_description_localized={}
|
ssh_remote_deploy/host="user@host_ip"
|
||||||
privacy/photolibrary_usage_description=""
|
ssh_remote_deploy/port="22"
|
||||||
privacy/photolibrary_usage_description_localized={}
|
ssh_remote_deploy/extra_args_ssh=""
|
||||||
icons/iphone_120x120=""
|
ssh_remote_deploy/extra_args_scp=""
|
||||||
icons/iphone_180x180=""
|
ssh_remote_deploy/run_script="Expand-Archive -LiteralPath '{temp_dir}\\{archive_name}' -DestinationPath '{temp_dir}'
|
||||||
icons/ipad_76x76=""
|
$action = New-ScheduledTaskAction -Execute '{temp_dir}\\{exe_name}' -Argument '{cmd_args}'
|
||||||
icons/ipad_152x152=""
|
$trigger = New-ScheduledTaskTrigger -Once -At 00:00
|
||||||
icons/ipad_167x167=""
|
$settings = New-ScheduledTaskSettingsSet
|
||||||
icons/app_store_1024x1024=""
|
$task = New-ScheduledTask -Action $action -Trigger $trigger -Settings $settings
|
||||||
icons/spotlight_40x40=""
|
Register-ScheduledTask godot_remote_debug -InputObject $task -Force:$true
|
||||||
icons/spotlight_80x80=""
|
Start-ScheduledTask -TaskName godot_remote_debug
|
||||||
icons/settings_58x58=""
|
while (Get-ScheduledTask -TaskName godot_remote_debug | ? State -eq running) { Start-Sleep -Milliseconds 100 }
|
||||||
icons/settings_87x87=""
|
Unregister-ScheduledTask -TaskName godot_remote_debug -Confirm:$false -ErrorAction:SilentlyContinue"
|
||||||
icons/notification_40x40=""
|
ssh_remote_deploy/cleanup_script="Stop-ScheduledTask -TaskName godot_remote_debug -ErrorAction:SilentlyContinue
|
||||||
icons/notification_60x60=""
|
Unregister-ScheduledTask -TaskName godot_remote_debug -Confirm:$false -ErrorAction:SilentlyContinue
|
||||||
storyboard/use_launch_screen_storyboard=true
|
Remove-Item -Recurse -Force '{temp_dir}'"
|
||||||
storyboard/image_scale_mode=0
|
dotnet/include_scripts_content=false
|
||||||
storyboard/custom_image@2x=""
|
dotnet/include_debug_symbols=true
|
||||||
storyboard/custom_image@3x=""
|
dotnet/embed_build_outputs=false
|
||||||
storyboard/use_custom_bg_color=false
|
|
||||||
storyboard/custom_bg_color=Color(0, 0, 0, 1)
|
[preset.1]
|
||||||
landscape_launch_screens/iphone_2436x1125=""
|
|
||||||
landscape_launch_screens/iphone_2208x1242=""
|
name="macOS"
|
||||||
landscape_launch_screens/ipad_1024x768=""
|
platform="macOS"
|
||||||
landscape_launch_screens/ipad_2048x1536=""
|
runnable=true
|
||||||
portrait_launch_screens/iphone_640x960=""
|
dedicated_server=false
|
||||||
portrait_launch_screens/iphone_640x1136=""
|
custom_features=""
|
||||||
portrait_launch_screens/iphone_750x1334=""
|
export_filter="all_resources"
|
||||||
portrait_launch_screens/iphone_1125x2436=""
|
include_filter=""
|
||||||
portrait_launch_screens/ipad_768x1024=""
|
exclude_filter=""
|
||||||
portrait_launch_screens/ipad_1536x2048=""
|
export_path="../../../Desktop/AceField.dmg"
|
||||||
portrait_launch_screens/iphone_1242x2208=""
|
encryption_include_filters=""
|
||||||
|
encryption_exclude_filters=""
|
||||||
|
encrypt_pck=false
|
||||||
|
encrypt_directory=false
|
||||||
|
|
||||||
|
[preset.1.options]
|
||||||
|
|
||||||
|
export/distribution_type=1
|
||||||
|
binary_format/architecture="universal"
|
||||||
|
custom_template/debug=""
|
||||||
|
custom_template/release=""
|
||||||
|
debug/export_console_wrapper=1
|
||||||
|
application/icon=""
|
||||||
|
application/icon_interpolation=4
|
||||||
|
application/bundle_identifier="dev.solsynth.experimental.acefield"
|
||||||
|
application/signature=""
|
||||||
|
application/app_category="Games"
|
||||||
|
application/short_version=""
|
||||||
|
application/version=""
|
||||||
|
application/copyright=""
|
||||||
|
application/copyright_localized={}
|
||||||
|
application/min_macos_version="10.12"
|
||||||
|
application/export_angle=0
|
||||||
|
display/high_res=true
|
||||||
|
xcode/platform_build="14C18"
|
||||||
|
xcode/sdk_version="13.1"
|
||||||
|
xcode/sdk_build="22C55"
|
||||||
|
xcode/sdk_name="macosx13.1"
|
||||||
|
xcode/xcode_version="1420"
|
||||||
|
xcode/xcode_build="14C18"
|
||||||
|
codesign/codesign=3
|
||||||
|
codesign/installer_identity=""
|
||||||
|
codesign/apple_team_id="W7HPZ53V6B"
|
||||||
|
codesign/identity=""
|
||||||
|
codesign/entitlements/custom_file=""
|
||||||
|
codesign/entitlements/allow_jit_code_execution=false
|
||||||
|
codesign/entitlements/allow_unsigned_executable_memory=false
|
||||||
|
codesign/entitlements/allow_dyld_environment_variables=false
|
||||||
|
codesign/entitlements/disable_library_validation=false
|
||||||
|
codesign/entitlements/audio_input=false
|
||||||
|
codesign/entitlements/camera=false
|
||||||
|
codesign/entitlements/location=false
|
||||||
|
codesign/entitlements/address_book=false
|
||||||
|
codesign/entitlements/calendars=false
|
||||||
|
codesign/entitlements/photos_library=false
|
||||||
|
codesign/entitlements/apple_events=false
|
||||||
|
codesign/entitlements/debugging=false
|
||||||
|
codesign/entitlements/app_sandbox/enabled=false
|
||||||
|
codesign/entitlements/app_sandbox/network_server=false
|
||||||
|
codesign/entitlements/app_sandbox/network_client=false
|
||||||
|
codesign/entitlements/app_sandbox/device_usb=false
|
||||||
|
codesign/entitlements/app_sandbox/device_bluetooth=false
|
||||||
|
codesign/entitlements/app_sandbox/files_downloads=0
|
||||||
|
codesign/entitlements/app_sandbox/files_pictures=0
|
||||||
|
codesign/entitlements/app_sandbox/files_music=0
|
||||||
|
codesign/entitlements/app_sandbox/files_movies=0
|
||||||
|
codesign/entitlements/app_sandbox/files_user_selected=0
|
||||||
|
codesign/entitlements/app_sandbox/helper_executables=[]
|
||||||
|
codesign/custom_options=PackedStringArray()
|
||||||
|
notarization/notarization=0
|
||||||
|
privacy/microphone_usage_description=""
|
||||||
|
privacy/microphone_usage_description_localized={}
|
||||||
|
privacy/camera_usage_description=""
|
||||||
|
privacy/camera_usage_description_localized={}
|
||||||
|
privacy/location_usage_description=""
|
||||||
|
privacy/location_usage_description_localized={}
|
||||||
|
privacy/address_book_usage_description=""
|
||||||
|
privacy/address_book_usage_description_localized={}
|
||||||
|
privacy/calendar_usage_description=""
|
||||||
|
privacy/calendar_usage_description_localized={}
|
||||||
|
privacy/photos_library_usage_description=""
|
||||||
|
privacy/photos_library_usage_description_localized={}
|
||||||
|
privacy/desktop_folder_usage_description=""
|
||||||
|
privacy/desktop_folder_usage_description_localized={}
|
||||||
|
privacy/documents_folder_usage_description=""
|
||||||
|
privacy/documents_folder_usage_description_localized={}
|
||||||
|
privacy/downloads_folder_usage_description=""
|
||||||
|
privacy/downloads_folder_usage_description_localized={}
|
||||||
|
privacy/network_volumes_usage_description=""
|
||||||
|
privacy/network_volumes_usage_description_localized={}
|
||||||
|
privacy/removable_volumes_usage_description=""
|
||||||
|
privacy/removable_volumes_usage_description_localized={}
|
||||||
|
ssh_remote_deploy/enabled=false
|
||||||
|
ssh_remote_deploy/host="user@host_ip"
|
||||||
|
ssh_remote_deploy/port="22"
|
||||||
|
ssh_remote_deploy/extra_args_ssh=""
|
||||||
|
ssh_remote_deploy/extra_args_scp=""
|
||||||
|
ssh_remote_deploy/run_script="#!/usr/bin/env bash
|
||||||
|
unzip -o -q \"{temp_dir}/{archive_name}\" -d \"{temp_dir}\"
|
||||||
|
open \"{temp_dir}/{exe_name}.app\" --args {cmd_args}"
|
||||||
|
ssh_remote_deploy/cleanup_script="#!/usr/bin/env bash
|
||||||
|
kill $(pgrep -x -f \"{temp_dir}/{exe_name}.app/Contents/MacOS/{exe_name} {cmd_args}\")
|
||||||
|
rm -rf \"{temp_dir}\""
|
||||||
dotnet/include_scripts_content=false
|
dotnet/include_scripts_content=false
|
||||||
dotnet/include_debug_symbols=true
|
dotnet/include_debug_symbols=true
|
||||||
dotnet/embed_build_outputs=false
|
dotnet/embed_build_outputs=false
|
||||||
|
@ -73,7 +73,6 @@ ui_leaderboard={
|
|||||||
|
|
||||||
[rendering]
|
[rendering]
|
||||||
|
|
||||||
renderer/rendering_method="mobile"
|
|
||||||
textures/vram_compression/import_etc2_astc=true
|
textures/vram_compression/import_etc2_astc=true
|
||||||
anti_aliasing/quality/msaa_2d=2
|
anti_aliasing/quality/msaa_2d=2
|
||||||
anti_aliasing/quality/screen_space_aa=1
|
anti_aliasing/quality/screen_space_aa=1
|
||||||
|
Loading…
Reference in New Issue
Block a user