From fdcdbdc30a43f218266c91676960069d4f0b2f78 Mon Sep 17 00:00:00 2001 From: yyc12345 Date: Sun, 28 Aug 2022 13:32:05 +0800 Subject: [PATCH] refactor proj and bring new design --- .gitattributes | 4 + .gitignore | 225 ++++++++++++- BallanceStalker.sln | 19 -- README.md | 3 + .../soundeffects/btn_click.wav.import | 21 -- .../styles/btn_small_style_deselect.tres | 11 - .../lineedit_borderless_style_deselect.tres | 11 - .../lineedit_borderless_style_select.tres | 11 - .../styles/lineedit_style_deselect.tres | 11 - .../hslider-grabber-deselect.png.import | 35 --- .../hslider-grabber-select.png.import | 35 --- .../textures/lineedit_deselect.png.import | 35 --- .../vscrollbar-grabber-deselect.png.import | 35 --- .../vscrollbar-grabber-select.png.import | 35 --- .../vscrollbar-scroll-deselect.png.import | 35 --- .../vscrollbar-scroll-select.png.import | 35 --- scenes/GameRoot.tscn | 17 - scenes/stages/ConsolePanel.tscn | 46 --- scenes/stages/MenuManager.tscn | 13 - scenes/user_interface/ButtonNormal.tscn | 21 -- scripts/GameRoot.cs | 52 --- scripts/stages/ConsolePanel.cs | 101 ------ scripts/stages/MenuManager.cs | 75 ----- scripts/stages/ShadowBall.cs | 231 -------------- scripts/stages/ShadowBallManager.cs | 44 --- scripts/stages/StalkerCamera.cs | 117 ------- scripts/stages/StalkerCore.cs | 20 -- scripts/stages/menus/MenuMain.cs | 34 -- scripts/stalker_core/LogManager.cs | 10 - scripts/stalker_core/StalkerManager.cs | 55 ---- scripts/user_interface/ButtonCommon.cs | 16 - scripts/user_interface/LabelConsole.cs | 39 --- .../BallanceStalker.csproj | 0 src/BallanceStalker.sln | 41 +++ src/debug_proj/debug_proj.csproj | 33 ++ project.godot => src/project.godot | 2 +- .../resources}/default_bus_layout.tres | 0 {resources => src/resources}/default_env.tres | 0 .../resources}/default_theme.tres | 26 +- .../fonts/font_SourceHanSansCN.tres | 0 .../resources}/fonts/font_SquarishSansCT.tres | 0 .../resources}/fonts/fontstyle_big.tres | 0 .../resources}/fonts/fontstyle_normal.tres | 0 src/resources/fonts/fontstyle_small.tres | 9 + {resources => src/resources}/icons/icon.png | Bin .../resources}/icons/icon.png.import | 0 {resources => src/resources}/skys/Sky_A.png | Bin .../resources}/skys/Sky_A.png.import | 0 {resources => src/resources}/skys/Sky_B.png | Bin .../resources}/skys/Sky_B.png.import | 0 {resources => src/resources}/skys/Sky_C.png | Bin .../resources}/skys/Sky_C.png.import | 0 {resources => src/resources}/skys/Sky_D.png | Bin .../resources}/skys/Sky_D.png.import | 0 {resources => src/resources}/skys/Sky_E.png | Bin .../resources}/skys/Sky_E.png.import | 0 {resources => src/resources}/skys/Sky_F.png | Bin .../resources}/skys/Sky_F.png.import | 0 {resources => src/resources}/skys/Sky_G.png | Bin .../resources}/skys/Sky_G.png.import | 0 {resources => src/resources}/skys/Sky_H.png | Bin .../resources}/skys/Sky_H.png.import | 0 {resources => src/resources}/skys/Sky_I.png | Bin .../resources}/skys/Sky_I.png.import | 0 {resources => src/resources}/skys/Sky_J.png | Bin .../resources}/skys/Sky_J.png.import | 0 {resources => src/resources}/skys/Sky_K.png | Bin .../resources}/skys/Sky_K.png.import | 0 {resources => src/resources}/skys/Sky_L.png | Bin .../resources}/skys/Sky_L.png.import | 0 .../resources/soundeffects/gui}/btn_click.wav | Bin .../soundeffects/gui/btn_click.wav.import | 21 ++ .../styles/gui/btn_small_style_deselect.tres | 11 + .../styles/gui}/btn_small_style_select.tres | 2 +- .../styles/gui}/btn_style_deselect.tres | 2 +- .../styles/gui}/btn_style_select.tres | 2 +- .../styles/gui}/hslider_style_slider.tres | 0 .../lineedit_borderless_style_deselect.tres | 7 + .../gui/lineedit_borderless_style_select.tres | 7 + .../styles/gui/lineedit_style_deselect.tres | 11 + .../styles/gui}/lineedit_style_select.tres | 2 +- .../textures/gui}/btn-small-deselect.png | Bin .../gui/btn-small-deselect.png.import | 35 +++ .../textures/gui}/btn-small-select.png | Bin .../textures/gui/btn-small-select.png.import | 35 +++ .../resources/textures/gui}/btn_deselect.png | Bin .../textures/gui}/btn_deselect.png.import | 6 +- .../resources/textures/gui}/btn_select.png | Bin .../textures/gui}/btn_select.png.import | 6 +- .../gui}/hslider-grabber-deselect.png | Bin .../gui/hslider-grabber-deselect.png.import | 35 +++ .../textures/gui}/hslider-grabber-select.png | Bin .../gui/hslider-grabber-select.png.import | 6 +- .../textures/gui}/hslider-slider.png | Bin .../textures/gui}/hslider-slider.png.import | 6 +- .../gui}/lineedit_borderless_deselect.png | Bin .../lineedit_borderless_deselect.png.import | 6 +- .../gui}/lineedit_borderless_select.png | Bin .../lineedit_borderless_select.png.import | 6 +- .../textures/gui}/lineedit_deselect.png | Bin .../textures/gui/lineedit_deselect.png.import | 35 +++ .../textures/gui}/lineedit_select.png | Bin .../textures/gui/lineedit_select.png.import | 35 +++ .../textures/gui}/player_pointer.png | Bin .../textures/gui}/player_pointer.png.import | 6 +- .../gui}/vscrollbar-grabber-deselect.png | Bin .../vscrollbar-grabber-deselect.png.import | 6 +- .../gui}/vscrollbar-grabber-select.png | Bin .../gui/vscrollbar-grabber-select.png.import | 35 +++ .../gui}/vscrollbar-scroll-deselect.png | Bin .../gui/vscrollbar-scroll-deselect.png.import | 6 +- .../gui}/vscrollbar-scroll-select.png | Bin .../gui/vscrollbar-scroll-select.png.import | 35 +++ src/scenes/StalkerBase.tscn | 17 + .../scenes/entities}/ShadowBall.tscn | 12 +- .../scenes/entities}/ShadowBallManager.tscn | 2 +- .../scenes/entities}/StalkerCamera.tscn | 2 +- .../scenes/entities}/StalkerCore.tscn | 6 +- src/scenes/gui/ConsolePanel.tscn | 37 +++ src/scenes/gui/MenuManager.tscn | 13 + src/scenes/gui/components/ButtonNormal.tscn | 21 ++ .../scenes/gui/components}/ButtonSmall.tscn | 8 +- .../scenes/gui/components}/LabelBig.tscn | 0 .../scenes/gui/components}/LabelNormal.tscn | 0 .../gui/components}/LineEditBorderless.tscn | 4 +- .../gui/components}/LineEditNormal.tscn | 4 +- .../scenes/gui}/menus/MenuMain.tscn | 4 +- .../scenes/gui/scroll_items/ConsoleText.tscn | 4 +- .../scenes}/levels/floor_top_Checkpoint.bmp | Bin .../levels/floor_top_Checkpoint.bmp.import | 0 {scenes => src/scenes}/levels/test.escn | 295 ++++++++++-------- .../scenes}/levels/test.escn.import | 0 src/scripts/cores/BStalkerContext.cs | 28 ++ .../scripts/cores/bmmo}/BmmoClient.cs | 5 +- src/scripts/cores/managers/LogManager.cs | 82 +++++ src/scripts/cores/managers/StorageManager.cs | 70 +++++ src/scripts/cores/utils/CmdLexer.cs | 182 +++++++++++ src/scripts/cores/utils/StringHelper.cs | 21 ++ src/scripts/scenes/StalkerBase.cs | 80 +++++ src/scripts/scenes/entities/ShadowBall.cs | 231 ++++++++++++++ .../scenes/entities/ShadowBallManager.cs | 48 +++ src/scripts/scenes/entities/StalkerCamera.cs | 106 +++++++ src/scripts/scenes/entities/StalkerCore.cs | 14 + src/scripts/scenes/gui/ConsolePanel.cs | 140 +++++++++ src/scripts/scenes/gui/MenuManager.cs | 66 ++++ .../scenes/gui/components/ButtonCommon.cs | 19 ++ src/scripts/scenes/gui/menus/MenuMain.cs | 36 +++ .../scenes/gui/scroll_items/ConsoleText.cs | 26 ++ .../scenes}/utils/GodotPollutedObject.cs | 2 +- src/scripts/scenes/utils/MathHelper.cs | 14 + src/scripts/scenes/utils/SceneHelper.cs | 14 + 151 files changed, 2118 insertions(+), 1422 deletions(-) create mode 100644 .gitattributes delete mode 100644 BallanceStalker.sln create mode 100644 README.md delete mode 100644 resources/user_interface/soundeffects/btn_click.wav.import delete mode 100644 resources/user_interface/styles/btn_small_style_deselect.tres delete mode 100644 resources/user_interface/styles/lineedit_borderless_style_deselect.tres delete mode 100644 resources/user_interface/styles/lineedit_borderless_style_select.tres delete mode 100644 resources/user_interface/styles/lineedit_style_deselect.tres delete mode 100644 resources/user_interface/textures/hslider-grabber-deselect.png.import delete mode 100644 resources/user_interface/textures/hslider-grabber-select.png.import delete mode 100644 resources/user_interface/textures/lineedit_deselect.png.import delete mode 100644 resources/user_interface/textures/vscrollbar-grabber-deselect.png.import delete mode 100644 resources/user_interface/textures/vscrollbar-grabber-select.png.import delete mode 100644 resources/user_interface/textures/vscrollbar-scroll-deselect.png.import delete mode 100644 resources/user_interface/textures/vscrollbar-scroll-select.png.import delete mode 100644 scenes/GameRoot.tscn delete mode 100644 scenes/stages/ConsolePanel.tscn delete mode 100644 scenes/stages/MenuManager.tscn delete mode 100644 scenes/user_interface/ButtonNormal.tscn delete mode 100644 scripts/GameRoot.cs delete mode 100644 scripts/stages/ConsolePanel.cs delete mode 100644 scripts/stages/MenuManager.cs delete mode 100644 scripts/stages/ShadowBall.cs delete mode 100644 scripts/stages/ShadowBallManager.cs delete mode 100644 scripts/stages/StalkerCamera.cs delete mode 100644 scripts/stages/StalkerCore.cs delete mode 100644 scripts/stages/menus/MenuMain.cs delete mode 100644 scripts/stalker_core/LogManager.cs delete mode 100644 scripts/stalker_core/StalkerManager.cs delete mode 100644 scripts/user_interface/ButtonCommon.cs delete mode 100644 scripts/user_interface/LabelConsole.cs rename BallanceStalker.csproj => src/BallanceStalker.csproj (100%) create mode 100644 src/BallanceStalker.sln create mode 100644 src/debug_proj/debug_proj.csproj rename project.godot => src/project.godot (99%) rename {resources => src/resources}/default_bus_layout.tres (100%) rename {resources => src/resources}/default_env.tres (100%) rename {resources/user_interface => src/resources}/default_theme.tres (66%) rename {resources => src/resources}/fonts/font_SourceHanSansCN.tres (100%) rename {resources => src/resources}/fonts/font_SquarishSansCT.tres (100%) rename {resources => src/resources}/fonts/fontstyle_big.tres (100%) rename {resources => src/resources}/fonts/fontstyle_normal.tres (100%) create mode 100644 src/resources/fonts/fontstyle_small.tres rename {resources => src/resources}/icons/icon.png (100%) rename {resources => src/resources}/icons/icon.png.import (100%) rename {resources => src/resources}/skys/Sky_A.png (100%) rename {resources => src/resources}/skys/Sky_A.png.import (100%) rename {resources => src/resources}/skys/Sky_B.png (100%) rename {resources => src/resources}/skys/Sky_B.png.import (100%) rename {resources => src/resources}/skys/Sky_C.png (100%) rename {resources => src/resources}/skys/Sky_C.png.import (100%) rename {resources => src/resources}/skys/Sky_D.png (100%) rename {resources => src/resources}/skys/Sky_D.png.import (100%) rename {resources => src/resources}/skys/Sky_E.png (100%) rename {resources => src/resources}/skys/Sky_E.png.import (100%) rename {resources => src/resources}/skys/Sky_F.png (100%) rename {resources => src/resources}/skys/Sky_F.png.import (100%) rename {resources => src/resources}/skys/Sky_G.png (100%) rename {resources => src/resources}/skys/Sky_G.png.import (100%) rename {resources => src/resources}/skys/Sky_H.png (100%) rename {resources => src/resources}/skys/Sky_H.png.import (100%) rename {resources => src/resources}/skys/Sky_I.png (100%) rename {resources => src/resources}/skys/Sky_I.png.import (100%) rename {resources => src/resources}/skys/Sky_J.png (100%) rename {resources => src/resources}/skys/Sky_J.png.import (100%) rename {resources => src/resources}/skys/Sky_K.png (100%) rename {resources => src/resources}/skys/Sky_K.png.import (100%) rename {resources => src/resources}/skys/Sky_L.png (100%) rename {resources => src/resources}/skys/Sky_L.png.import (100%) rename {resources/user_interface/soundeffects => src/resources/soundeffects/gui}/btn_click.wav (100%) create mode 100644 src/resources/soundeffects/gui/btn_click.wav.import create mode 100644 src/resources/styles/gui/btn_small_style_deselect.tres rename {resources/user_interface/styles => src/resources/styles/gui}/btn_small_style_select.tres (68%) rename {resources/user_interface/styles => src/resources/styles/gui}/btn_style_deselect.tres (69%) rename {resources/user_interface/styles => src/resources/styles/gui}/btn_style_select.tres (69%) rename {resources/user_interface/styles => src/resources/styles/gui}/hslider_style_slider.tres (100%) create mode 100644 src/resources/styles/gui/lineedit_borderless_style_deselect.tres create mode 100644 src/resources/styles/gui/lineedit_borderless_style_select.tres create mode 100644 src/resources/styles/gui/lineedit_style_deselect.tres rename {resources/user_interface/styles => src/resources/styles/gui}/lineedit_style_select.tres (68%) rename {resources/user_interface/textures => src/resources/textures/gui}/btn-small-deselect.png (100%) create mode 100644 src/resources/textures/gui/btn-small-deselect.png.import rename {resources/user_interface/textures => src/resources/textures/gui}/btn-small-select.png (100%) create mode 100644 src/resources/textures/gui/btn-small-select.png.import rename {resources/user_interface/textures => src/resources/textures/gui}/btn_deselect.png (100%) rename {resources/user_interface/textures => src/resources/textures/gui}/btn_deselect.png.import (68%) rename {resources/user_interface/textures => src/resources/textures/gui}/btn_select.png (100%) rename {resources/user_interface/textures => src/resources/textures/gui}/btn_select.png.import (68%) rename {resources/user_interface/textures => src/resources/textures/gui}/hslider-grabber-deselect.png (100%) create mode 100644 src/resources/textures/gui/hslider-grabber-deselect.png.import rename {resources/user_interface/textures => src/resources/textures/gui}/hslider-grabber-select.png (100%) rename resources/user_interface/textures/btn-small-deselect.png.import => src/resources/textures/gui/hslider-grabber-select.png.import (66%) rename {resources/user_interface/textures => src/resources/textures/gui}/hslider-slider.png (100%) rename {resources/user_interface/textures => src/resources/textures/gui}/hslider-slider.png.import (67%) rename {resources/user_interface/textures => src/resources/textures/gui}/lineedit_borderless_deselect.png (100%) rename {resources/user_interface/textures => src/resources/textures/gui}/lineedit_borderless_deselect.png.import (63%) rename {resources/user_interface/textures => src/resources/textures/gui}/lineedit_borderless_select.png (100%) rename {resources/user_interface/textures => src/resources/textures/gui}/lineedit_borderless_select.png.import (64%) rename {resources/user_interface/textures => src/resources/textures/gui}/lineedit_deselect.png (100%) create mode 100644 src/resources/textures/gui/lineedit_deselect.png.import rename {resources/user_interface/textures => src/resources/textures/gui}/lineedit_select.png (100%) create mode 100644 src/resources/textures/gui/lineedit_select.png.import rename {resources/user_interface => src/resources/textures/gui}/player_pointer.png (100%) rename {resources/user_interface => src/resources/textures/gui}/player_pointer.png.import (68%) rename {resources/user_interface/textures => src/resources/textures/gui}/vscrollbar-grabber-deselect.png (100%) rename resources/user_interface/textures/btn-small-select.png.import => src/resources/textures/gui/vscrollbar-grabber-deselect.png.import (66%) rename {resources/user_interface/textures => src/resources/textures/gui}/vscrollbar-grabber-select.png (100%) create mode 100644 src/resources/textures/gui/vscrollbar-grabber-select.png.import rename {resources/user_interface/textures => src/resources/textures/gui}/vscrollbar-scroll-deselect.png (100%) rename resources/user_interface/textures/lineedit_select.png.import => src/resources/textures/gui/vscrollbar-scroll-deselect.png.import (66%) rename {resources/user_interface/textures => src/resources/textures/gui}/vscrollbar-scroll-select.png (100%) create mode 100644 src/resources/textures/gui/vscrollbar-scroll-select.png.import create mode 100644 src/scenes/StalkerBase.tscn rename {scenes/stages => src/scenes/entities}/ShadowBall.tscn (99%) rename {scenes/stages => src/scenes/entities}/ShadowBallManager.tscn (54%) rename {scenes/stages => src/scenes/entities}/StalkerCamera.tscn (80%) rename {scenes/stages => src/scenes/entities}/StalkerCore.tscn (68%) create mode 100644 src/scenes/gui/ConsolePanel.tscn create mode 100644 src/scenes/gui/MenuManager.tscn create mode 100644 src/scenes/gui/components/ButtonNormal.tscn rename {scenes/user_interface => src/scenes/gui/components}/ButtonSmall.tscn (57%) rename {scenes/user_interface => src/scenes/gui/components}/LabelBig.tscn (100%) rename {scenes/user_interface => src/scenes/gui/components}/LabelNormal.tscn (100%) rename {scenes/user_interface => src/scenes/gui/components}/LineEditBorderless.tscn (60%) rename {scenes/user_interface => src/scenes/gui/components}/LineEditNormal.tscn (62%) rename {scenes/stages => src/scenes/gui}/menus/MenuMain.tscn (90%) rename scenes/user_interface/LabelConsole.tscn => src/scenes/gui/scroll_items/ConsoleText.tscn (69%) rename {scenes => src/scenes}/levels/floor_top_Checkpoint.bmp (100%) rename {scenes => src/scenes}/levels/floor_top_Checkpoint.bmp.import (100%) rename {scenes => src/scenes}/levels/test.escn (99%) rename {scenes => src/scenes}/levels/test.escn.import (100%) create mode 100644 src/scripts/cores/BStalkerContext.cs rename {scripts/stalker_core => src/scripts/cores/bmmo}/BmmoClient.cs (96%) create mode 100644 src/scripts/cores/managers/LogManager.cs create mode 100644 src/scripts/cores/managers/StorageManager.cs create mode 100644 src/scripts/cores/utils/CmdLexer.cs create mode 100644 src/scripts/cores/utils/StringHelper.cs create mode 100644 src/scripts/scenes/StalkerBase.cs create mode 100644 src/scripts/scenes/entities/ShadowBall.cs create mode 100644 src/scripts/scenes/entities/ShadowBallManager.cs create mode 100644 src/scripts/scenes/entities/StalkerCamera.cs create mode 100644 src/scripts/scenes/entities/StalkerCore.cs create mode 100644 src/scripts/scenes/gui/ConsolePanel.cs create mode 100644 src/scripts/scenes/gui/MenuManager.cs create mode 100644 src/scripts/scenes/gui/components/ButtonCommon.cs create mode 100644 src/scripts/scenes/gui/menus/MenuMain.cs create mode 100644 src/scripts/scenes/gui/scroll_items/ConsoleText.cs rename {scripts => src/scripts/scenes}/utils/GodotPollutedObject.cs (91%) create mode 100644 src/scripts/scenes/utils/MathHelper.cs create mode 100644 src/scripts/scenes/utils/SceneHelper.cs diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..755039b --- /dev/null +++ b/.gitattributes @@ -0,0 +1,4 @@ +*.import eol=lf +*.tscn eol=lf +*.godot eol=lf +*.tres eol=lf diff --git a/.gitignore b/.gitignore index 4344faa..118bc60 100644 --- a/.gitignore +++ b/.gitignore @@ -1,7 +1,7 @@ # my own ban -resources/fonts/*.otf -resources/fonts/*.ttf -resources/textures +src/resources/fonts/*.otf +src/resources/fonts/*.ttf +src/resources/textures/ballance # Godot-specific ignores .import/ @@ -15,3 +15,222 @@ export_presets.cfg .mono/ data_*/ .vs/ + +## ------------------------Visual Studio normal settings--------------------------------------- +## Ignore Visual Studio build files, cache files, and rubbish files. + +# Windows +Thumbs.db +ehthumbs.db +Desktop.ini + +# User-specific files +*.suo +*.user +*.userosscache +*.sln.docstates + +# User-specific files (MonoDevelop/Xamarin Studio) +*.userprefs + +# Visual Studio 2015 cache/options directory +.vs/ + +# Build result +[Dd]ebug/ +[Dd]ebugPublic/ +[Rr]elease/ +[Rr]eleases/ +x64/ +x86/ +build/ +bld/ +[Bb]in/ +[Oo]bj/ + +# MSTest test Results +[Tt]est[Rr]esult*/ +[Bb]uild[Ll]og.* + +# NUNIT +*.VisualState.xml +TestResult.xml + +# Build Results of an ATL Project +[Dd]ebugPS/ +[Rr]eleasePS/ +dlldata.c + +# DNX +project.lock.json +artifacts/ + +*_i.c +*_p.c +*_i.h +*.ilk +*.meta +*.obj +*.pch +*.pdb +*.pgc +*.pgd +*.rsp +*.sbr +*.tlb +*.tli +*.tlh +*.tmp +*.tmp_proj +*.log +*.vspscc +*.vssscc +.builds +*.pidb +*.svclog +*.scc + +# Chutzpah Test files +_Chutzpah* + +# Visual C++ cache files +ipch/ +*.aps +*.ncb +*.opensdf +*.sdf +*.cachefile + +# Visual Studio profiler +*.psess +*.vsp +*.vspx + +# TFS 2012 Local Workspace +$tf/ + +# Guidance Automation Toolkit +*.gpState + +# ReSharper is a .NET coding add-in +_ReSharper*/ +*.[Rr]e[Ss]harper +*.DotSettings.user + +# JustCode is a .NET coding add-in +.JustCode + +# TeamCity is a build add-in +_TeamCity* + +# DotCover is a Code Coverage Tool +*.dotCover + +# NCrunch +_NCrunch_* +.*crunch*.local.xml + +# MightyMoose +*.mm.* +AutoTest.Net/ + +# Web workbench (sass) +.sass-cache/ + +# Installshield output folder +[Ee]xpress/ + +# DocProject is a documentation generator add-in +DocProject/buildhelp/ +DocProject/Help/*.HxT +DocProject/Help/*.HxC +DocProject/Help/*.hhc +DocProject/Help/*.hhk +DocProject/Help/*.hhp +DocProject/Help/Html2 +DocProject/Help/html + +# Click-Once directory +publish/ + +# Publish Web Output +*.[Pp]ublish.xml +*.azurePubxml +## TODO: Comment the next line if you want to checkin your +## web deploy settings but do note that will include unencrypted +## passwords +#*.pubxml + +*.publishproj + +# NuGet Packages +*.nupkg +# The packages folder can be ignored because of Package Restore +**/packages/* +# except build/, which is used as an MSBuild target. +!**/packages/build/ +# Uncomment if necessary however generally it will be regenerated when needed +#!**/packages/repositories.config + +# Windows Azure Build Output +csx/ +*.build.csdef + +# Windows Store app package directory +AppPackages/ + +# Visual Studio cache files +# files ending in .cache can be ignored +*.[Cc]ache +# but keep track of directories ending in .cache +!*.[Cc]ache/ + +# Others +ClientBin/ +[Ss]tyle[Cc]op.* +~$* +*~ +*.dbmdl +*.dbproj.schemaview +*.pfx +*.publishsettings +node_modules/ +orleans.codegen.cs + +# RIA/Silverlight projects +Generated_Code/ + +# Backup & report files from converting an old project file +# to a newer Visual Studio version. Backup files are not needed, +# because we have git ;-) +_UpgradeReport_Files/ +Backup*/ +UpgradeLog*.XML +UpgradeLog*.htm + +# SQL Server files +*.mdf +*.ldf + +# Business Intelligence projects +*.rdl.data +*.bim.layout +*.bim_*.settings + +# Microsoft Fakes +FakesAssemblies/ + +# Node.js Tools for Visual Studio +.ntvs_analysis.dat + +# Visual Studio 6 build log +*.plg + +# Visual Studio 6 workspace options file +*.opt + +# LightSwitch generated files +GeneratedArtifacts/ +_Pvt_Extensions/ +ModelManifest.xml + diff --git a/BallanceStalker.sln b/BallanceStalker.sln deleted file mode 100644 index 61fe2b7..0000000 --- a/BallanceStalker.sln +++ /dev/null @@ -1,19 +0,0 @@ -Microsoft Visual Studio Solution File, Format Version 12.00 -# Visual Studio 2012 -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "BallanceStalker", "BallanceStalker.csproj", "{55B5D158-D2E5-4A32-9C96-5878BD379AD3}" -EndProject -Global - GlobalSection(SolutionConfigurationPlatforms) = preSolution - Debug|Any CPU = Debug|Any CPU - ExportDebug|Any CPU = ExportDebug|Any CPU - ExportRelease|Any CPU = ExportRelease|Any CPU - EndGlobalSection - GlobalSection(ProjectConfigurationPlatforms) = postSolution - {55B5D158-D2E5-4A32-9C96-5878BD379AD3}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {55B5D158-D2E5-4A32-9C96-5878BD379AD3}.Debug|Any CPU.Build.0 = Debug|Any CPU - {55B5D158-D2E5-4A32-9C96-5878BD379AD3}.ExportDebug|Any CPU.ActiveCfg = ExportDebug|Any CPU - {55B5D158-D2E5-4A32-9C96-5878BD379AD3}.ExportDebug|Any CPU.Build.0 = ExportDebug|Any CPU - {55B5D158-D2E5-4A32-9C96-5878BD379AD3}.ExportRelease|Any CPU.ActiveCfg = ExportRelease|Any CPU - {55B5D158-D2E5-4A32-9C96-5878BD379AD3}.ExportRelease|Any CPU.Build.0 = ExportRelease|Any CPU - EndGlobalSection -EndGlobal diff --git a/README.md b/README.md new file mode 100644 index 0000000..044e046 --- /dev/null +++ b/README.md @@ -0,0 +1,3 @@ +# BallanceStalker + +A software created by a sad and withered person. diff --git a/resources/user_interface/soundeffects/btn_click.wav.import b/resources/user_interface/soundeffects/btn_click.wav.import deleted file mode 100644 index 95b779f..0000000 --- a/resources/user_interface/soundeffects/btn_click.wav.import +++ /dev/null @@ -1,21 +0,0 @@ -[remap] - -importer="wav" -type="AudioStreamSample" -path="res://.import/btn_click.wav-10bd4155242a075bd68a0c5c45b66a23.sample" - -[deps] - -source_file="res://resources/user_interface/soundeffects/btn_click.wav" -dest_files=[ "res://.import/btn_click.wav-10bd4155242a075bd68a0c5c45b66a23.sample" ] - -[params] - -force/8_bit=false -force/mono=false -force/max_rate=false -force/max_rate_hz=44100 -edit/trim=false -edit/normalize=false -edit/loop=false -compress/mode=0 diff --git a/resources/user_interface/styles/btn_small_style_deselect.tres b/resources/user_interface/styles/btn_small_style_deselect.tres deleted file mode 100644 index 99fe46c..0000000 --- a/resources/user_interface/styles/btn_small_style_deselect.tres +++ /dev/null @@ -1,11 +0,0 @@ -[gd_resource type="StyleBoxTexture" load_steps=2 format=2] - -[ext_resource path="res://resources/user_interface/textures/btn-small-deselect.png" type="Texture" id=1] - -[resource] -texture = ExtResource( 1 ) -region_rect = Rect2( 0, 0, 64, 32 ) -margin_left = 14.1409 -margin_right = 12.785 -margin_top = 13.5598 -margin_bottom = 13.3661 diff --git a/resources/user_interface/styles/lineedit_borderless_style_deselect.tres b/resources/user_interface/styles/lineedit_borderless_style_deselect.tres deleted file mode 100644 index bd998e6..0000000 --- a/resources/user_interface/styles/lineedit_borderless_style_deselect.tres +++ /dev/null @@ -1,11 +0,0 @@ -[gd_resource type="StyleBoxTexture" load_steps=2 format=2] - -[ext_resource path="res://resources/user_interface/textures/lineedit_borderless_deselect.png" type="Texture" id=1] - -[resource] -texture = ExtResource( 1 ) -region_rect = Rect2( 0, 0, 64, 32 ) -margin_left = 14.1409 -margin_right = 12.785 -margin_top = 13.5598 -margin_bottom = 13.3661 diff --git a/resources/user_interface/styles/lineedit_borderless_style_select.tres b/resources/user_interface/styles/lineedit_borderless_style_select.tres deleted file mode 100644 index 8738faa..0000000 --- a/resources/user_interface/styles/lineedit_borderless_style_select.tres +++ /dev/null @@ -1,11 +0,0 @@ -[gd_resource type="StyleBoxTexture" load_steps=2 format=2] - -[ext_resource path="res://resources/user_interface/textures/lineedit_borderless_select.png" type="Texture" id=1] - -[resource] -texture = ExtResource( 1 ) -region_rect = Rect2( 0, 0, 64, 32 ) -margin_left = 14.1409 -margin_right = 12.785 -margin_top = 13.5598 -margin_bottom = 13.3661 diff --git a/resources/user_interface/styles/lineedit_style_deselect.tres b/resources/user_interface/styles/lineedit_style_deselect.tres deleted file mode 100644 index 6bb4551..0000000 --- a/resources/user_interface/styles/lineedit_style_deselect.tres +++ /dev/null @@ -1,11 +0,0 @@ -[gd_resource type="StyleBoxTexture" load_steps=2 format=2] - -[ext_resource path="res://resources/user_interface/textures/lineedit_deselect.png" type="Texture" id=1] - -[resource] -texture = ExtResource( 1 ) -region_rect = Rect2( 0, 0, 64, 32 ) -margin_left = 14.1409 -margin_right = 12.785 -margin_top = 13.5598 -margin_bottom = 13.3661 diff --git a/resources/user_interface/textures/hslider-grabber-deselect.png.import b/resources/user_interface/textures/hslider-grabber-deselect.png.import deleted file mode 100644 index c5ea48b..0000000 --- a/resources/user_interface/textures/hslider-grabber-deselect.png.import +++ /dev/null @@ -1,35 +0,0 @@ -[remap] - -importer="texture" -type="StreamTexture" -path="res://.import/hslider-grabber-deselect.png-dbd5e229e735b61fac88b8a1fde9e3d5.stex" -metadata={ -"vram_texture": false -} - -[deps] - -source_file="res://resources/user_interface/textures/hslider-grabber-deselect.png" -dest_files=[ "res://.import/hslider-grabber-deselect.png-dbd5e229e735b61fac88b8a1fde9e3d5.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=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=false -svg/scale=1.0 diff --git a/resources/user_interface/textures/hslider-grabber-select.png.import b/resources/user_interface/textures/hslider-grabber-select.png.import deleted file mode 100644 index b83d558..0000000 --- a/resources/user_interface/textures/hslider-grabber-select.png.import +++ /dev/null @@ -1,35 +0,0 @@ -[remap] - -importer="texture" -type="StreamTexture" -path="res://.import/hslider-grabber-select.png-7673e5df914571ff3de950ffc32eb49c.stex" -metadata={ -"vram_texture": false -} - -[deps] - -source_file="res://resources/user_interface/textures/hslider-grabber-select.png" -dest_files=[ "res://.import/hslider-grabber-select.png-7673e5df914571ff3de950ffc32eb49c.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=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=false -svg/scale=1.0 diff --git a/resources/user_interface/textures/lineedit_deselect.png.import b/resources/user_interface/textures/lineedit_deselect.png.import deleted file mode 100644 index dc21aa1..0000000 --- a/resources/user_interface/textures/lineedit_deselect.png.import +++ /dev/null @@ -1,35 +0,0 @@ -[remap] - -importer="texture" -type="StreamTexture" -path="res://.import/lineedit_deselect.png-45991e7209bc02828712ac76f58e16af.stex" -metadata={ -"vram_texture": false -} - -[deps] - -source_file="res://resources/user_interface/textures/lineedit_deselect.png" -dest_files=[ "res://.import/lineedit_deselect.png-45991e7209bc02828712ac76f58e16af.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=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=false -svg/scale=1.0 diff --git a/resources/user_interface/textures/vscrollbar-grabber-deselect.png.import b/resources/user_interface/textures/vscrollbar-grabber-deselect.png.import deleted file mode 100644 index 4ca655a..0000000 --- a/resources/user_interface/textures/vscrollbar-grabber-deselect.png.import +++ /dev/null @@ -1,35 +0,0 @@ -[remap] - -importer="texture" -type="StreamTexture" -path="res://.import/vscrollbar-grabber-deselect.png-41f1392911c0d83776adf73235c234f7.stex" -metadata={ -"vram_texture": false -} - -[deps] - -source_file="res://resources/user_interface/textures/vscrollbar-grabber-deselect.png" -dest_files=[ "res://.import/vscrollbar-grabber-deselect.png-41f1392911c0d83776adf73235c234f7.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=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=false -svg/scale=1.0 diff --git a/resources/user_interface/textures/vscrollbar-grabber-select.png.import b/resources/user_interface/textures/vscrollbar-grabber-select.png.import deleted file mode 100644 index df18412..0000000 --- a/resources/user_interface/textures/vscrollbar-grabber-select.png.import +++ /dev/null @@ -1,35 +0,0 @@ -[remap] - -importer="texture" -type="StreamTexture" -path="res://.import/vscrollbar-grabber-select.png-72f3de637b203963d3a8fc9ea0b65abf.stex" -metadata={ -"vram_texture": false -} - -[deps] - -source_file="res://resources/user_interface/textures/vscrollbar-grabber-select.png" -dest_files=[ "res://.import/vscrollbar-grabber-select.png-72f3de637b203963d3a8fc9ea0b65abf.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=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=false -svg/scale=1.0 diff --git a/resources/user_interface/textures/vscrollbar-scroll-deselect.png.import b/resources/user_interface/textures/vscrollbar-scroll-deselect.png.import deleted file mode 100644 index aacd4f3..0000000 --- a/resources/user_interface/textures/vscrollbar-scroll-deselect.png.import +++ /dev/null @@ -1,35 +0,0 @@ -[remap] - -importer="texture" -type="StreamTexture" -path="res://.import/vscrollbar-scroll-deselect.png-211048eb599996b436cb2b45ed32482b.stex" -metadata={ -"vram_texture": false -} - -[deps] - -source_file="res://resources/user_interface/textures/vscrollbar-scroll-deselect.png" -dest_files=[ "res://.import/vscrollbar-scroll-deselect.png-211048eb599996b436cb2b45ed32482b.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=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=false -svg/scale=1.0 diff --git a/resources/user_interface/textures/vscrollbar-scroll-select.png.import b/resources/user_interface/textures/vscrollbar-scroll-select.png.import deleted file mode 100644 index 8495537..0000000 --- a/resources/user_interface/textures/vscrollbar-scroll-select.png.import +++ /dev/null @@ -1,35 +0,0 @@ -[remap] - -importer="texture" -type="StreamTexture" -path="res://.import/vscrollbar-scroll-select.png-0642361f149185c68fc0158fd364aa8b.stex" -metadata={ -"vram_texture": false -} - -[deps] - -source_file="res://resources/user_interface/textures/vscrollbar-scroll-select.png" -dest_files=[ "res://.import/vscrollbar-scroll-select.png-0642361f149185c68fc0158fd364aa8b.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=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=false -svg/scale=1.0 diff --git a/scenes/GameRoot.tscn b/scenes/GameRoot.tscn deleted file mode 100644 index 14fd0ad..0000000 --- a/scenes/GameRoot.tscn +++ /dev/null @@ -1,17 +0,0 @@ -[gd_scene load_steps=5 format=2] - -[ext_resource path="res://scenes/stages/MenuManager.tscn" type="PackedScene" id=1] -[ext_resource path="res://scenes/stages/StalkerCore.tscn" type="PackedScene" id=2] -[ext_resource path="res://scripts/GameRoot.cs" type="Script" id=3] -[ext_resource path="res://scenes/stages/ConsolePanel.tscn" type="PackedScene" id=4] - -[node name="GameRoot" type="Node"] -script = ExtResource( 3 ) - -[node name="ConsolePanel" parent="." instance=ExtResource( 4 )] -visible = false - -[node name="MenuManager" parent="." instance=ExtResource( 1 )] -visible = false - -[node name="StalkerCore" parent="." instance=ExtResource( 2 )] diff --git a/scenes/stages/ConsolePanel.tscn b/scenes/stages/ConsolePanel.tscn deleted file mode 100644 index 10ee439..0000000 --- a/scenes/stages/ConsolePanel.tscn +++ /dev/null @@ -1,46 +0,0 @@ -[gd_scene load_steps=4 format=2] - -[ext_resource path="res://scenes/user_interface/LineEditBorderless.tscn" type="PackedScene" id=1] -[ext_resource path="res://scripts/stages/ConsolePanel.cs" type="Script" id=2] -[ext_resource path="res://resources/user_interface/default_theme.tres" type="Theme" id=3] - -[node name="ConsolePanel" type="Control"] -anchor_right = 1.0 -anchor_bottom = 1.0 -theme = ExtResource( 3 ) -script = ExtResource( 2 ) - -[node name="CommandInput" parent="." instance=ExtResource( 1 )] -anchor_top = 1.0 -anchor_right = 1.0 -anchor_bottom = 1.0 -margin_top = -44.0 -margin_right = 0.0 -margin_bottom = 0.0 -size_flags_vertical = 3 -placeholder_text = "Input your command here..." -placeholder_alpha = 0.3 -caret_blink = true - -[node name="ScrollSet" type="Control" parent="."] -anchor_right = 1.0 -anchor_bottom = 1.0 -margin_top = 24.0 -margin_right = -48.0 -margin_bottom = -64.0 - -[node name="ScrollBackground" type="ColorRect" parent="ScrollSet"] -anchor_right = 1.0 -anchor_bottom = 1.0 -color = Color( 0, 0, 0, 0.498039 ) - -[node name="Scrollbar" type="ScrollContainer" parent="ScrollSet"] -anchor_right = 1.0 -anchor_bottom = 1.0 -scroll_horizontal_enabled = false - -[node name="MessageContainer" type="VBoxContainer" parent="ScrollSet/Scrollbar"] -margin_right = 976.0 -margin_bottom = 680.0 -size_flags_horizontal = 3 -size_flags_vertical = 3 diff --git a/scenes/stages/MenuManager.tscn b/scenes/stages/MenuManager.tscn deleted file mode 100644 index c391f8e..0000000 --- a/scenes/stages/MenuManager.tscn +++ /dev/null @@ -1,13 +0,0 @@ -[gd_scene load_steps=4 format=2] - -[ext_resource path="res://resources/user_interface/default_theme.tres" type="Theme" id=1] -[ext_resource path="res://scenes/stages/menus/MenuMain.tscn" type="PackedScene" id=2] -[ext_resource path="res://scripts/stages/MenuManager.cs" type="Script" id=3] - -[node name="MenuManager" type="Control"] -anchor_right = 1.0 -anchor_bottom = 1.0 -theme = ExtResource( 1 ) -script = ExtResource( 3 ) - -[node name="MenuMain" parent="." instance=ExtResource( 2 )] diff --git a/scenes/user_interface/ButtonNormal.tscn b/scenes/user_interface/ButtonNormal.tscn deleted file mode 100644 index c2391d9..0000000 --- a/scenes/user_interface/ButtonNormal.tscn +++ /dev/null @@ -1,21 +0,0 @@ -[gd_scene load_steps=6 format=2] - -[ext_resource path="res://resources/user_interface/styles/btn_style_select.tres" type="StyleBox" id=1] -[ext_resource path="res://resources/user_interface/styles/btn_style_deselect.tres" type="StyleBox" id=2] -[ext_resource path="res://resources/fonts/fontstyle_normal.tres" type="DynamicFont" id=3] -[ext_resource path="res://scripts/user_interface/ButtonCommon.cs" type="Script" id=4] -[ext_resource path="res://resources/user_interface/soundeffects/btn_click.wav" type="AudioStream" id=5] - -[node name="ButtonNormal" type="Button"] -margin_right = 12.0 -margin_bottom = 20.0 -custom_fonts/font = ExtResource( 3 ) -custom_styles/hover = ExtResource( 1 ) -custom_styles/pressed = ExtResource( 1 ) -custom_styles/focus = ExtResource( 1 ) -custom_styles/disabled = ExtResource( 2 ) -custom_styles/normal = ExtResource( 2 ) -script = ExtResource( 4 ) - -[node name="AudioClick" type="AudioStreamPlayer" parent="."] -stream = ExtResource( 5 ) diff --git a/scripts/GameRoot.cs b/scripts/GameRoot.cs deleted file mode 100644 index 8fe66f0..0000000 --- a/scripts/GameRoot.cs +++ /dev/null @@ -1,52 +0,0 @@ -using Godot; -using System; - -public class GameRoot : Node { - - MenuManager mMenuManager; - StalkerCore mStalkerCore; - - public override void _Ready() { - mMenuManager = GetNode("MenuManager"); - mStalkerCore = GetNode("StalkerCore"); - - //mMenuManager.Connect(nameof(MenuManager.SetMouseCapture), this, nameof(Proc_MenuManager_SetMouseCapture)); - mMenuManager.Connect(nameof(MenuManager.ExitGame), this, nameof(Proc_MenuManager_ExitGame)); - - //// raw executing this func - //// to set proper status - //Proc_MenuManager_SetMouseCapture(); - BallanceStalkerCore.StalkerManager.Singleton.EventControllerChanged += Proc_StalkerManager_EventControllerChanged; - BallanceStalkerCore.StalkerManager.Singleton.SetEventController(BallanceStalkerCore.EventControllerSource.None); - } - - private void Proc_StalkerManager_EventControllerChanged(BallanceStalkerCore.EventControllerSource obj) { - switch (obj) { - case BallanceStalkerCore.EventControllerSource.None: - Input.SetMouseMode(Input.MouseMode.Captured); - break; - case BallanceStalkerCore.EventControllerSource.Menu: - case BallanceStalkerCore.EventControllerSource.Console: - case BallanceStalkerCore.EventControllerSource.Chat: - Input.SetMouseMode(Input.MouseMode.Visible); - break; - } - } - - public override void _Input(InputEvent @event) { - - } - - //private void Proc_MenuManager_SetMouseCapture() { - // if (mMenuManager.Visible) { - // Input.SetMouseMode(Input.MouseMode.Visible); - // } else { - // Input.SetMouseMode(Input.MouseMode.Captured); - // } - //} - private void Proc_MenuManager_ExitGame() { - GetTree().Notification(MainLoop.NotificationWmQuitRequest); - } - - -} diff --git a/scripts/stages/ConsolePanel.cs b/scripts/stages/ConsolePanel.cs deleted file mode 100644 index 7e304ea..0000000 --- a/scripts/stages/ConsolePanel.cs +++ /dev/null @@ -1,101 +0,0 @@ -using Godot; -using System; -using System.Collections.Generic; - -public enum LabelConsoleMessageType { - Normal, - Highlight, - Error -} - -public class ConsolePanel : Control { - private LineEdit mCmdInput; - private ScrollContainer mScrollbar; - private VScrollBar mScrollbarVChild; - private VBoxContainer mMessageContainer; - private PackedScene mTemplateLabelConsole; - private Queue mMessageQueue = new Queue(); - private readonly int QUEUE_MAX_SIZE = 100; - - public override void _Ready() { - mTemplateLabelConsole = ResourceLoader.Load("res://scenes/user_interface/LabelConsole.tscn"); - - mCmdInput = GetNode("CommandInput"); - mScrollbar = GetNode("ScrollSet/Scrollbar"); - mScrollbarVChild = mScrollbar.GetVScrollbar(); - mMessageContainer = GetNode("ScrollSet/Scrollbar/MessageContainer"); - mCmdInput.Connect("text_entered", this, nameof(Proc_LineEdit_TextEntered)); - mScrollbarVChild.Connect("changed", this, nameof(Proc_ScrollbarVChild_Changed)); - - BallanceStalkerCore.StalkerManager.Singleton.EventControllerChanged += Proc_StalkerManager_EventControllerChanged; - } - - private void Proc_StalkerManager_EventControllerChanged(BallanceStalkerCore.EventControllerSource obj) { - if (obj == BallanceStalkerCore.EventControllerSource.Chat) { - this.Visible = true; - mCmdInput.GrabFocus(); - } else if (obj == BallanceStalkerCore.EventControllerSource.Console) { - // same process of chat - // but only add a extra preset charcater in cmd input - this.Visible = true; - mCmdInput.Text = "/"; - mCmdInput.CaretPosition = 1; - mCmdInput.GrabFocus(); - } else { - this.Visible = false; - } - } - - public override void _Input(InputEvent @event) { - if (!this.Visible) return; - - if (@event.IsActionPressed("ballance_esc")) { - // clean input - mCmdInput.Text = ""; - // back to camera - BallanceStalkerCore.StalkerManager.Singleton.SetEventController(BallanceStalkerCore.EventControllerSource.None); - // mark handled to prevent loop call - GetTree().SetInputAsHandled(); - } - } - - private void AddMessage(string strl, LabelConsoleMessageType t) { - LabelConsole target; - if (mMessageQueue.Count > QUEUE_MAX_SIZE) { - // popup last item and remove it from scene first - target = mMessageQueue.Dequeue(); - mMessageContainer.RemoveChild(target); - } else { - target = mTemplateLabelConsole.Instance(); - } - - // add into scene and queue - mMessageQueue.Enqueue(target); - mMessageContainer.AddChild(target); - - // set text - target.SetText(strl, t); - - } - - private void Proc_LineEdit_TextEntered(string new_strl) { - if (new_strl != string.Empty) { - // todo: finish cmd parse - if (new_strl.StartsWith("/")) { - AddMessage(new_strl, LabelConsoleMessageType.Highlight); - } else if (new_strl.StartsWith("!")) { - AddMessage(new_strl, LabelConsoleMessageType.Error); - } else { - AddMessage(new_strl, LabelConsoleMessageType.Normal); - } - - // clean cmd - mCmdInput.Text = ""; - } - } - - private void Proc_ScrollbarVChild_Changed() { - mScrollbar.ScrollVertical = (int)mScrollbarVChild.MaxValue; - } - -} diff --git a/scripts/stages/MenuManager.cs b/scripts/stages/MenuManager.cs deleted file mode 100644 index 5770b78..0000000 --- a/scripts/stages/MenuManager.cs +++ /dev/null @@ -1,75 +0,0 @@ -using BallanceStalker; -using Godot; -using System; - -public class MenuManager : Control { - - public enum MenuPage : int { - Main, - LoadLevel, - LoadSky, - Multiplayer, - About - } - - //[Signal] - //public delegate void SetMouseCapture(); - [Signal] - public delegate void ExitGame(); - - private MenuMain mMenuMain; - private MenuPage mCurrentPage; - - // Called when the node enters the scene tree for the first time. - public override void _Ready() { - mCurrentPage = MenuPage.Main; - - mMenuMain = GetNode("MenuMain"); - mMenuMain.Connect(nameof(MenuMain.MenuMain_GotoPage), this, nameof(Proc_MenuMain_GotoPage)); - mMenuMain.Connect(nameof(MenuMain.MenuMain_Back), this, nameof(Proc_MenuMain_Back)); - mMenuMain.Connect(nameof(MenuMain.MenuMain_Exit), this, nameof(Proc_MenuMain_Exit)); - - BallanceStalkerCore.StalkerManager.Singleton.EventControllerChanged += Proc_StalkerManager_EventControllerChanged; - } - - private void Proc_StalkerManager_EventControllerChanged(BallanceStalkerCore.EventControllerSource obj) { - if (obj == BallanceStalkerCore.EventControllerSource.Menu) { - this.Visible = true; - } else { - this.Visible = false; - } - } - - public override void _Input(InputEvent @event) { - if (!this.Visible) return; - - if (@event.IsActionPressed("ballance_esc")) { - if (mCurrentPage == MenuPage.Main) { - // we are in main menu, we need switch visible - BallanceStalkerCore.StalkerManager.Singleton.SetEventController(BallanceStalkerCore.EventControllerSource.None); - } else { - // otherwise, back from sub menu - RefreshMenuPage(MenuPage.Main); - } - // mark handled to prevent loop call - GetTree().SetInputAsHandled(); - } - } - - private void RefreshMenuPage(MenuPage page_type) { - ;//todo: - //mCurrentPage = page_type; - } - - private void Proc_MenuMain_GotoPage(MenuPage menu_type) { - RefreshMenuPage(menu_type); - } - private void Proc_MenuMain_Back() { - BallanceStalkerCore.StalkerManager.Singleton.SetEventController(BallanceStalkerCore.EventControllerSource.None); - } - private void Proc_MenuMain_Exit() { - EmitSignal(nameof(ExitGame)); - } - - -} diff --git a/scripts/stages/ShadowBall.cs b/scripts/stages/ShadowBall.cs deleted file mode 100644 index 6375658..0000000 --- a/scripts/stages/ShadowBall.cs +++ /dev/null @@ -1,231 +0,0 @@ -using Godot; -using System; - -// Reference: https://github.com/godotengine/godot-demo-projects/blob/master/3d/waypoints - -public enum ShadowBallType : UInt32 { - Stone, - Wood, - Paper -} - -public class ShadowBall : Spatial { - - static readonly float MARGIN = 16f; // set it as half of arrow image - static readonly float TEXT_RADIUS = MARGIN + 16f; - - private bool mAlwaysTracking = true; - - Control mCtl2D; - Spatial mTextArchor, mModelArchor; - TextureRect mPlayerArrow; - Label mPlayername; - Camera mSpectatorCamera = null; - MeshInstance mMeshWood, mMeshStone, mMeshPaper; - ShadowBallType mOldState = ShadowBallType.Wood; - - public override void _Ready() { - mCtl2D = GetNode("TextArchor/Ctl2D"); - mTextArchor = GetNode("TextArchor"); - mPlayerArrow = GetNode("TextArchor/Ctl2D/PlayerArrow"); - mPlayername = GetNode