Steam lobby implemented
This commit is contained in:
parent
c7647c8097
commit
49efee80e2
8
.idea/.idea.station_obscurum_temp/.idea/indexLayout.xml
generated
Normal file
8
.idea/.idea.station_obscurum_temp/.idea/indexLayout.xml
generated
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<project version="4">
|
||||||
|
<component name="UserContentModel">
|
||||||
|
<attachedFolders />
|
||||||
|
<explicitIncludes />
|
||||||
|
<explicitExcludes />
|
||||||
|
</component>
|
||||||
|
</project>
|
6
.idea/.idea.station_obscurum_temp/.idea/projectSettingsUpdater.xml
generated
Normal file
6
.idea/.idea.station_obscurum_temp/.idea/projectSettingsUpdater.xml
generated
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<project version="4">
|
||||||
|
<component name="RiderProjectSettingsUpdater">
|
||||||
|
<option name="vcsConfiguration" value="2" />
|
||||||
|
</component>
|
||||||
|
</project>
|
6
.idea/.idea.station_obscurum_temp/.idea/vcs.xml
generated
Normal file
6
.idea/.idea.station_obscurum_temp/.idea/vcs.xml
generated
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<project version="4">
|
||||||
|
<component name="VcsDirectoryMappings">
|
||||||
|
<mapping directory="" vcs="Git" />
|
||||||
|
</component>
|
||||||
|
</project>
|
195
.idea/.idea.station_obscurum_temp/.idea/workspace.xml
generated
Normal file
195
.idea/.idea.station_obscurum_temp/.idea/workspace.xml
generated
Normal file
@ -0,0 +1,195 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<project version="4">
|
||||||
|
<component name="AnalysisUIOptions">
|
||||||
|
<option name="SCOPE_TYPE" value="8" />
|
||||||
|
<option name="CUSTOM_SCOPE_NAME" value="Project Files" />
|
||||||
|
</component>
|
||||||
|
<component name="AutoImportSettings">
|
||||||
|
<option name="autoReloadType" value="SELECTIVE" />
|
||||||
|
</component>
|
||||||
|
<component name="ChangeListManager">
|
||||||
|
<list default="true" id="8e9b3697-c9b4-441a-aeed-4ea7b4488600" name="Changes" comment="">
|
||||||
|
<change beforePath="$PROJECT_DIR$/Assets/Adobe/Substance3DForUnity/Editor/Adobe.Substance.Editor.asmdef" beforeDir="false" afterPath="$PROJECT_DIR$/Assets/Adobe/Substance3DForUnity/Editor/Adobe.Substance.Editor.asmdef" afterDir="false" />
|
||||||
|
<change beforePath="$PROJECT_DIR$/Assets/Adobe/Substance3DForUnity/Runtime/Adobe.Substance.asmdef" beforeDir="false" afterPath="$PROJECT_DIR$/Assets/Adobe/Substance3DForUnity/Runtime/Adobe.Substance.asmdef" afterDir="false" />
|
||||||
|
<change beforePath="$PROJECT_DIR$/Assets/Adobe/Substance3DForUnity/Runtime/Runtime/Adobe.Substance.Runtime.asmdef" beforeDir="false" afterPath="$PROJECT_DIR$/Assets/Adobe/Substance3DForUnity/Runtime/Runtime/Adobe.Substance.Runtime.asmdef" afterDir="false" />
|
||||||
|
<change beforePath="$PROJECT_DIR$/Assets/DefaultPrefabObjects.asset" beforeDir="false" afterPath="$PROJECT_DIR$/Assets/DefaultPrefabObjects.asset" afterDir="false" />
|
||||||
|
<change beforePath="$PROJECT_DIR$/Assets/FishNet/CodeGenerating/Unity.FishNet.CodeGen.asmdef" beforeDir="false" afterPath="$PROJECT_DIR$/Assets/FishNet/CodeGenerating/Unity.FishNet.CodeGen.asmdef" afterDir="false" />
|
||||||
|
<change beforePath="$PROJECT_DIR$/Assets/FishNet/CodeGenerating/cecil-0.11.4/Mono.Cecil.sln.meta" beforeDir="false" />
|
||||||
|
<change beforePath="$PROJECT_DIR$/Assets/FishNet/CodeGenerating/cecil-0.11.4/MonoFN.Cecil.asmdef" beforeDir="false" afterPath="$PROJECT_DIR$/Assets/FishNet/CodeGenerating/cecil-0.11.4/MonoFN.Cecil.asmdef" afterDir="false" />
|
||||||
|
<change beforePath="$PROJECT_DIR$/Assets/FishNet/Demos/FishNet.Demos.asmdef" beforeDir="false" afterPath="$PROJECT_DIR$/Assets/FishNet/Demos/FishNet.Demos.asmdef" afterDir="false" />
|
||||||
|
<change beforePath="$PROJECT_DIR$/Assets/FishNet/Demos/Network LOD/Prefabs/mydef.asmdef" beforeDir="false" afterPath="$PROJECT_DIR$/Assets/FishNet/Demos/Network LOD/Prefabs/mydef.asmdef" afterDir="false" />
|
||||||
|
<change beforePath="$PROJECT_DIR$/Assets/FishNet/Demos/Network LOD/Scenes/NetworkLOD_Demo.unity" beforeDir="false" afterPath="$PROJECT_DIR$/Assets/FishNet/Demos/Network LOD/Scenes/NetworkLOD_Demo.unity" afterDir="false" />
|
||||||
|
<change beforePath="$PROJECT_DIR$/Assets/FishNet/Example/FishNet.Example.asmdef" beforeDir="false" afterPath="$PROJECT_DIR$/Assets/FishNet/Example/FishNet.Example.asmdef" afterDir="false" />
|
||||||
|
<change beforePath="$PROJECT_DIR$/Assets/FishNet/Plugins/FishyFacepunch/SteamManager.cs" beforeDir="false" />
|
||||||
|
<change beforePath="$PROJECT_DIR$/Assets/FishNet/Plugins/FishyFacepunch/SteamManager.cs.meta" beforeDir="false" />
|
||||||
|
<change beforePath="$PROJECT_DIR$/Assets/FishNet/Runtime/Config.json" beforeDir="false" afterPath="$PROJECT_DIR$/Assets/FishNet/Runtime/Config.json" afterDir="false" />
|
||||||
|
<change beforePath="$PROJECT_DIR$/Assets/FishNet/Runtime/FishNet.Runtime.asmdef" beforeDir="false" afterPath="$PROJECT_DIR$/Assets/FishNet/Runtime/FishNet.Runtime.asmdef" afterDir="false" />
|
||||||
|
<change beforePath="$PROJECT_DIR$/Assets/FishNet/Runtime/Transporting/Transports/Tugboat/LiteNetLib/LiteNetLib.csproj.meta" beforeDir="false" />
|
||||||
|
<change beforePath="$PROJECT_DIR$/Assets/Packages/Facepunch/Facepunch.Steamworks.Posix.dll.meta" beforeDir="false" afterPath="$PROJECT_DIR$/Assets/Packages/Facepunch/Facepunch.Steamworks.Posix.dll.meta" afterDir="false" />
|
||||||
|
<change beforePath="$PROJECT_DIR$/Assets/Packages/Facepunch/Facepunch.Steamworks.Posix.xml" beforeDir="false" afterPath="$PROJECT_DIR$/Assets/Packages/Facepunch/Facepunch.Steamworks.Posix.xml" afterDir="false" />
|
||||||
|
<change beforePath="$PROJECT_DIR$/Assets/Packages/Facepunch/Facepunch.Steamworks.Win32.xml" beforeDir="false" afterPath="$PROJECT_DIR$/Assets/Packages/Facepunch/Facepunch.Steamworks.Win32.xml" afterDir="false" />
|
||||||
|
<change beforePath="$PROJECT_DIR$/Assets/Packages/Facepunch/Facepunch.Steamworks.Win64.xml" beforeDir="false" afterPath="$PROJECT_DIR$/Assets/Packages/Facepunch/Facepunch.Steamworks.Win64.xml" afterDir="false" />
|
||||||
|
<change beforePath="$PROJECT_DIR$/Assets/Packages/Facepunch/redistributable_bin/steam_api.dll.meta" beforeDir="false" afterPath="$PROJECT_DIR$/Assets/Packages/Facepunch/redistributable_bin/steam_api.dll.meta" afterDir="false" />
|
||||||
|
<change beforePath="$PROJECT_DIR$/Assets/Scripts/CharacterControllerForce.cs" beforeDir="false" afterPath="$PROJECT_DIR$/Assets/Scripts/CharacterControllerForce.cs" afterDir="false" />
|
||||||
|
<change beforePath="$PROJECT_DIR$/Assets/Scripts/DGemItem.cs" beforeDir="false" afterPath="$PROJECT_DIR$/Assets/Scripts/DGemItem.cs" afterDir="false" />
|
||||||
|
<change beforePath="$PROJECT_DIR$/Assets/Scripts/Darkness/VectorFieldHandler.cs" beforeDir="false" afterPath="$PROJECT_DIR$/Assets/Scripts/Darkness/VectorFieldHandler.cs" afterDir="false" />
|
||||||
|
<change beforePath="$PROJECT_DIR$/Assets/Scripts/DynamicLine.cs" beforeDir="false" afterPath="$PROJECT_DIR$/Assets/Scripts/DynamicLine.cs" afterDir="false" />
|
||||||
|
<change beforePath="$PROJECT_DIR$/Assets/Scripts/Enemies/AI/SkinlessMonsterAnimator.cs" beforeDir="false" afterPath="$PROJECT_DIR$/Assets/Scripts/Enemies/AI/SkinlessMonsterAnimator.cs" afterDir="false" />
|
||||||
|
<change beforePath="$PROJECT_DIR$/Assets/Scripts/Enemies/AI/SkinlessMonsterComponent.cs" beforeDir="false" afterPath="$PROJECT_DIR$/Assets/Scripts/Enemies/AI/SkinlessMonsterComponent.cs" afterDir="false" />
|
||||||
|
<change beforePath="$PROJECT_DIR$/Assets/Scripts/Enemies/AI/Tester/TestSkinnlessMonster.cs" beforeDir="false" afterPath="$PROJECT_DIR$/Assets/Scripts/Enemies/AI/Tester/TestSkinnlessMonster.cs" afterDir="false" />
|
||||||
|
<change beforePath="$PROJECT_DIR$/Assets/Scripts/Enemies/DummyComponent.cs" beforeDir="false" afterPath="$PROJECT_DIR$/Assets/Scripts/Enemies/DummyComponent.cs" afterDir="false" />
|
||||||
|
<change beforePath="$PROJECT_DIR$/Assets/Scripts/Enemies/MonsterComponent.cs" beforeDir="false" afterPath="$PROJECT_DIR$/Assets/Scripts/Enemies/MonsterComponent.cs" afterDir="false" />
|
||||||
|
<change beforePath="$PROJECT_DIR$/Assets/Scripts/Enemies/Robot/IKControl_Robot.cs" beforeDir="false" afterPath="$PROJECT_DIR$/Assets/Scripts/Enemies/Robot/IKControl_Robot.cs" afterDir="false" />
|
||||||
|
<change beforePath="$PROJECT_DIR$/Assets/Scripts/Enemies/Robot/RobotMouthAnimator.cs" beforeDir="false" afterPath="$PROJECT_DIR$/Assets/Scripts/Enemies/Robot/RobotMouthAnimator.cs" afterDir="false" />
|
||||||
|
<change beforePath="$PROJECT_DIR$/Assets/Scripts/Enemies/SwarmAnimator.cs" beforeDir="false" afterPath="$PROJECT_DIR$/Assets/Scripts/Enemies/SwarmAnimator.cs" afterDir="false" />
|
||||||
|
<change beforePath="$PROJECT_DIR$/Assets/Scripts/Enviornment/EmissiveLightMatching.cs" beforeDir="false" afterPath="$PROJECT_DIR$/Assets/Scripts/Enviornment/EmissiveLightMatching.cs" afterDir="false" />
|
||||||
|
<change beforePath="$PROJECT_DIR$/Assets/Scripts/Experimental/TestAnimationParameters.cs" beforeDir="false" afterPath="$PROJECT_DIR$/Assets/Scripts/Experimental/TestAnimationParameters.cs" afterDir="false" />
|
||||||
|
<change beforePath="$PROJECT_DIR$/Assets/Scripts/Game/InGameManager.cs" beforeDir="false" afterPath="$PROJECT_DIR$/Assets/Scripts/Game/InGameManager.cs" afterDir="false" />
|
||||||
|
<change beforePath="$PROJECT_DIR$/Assets/Scripts/Game/InGameMenuManager.cs" beforeDir="false" afterPath="$PROJECT_DIR$/Assets/Scripts/Game/InGameMenuManager.cs" afterDir="false" />
|
||||||
|
<change beforePath="$PROJECT_DIR$/Assets/Scripts/Game/Optimizer.cs" beforeDir="false" afterPath="$PROJECT_DIR$/Assets/Scripts/Game/Optimizer.cs" afterDir="false" />
|
||||||
|
<change beforePath="$PROJECT_DIR$/Assets/Scripts/GemItem.cs" beforeDir="false" afterPath="$PROJECT_DIR$/Assets/Scripts/GemItem.cs" afterDir="false" />
|
||||||
|
<change beforePath="$PROJECT_DIR$/Assets/Scripts/Holograms/RotatingHologram.cs" beforeDir="false" afterPath="$PROJECT_DIR$/Assets/Scripts/Holograms/RotatingHologram.cs" afterDir="false" />
|
||||||
|
<change beforePath="$PROJECT_DIR$/Assets/Scripts/Interactable/Insertable.cs" beforeDir="false" afterPath="$PROJECT_DIR$/Assets/Scripts/Interactable/Insertable.cs" afterDir="false" />
|
||||||
|
<change beforePath="$PROJECT_DIR$/Assets/Scripts/Interactable/Interactable.cs" beforeDir="false" afterPath="$PROJECT_DIR$/Assets/Scripts/Interactable/Interactable.cs" afterDir="false" />
|
||||||
|
<change beforePath="$PROJECT_DIR$/Assets/Scripts/Interactable/ItemSelector.cs" beforeDir="false" afterPath="$PROJECT_DIR$/Assets/Scripts/Interactable/ItemSelector.cs" afterDir="false" />
|
||||||
|
<change beforePath="$PROJECT_DIR$/Assets/Scripts/Inventory/Inventory.cs" beforeDir="false" afterPath="$PROJECT_DIR$/Assets/Scripts/Inventory/Inventory.cs" afterDir="false" />
|
||||||
|
<change beforePath="$PROJECT_DIR$/Assets/Scripts/Inventory/TempInventory.cs" beforeDir="false" afterPath="$PROJECT_DIR$/Assets/Scripts/Inventory/TempInventory.cs" afterDir="false" />
|
||||||
|
<change beforePath="$PROJECT_DIR$/Assets/Scripts/Item/CarryableItem.cs" beforeDir="false" afterPath="$PROJECT_DIR$/Assets/Scripts/Item/CarryableItem.cs" afterDir="false" />
|
||||||
|
<change beforePath="$PROJECT_DIR$/Assets/Scripts/Item/DoorInteractable.cs" beforeDir="false" afterPath="$PROJECT_DIR$/Assets/Scripts/Item/DoorInteractable.cs" afterDir="false" />
|
||||||
|
<change beforePath="$PROJECT_DIR$/Assets/Scripts/Item/FlareBeacon/FlareBeacon.cs" beforeDir="false" afterPath="$PROJECT_DIR$/Assets/Scripts/Item/FlareBeacon/FlareBeacon.cs" afterDir="false" />
|
||||||
|
<change beforePath="$PROJECT_DIR$/Assets/Scripts/Item/GenericInteractable.cs" beforeDir="false" afterPath="$PROJECT_DIR$/Assets/Scripts/Item/GenericInteractable.cs" afterDir="false" />
|
||||||
|
<change beforePath="$PROJECT_DIR$/Assets/Scripts/Item/HeavyInteractableItem.cs" beforeDir="false" afterPath="$PROJECT_DIR$/Assets/Scripts/Item/HeavyInteractableItem.cs" afterDir="false" />
|
||||||
|
<change beforePath="$PROJECT_DIR$/Assets/Scripts/Item/HeavyItemReceiver.cs" beforeDir="false" afterPath="$PROJECT_DIR$/Assets/Scripts/Item/HeavyItemReceiver.cs" afterDir="false" />
|
||||||
|
<change beforePath="$PROJECT_DIR$/Assets/Scripts/Item/InteractableItem.cs" beforeDir="false" afterPath="$PROJECT_DIR$/Assets/Scripts/Item/InteractableItem.cs" afterDir="false" />
|
||||||
|
<change beforePath="$PROJECT_DIR$/Assets/Scripts/Item/KeyItem.cs" beforeDir="false" afterPath="$PROJECT_DIR$/Assets/Scripts/Item/KeyItem.cs" afterDir="false" />
|
||||||
|
<change beforePath="$PROJECT_DIR$/Assets/Scripts/Item/Pistol/BulletComponent.cs" beforeDir="false" afterPath="$PROJECT_DIR$/Assets/Scripts/Item/Pistol/BulletComponent.cs" afterDir="false" />
|
||||||
|
<change beforePath="$PROJECT_DIR$/Assets/Scripts/Item/Pistol/PistolAnimationAimAssist.cs" beforeDir="false" afterPath="$PROJECT_DIR$/Assets/Scripts/Item/Pistol/PistolAnimationAimAssist.cs" afterDir="false" />
|
||||||
|
<change beforePath="$PROJECT_DIR$/Assets/Scripts/Item/Pistol/PistolComponent.cs" beforeDir="false" afterPath="$PROJECT_DIR$/Assets/Scripts/Item/Pistol/PistolComponent.cs" afterDir="false" />
|
||||||
|
<change beforePath="$PROJECT_DIR$/Assets/Scripts/Item/Registers/FlareRegister.cs" beforeDir="false" afterPath="$PROJECT_DIR$/Assets/Scripts/Item/Registers/FlareRegister.cs" afterDir="false" />
|
||||||
|
<change beforePath="$PROJECT_DIR$/Assets/Scripts/Item/SpecialItemCycler.cs" beforeDir="false" afterPath="$PROJECT_DIR$/Assets/Scripts/Item/SpecialItemCycler.cs" afterDir="false" />
|
||||||
|
<change beforePath="$PROJECT_DIR$/Assets/Scripts/Levels/Level0Scripts/BasicLevelProgressionSystem.cs" beforeDir="false" afterPath="$PROJECT_DIR$/Assets/Scripts/Levels/Level0Scripts/BasicLevelProgressionSystem.cs" afterDir="false" />
|
||||||
|
<change beforePath="$PROJECT_DIR$/Assets/Scripts/Levels/Level0Scripts/LevelZeroSpecial.cs" beforeDir="false" afterPath="$PROJECT_DIR$/Assets/Scripts/Levels/Level0Scripts/LevelZeroSpecial.cs" afterDir="false" />
|
||||||
|
<change beforePath="$PROJECT_DIR$/Assets/Scripts/MainMenu/MainMenuManager.cs" beforeDir="false" afterPath="$PROJECT_DIR$/Assets/Scripts/MainMenu/MainMenuManager.cs" afterDir="false" />
|
||||||
|
<change beforePath="$PROJECT_DIR$/Assets/Scripts/Player/CameraController.cs" beforeDir="false" afterPath="$PROJECT_DIR$/Assets/Scripts/Player/CameraController.cs" afterDir="false" />
|
||||||
|
<change beforePath="$PROJECT_DIR$/Assets/Scripts/Player/CameraShift.cs" beforeDir="false" afterPath="$PROJECT_DIR$/Assets/Scripts/Player/CameraShift.cs" afterDir="false" />
|
||||||
|
<change beforePath="$PROJECT_DIR$/Assets/Scripts/Player/NoiseVisibilitySettingsManager.cs" beforeDir="false" afterPath="$PROJECT_DIR$/Assets/Scripts/Player/NoiseVisibilitySettingsManager.cs" afterDir="false" />
|
||||||
|
<change beforePath="$PROJECT_DIR$/Assets/Scripts/Player/PlayerAim.cs" beforeDir="false" afterPath="$PROJECT_DIR$/Assets/Scripts/Player/PlayerAim.cs" afterDir="false" />
|
||||||
|
<change beforePath="$PROJECT_DIR$/Assets/Scripts/Player/PlayerAnimationController.cs" beforeDir="false" afterPath="$PROJECT_DIR$/Assets/Scripts/Player/PlayerAnimationController.cs" afterDir="false" />
|
||||||
|
<change beforePath="$PROJECT_DIR$/Assets/Scripts/Player/PlayerComponent.cs" beforeDir="false" afterPath="$PROJECT_DIR$/Assets/Scripts/Player/PlayerComponent.cs" afterDir="false" />
|
||||||
|
<change beforePath="$PROJECT_DIR$/Assets/Scripts/Player/PlayerInteractionHandler.cs" beforeDir="false" afterPath="$PROJECT_DIR$/Assets/Scripts/Player/PlayerInteractionHandler.cs" afterDir="false" />
|
||||||
|
<change beforePath="$PROJECT_DIR$/Assets/Scripts/Player/PlayerMovementController.cs" beforeDir="false" afterPath="$PROJECT_DIR$/Assets/Scripts/Player/PlayerMovementController.cs" afterDir="false" />
|
||||||
|
<change beforePath="$PROJECT_DIR$/Assets/Scripts/Player/StatsOutputScreen.cs" beforeDir="false" afterPath="$PROJECT_DIR$/Assets/Scripts/Player/StatsOutputScreen.cs" afterDir="false" />
|
||||||
|
<change beforePath="$PROJECT_DIR$/Assets/Scripts/UI/ObjectiveText.cs" beforeDir="false" afterPath="$PROJECT_DIR$/Assets/Scripts/UI/ObjectiveText.cs" afterDir="false" />
|
||||||
|
<change beforePath="$PROJECT_DIR$/Assets/Scripts/UI/WaypointMarker.cs" beforeDir="false" afterPath="$PROJECT_DIR$/Assets/Scripts/UI/WaypointMarker.cs" afterDir="false" />
|
||||||
|
<change beforePath="$PROJECT_DIR$/Assets/TextMesh Pro/Sprites/EmojiOne.json" beforeDir="false" afterPath="$PROJECT_DIR$/Assets/TextMesh Pro/Sprites/EmojiOne.json" afterDir="false" />
|
||||||
|
<change beforePath="$PROJECT_DIR$/Assets/VFXGraph/GabrielAguiarProductions/VFXGraph_Muzzle_2020.3_HDRP_v1.0.1.unitypackage.meta" beforeDir="false" />
|
||||||
|
<change beforePath="$PROJECT_DIR$/Assets/VFXGraph/GabrielAguiarProductions/VFXGraph_Muzzle_2020.3_URP_v1.0.1.unitypackage.meta" beforeDir="false" />
|
||||||
|
<change beforePath="$PROJECT_DIR$/Packages/manifest.json" beforeDir="false" afterPath="$PROJECT_DIR$/Packages/manifest.json" afterDir="false" />
|
||||||
|
<change beforePath="$PROJECT_DIR$/Packages/packages-lock.json" beforeDir="false" afterPath="$PROJECT_DIR$/Packages/packages-lock.json" afterDir="false" />
|
||||||
|
<change beforePath="$PROJECT_DIR$/ProjectSettings/SceneTemplateSettings.json" beforeDir="false" afterPath="$PROJECT_DIR$/ProjectSettings/SceneTemplateSettings.json" afterDir="false" />
|
||||||
|
</list>
|
||||||
|
<option name="SHOW_DIALOG" value="false" />
|
||||||
|
<option name="HIGHLIGHT_CONFLICTS" value="true" />
|
||||||
|
<option name="HIGHLIGHT_NON_ACTIVE_CHANGELIST" value="false" />
|
||||||
|
<option name="LAST_RESOLUTION" value="IGNORE" />
|
||||||
|
</component>
|
||||||
|
<component name="HighlightingSettingsPerFile">
|
||||||
|
<setting file="file://$PROJECT_DIR$/Assets/Scripts/Steam/FriendObject.cs" root0="FORCE_HIGHLIGHTING" />
|
||||||
|
<setting file="file://$PROJECT_DIR$/Assets/Scripts/Steam/SteamFriendManager.cs" root0="FORCE_HIGHLIGHTING" />
|
||||||
|
<setting file="file://$PROJECT_DIR$/Assets/Scripts/Steam/SteamManager.cs" root0="FORCE_HIGHLIGHTING" />
|
||||||
|
<setting file="file://$USER_HOME$/Downloads/Unity-Facepunch-Steamwork-tutorial-main/Assets/SteamFriendsManager.cs" root0="SKIP_HIGHLIGHTING" />
|
||||||
|
</component>
|
||||||
|
<component name="MarkdownSettingsMigration">
|
||||||
|
<option name="stateVersion" value="1" />
|
||||||
|
</component>
|
||||||
|
<component name="ProjectId" id="2QaKQGlpcBQN822RXF9HTdnO83e" />
|
||||||
|
<component name="ProjectViewState">
|
||||||
|
<option name="hideEmptyMiddlePackages" value="true" />
|
||||||
|
<option name="showLibraryContents" value="true" />
|
||||||
|
</component>
|
||||||
|
<component name="PropertiesComponent">{
|
||||||
|
"keyToString": {
|
||||||
|
"RunOnceActivity.OpenProjectViewOnStart": "true",
|
||||||
|
"RunOnceActivity.ShowReadmeOnStart": "true",
|
||||||
|
"WebServerToolWindowFactoryState": "false",
|
||||||
|
"ignore.virus.scanning.warn.message": "true",
|
||||||
|
"node.js.detected.package.eslint": "true",
|
||||||
|
"node.js.detected.package.tslint": "true",
|
||||||
|
"node.js.selected.package.eslint": "(autodetect)",
|
||||||
|
"node.js.selected.package.tslint": "(autodetect)",
|
||||||
|
"settings.editor.selected.configurable": "preferences.pluginManager",
|
||||||
|
"vue.rearranger.settings.migration": "true"
|
||||||
|
},
|
||||||
|
"keyToStringList": {
|
||||||
|
"rider.external.source.directories": [
|
||||||
|
"C:\\Users\\madha\\AppData\\Roaming\\JetBrains\\Rider2023.1\\resharper-host\\DecompilerCache",
|
||||||
|
"C:\\Users\\madha\\AppData\\Roaming\\JetBrains\\Rider2023.1\\resharper-host\\SourcesCache",
|
||||||
|
"C:\\Users\\madha\\AppData\\Local\\Symbols\\src"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}</component>
|
||||||
|
<component name="RunManager" selected="Attach to Unity Editor.Attach to Unity Editor">
|
||||||
|
<configuration name="Start Unity" type="RunUnityExe" factoryName="Unity Executable">
|
||||||
|
<option name="EXE_PATH" value="C:\Program Files\Unity\Hub\Editor\2021.3.18f1\Editor\Unity.exe" />
|
||||||
|
<option name="PROGRAM_PARAMETERS" value="-projectPath C:\Users\madha\Documents\station_obscurum_temp -debugCodeOptimization" />
|
||||||
|
<option name="WORKING_DIRECTORY" value="C:\Users\madha\Documents\station_obscurum_temp" />
|
||||||
|
<option name="PASS_PARENT_ENVS" value="1" />
|
||||||
|
<option name="USE_EXTERNAL_CONSOLE" value="0" />
|
||||||
|
<method v="2" />
|
||||||
|
</configuration>
|
||||||
|
<configuration name="Unit Tests (batch mode)" type="RunUnityExe" factoryName="Unity Executable">
|
||||||
|
<option name="EXE_PATH" value="C:\Program Files\Unity\Hub\Editor\2021.3.18f1\Editor\Unity.exe" />
|
||||||
|
<option name="PROGRAM_PARAMETERS" value="-runTests -batchmode -projectPath C:\Users\madha\Documents\station_obscurum_temp -testResults Logs/results.xml -testPlatform EditMode -debugCodeOptimization" />
|
||||||
|
<option name="WORKING_DIRECTORY" value="C:\Users\madha\Documents\station_obscurum_temp" />
|
||||||
|
<option name="PASS_PARENT_ENVS" value="1" />
|
||||||
|
<option name="USE_EXTERNAL_CONSOLE" value="0" />
|
||||||
|
<method v="2" />
|
||||||
|
</configuration>
|
||||||
|
<configuration name="Attach to Unity Editor & Play" type="UNITY_DEBUG_RUN_CONFIGURATION" factoryName="UNITY_ATTACH_AND_PLAY" show_console_on_std_err="false" show_console_on_std_out="false" port="50000" address="localhost">
|
||||||
|
<option name="allowRunningInParallel" value="false" />
|
||||||
|
<option name="listenPortForConnections" value="false" />
|
||||||
|
<option name="pid" />
|
||||||
|
<option name="projectPathOnTarget" />
|
||||||
|
<option name="selectedOptions">
|
||||||
|
<list />
|
||||||
|
</option>
|
||||||
|
<method v="2" />
|
||||||
|
</configuration>
|
||||||
|
<configuration name="Attach to Unity Editor" type="UNITY_DEBUG_RUN_CONFIGURATION" factoryName="Unity Debug" show_console_on_std_err="false" show_console_on_std_out="false" port="50000" address="localhost">
|
||||||
|
<option name="allowRunningInParallel" value="false" />
|
||||||
|
<option name="listenPortForConnections" value="false" />
|
||||||
|
<option name="pid" />
|
||||||
|
<option name="projectPathOnTarget" />
|
||||||
|
<option name="selectedOptions">
|
||||||
|
<list />
|
||||||
|
</option>
|
||||||
|
<method v="2" />
|
||||||
|
</configuration>
|
||||||
|
</component>
|
||||||
|
<component name="SpellCheckerSettings" RuntimeDictionaries="0" Folders="0" CustomDictionaries="0" DefaultDictionary="application-level" UseSingleDictionary="true" transferred="true" />
|
||||||
|
<component name="TaskManager">
|
||||||
|
<task active="true" id="Default" summary="Default task">
|
||||||
|
<changelist id="8e9b3697-c9b4-441a-aeed-4ea7b4488600" name="Changes" comment="" />
|
||||||
|
<created>1685586236403</created>
|
||||||
|
<option name="number" value="Default" />
|
||||||
|
<option name="presentableId" value="Default" />
|
||||||
|
<updated>1685586236403</updated>
|
||||||
|
<workItem from="1685586237466" duration="1661000" />
|
||||||
|
<workItem from="1685631913453" duration="701000" />
|
||||||
|
<workItem from="1685633165416" duration="1363000" />
|
||||||
|
<workItem from="1685636004032" duration="545000" />
|
||||||
|
<workItem from="1685636572156" duration="4819000" />
|
||||||
|
<workItem from="1685617055026" duration="83000" />
|
||||||
|
<workItem from="1685617157524" duration="1587000" />
|
||||||
|
</task>
|
||||||
|
<servers />
|
||||||
|
</component>
|
||||||
|
<component name="TypeScriptGeneratedFilesManager">
|
||||||
|
<option name="version" value="3" />
|
||||||
|
</component>
|
||||||
|
<component name="UnityProjectConfiguration" hasMinimizedUI="true" />
|
||||||
|
<component name="UnityUnitTestConfiguration" currentTestLauncher="Both" />
|
||||||
|
<component name="VcsManagerConfiguration">
|
||||||
|
<option name="CLEAR_INITIAL_COMMIT_MESSAGE" value="true" />
|
||||||
|
</component>
|
||||||
|
</project>
|
55
.vscode/settings.json
vendored
Normal file
55
.vscode/settings.json
vendored
Normal file
@ -0,0 +1,55 @@
|
|||||||
|
{
|
||||||
|
"files.exclude":
|
||||||
|
{
|
||||||
|
"**/.DS_Store":true,
|
||||||
|
"**/.git":true,
|
||||||
|
"**/.gitmodules":true,
|
||||||
|
"**/*.booproj":true,
|
||||||
|
"**/*.pidb":true,
|
||||||
|
"**/*.suo":true,
|
||||||
|
"**/*.user":true,
|
||||||
|
"**/*.userprefs":true,
|
||||||
|
"**/*.unityproj":true,
|
||||||
|
"**/*.dll":true,
|
||||||
|
"**/*.exe":true,
|
||||||
|
"**/*.pdf":true,
|
||||||
|
"**/*.mid":true,
|
||||||
|
"**/*.midi":true,
|
||||||
|
"**/*.wav":true,
|
||||||
|
"**/*.gif":true,
|
||||||
|
"**/*.ico":true,
|
||||||
|
"**/*.jpg":true,
|
||||||
|
"**/*.jpeg":true,
|
||||||
|
"**/*.png":true,
|
||||||
|
"**/*.psd":true,
|
||||||
|
"**/*.tga":true,
|
||||||
|
"**/*.tif":true,
|
||||||
|
"**/*.tiff":true,
|
||||||
|
"**/*.3ds":true,
|
||||||
|
"**/*.3DS":true,
|
||||||
|
"**/*.fbx":true,
|
||||||
|
"**/*.FBX":true,
|
||||||
|
"**/*.lxo":true,
|
||||||
|
"**/*.LXO":true,
|
||||||
|
"**/*.ma":true,
|
||||||
|
"**/*.MA":true,
|
||||||
|
"**/*.obj":true,
|
||||||
|
"**/*.OBJ":true,
|
||||||
|
"**/*.asset":true,
|
||||||
|
"**/*.cubemap":true,
|
||||||
|
"**/*.flare":true,
|
||||||
|
"**/*.mat":true,
|
||||||
|
"**/*.meta":true,
|
||||||
|
"**/*.prefab":true,
|
||||||
|
"**/*.unity":true,
|
||||||
|
"build/":true,
|
||||||
|
"Build/":true,
|
||||||
|
"Library/":true,
|
||||||
|
"library/":true,
|
||||||
|
"obj/":true,
|
||||||
|
"Obj/":true,
|
||||||
|
"ProjectSettings/":true,
|
||||||
|
"temp/":true,
|
||||||
|
"Temp/":true
|
||||||
|
}
|
||||||
|
}
|
@ -1348,7 +1348,7 @@ MonoBehaviour:
|
|||||||
m_Name:
|
m_Name:
|
||||||
m_EditorClassIdentifier:
|
m_EditorClassIdentifier:
|
||||||
_steamAppID: 480
|
_steamAppID: 480
|
||||||
_serverBindAddress:
|
_serverBindAddress: 76561198308605766
|
||||||
_port: 27015
|
_port: 27015
|
||||||
_maximumClients: 16
|
_maximumClients: 16
|
||||||
_clientAddress: 76561198308605766
|
_clientAddress: 76561198308605766
|
||||||
|
@ -1,144 +0,0 @@
|
|||||||
using FishNet;
|
|
||||||
using FishNet.Transporting;
|
|
||||||
using Steamworks;
|
|
||||||
using System;
|
|
||||||
using System.Net;
|
|
||||||
using UnityEngine;
|
|
||||||
|
|
||||||
public class SteamManager : MonoBehaviour
|
|
||||||
{
|
|
||||||
#region Serialized.
|
|
||||||
[Header("Steam Settings")]
|
|
||||||
/// <summary>
|
|
||||||
/// Steam application Id.
|
|
||||||
/// </summary>
|
|
||||||
[Tooltip("Steam application Id.")]
|
|
||||||
[SerializeField]
|
|
||||||
private uint _steamAppID = 480;
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// SSteam Mod Directory.
|
|
||||||
/// </summary>
|
|
||||||
[Tooltip("Steam Mod Directory.")]
|
|
||||||
[SerializeField]
|
|
||||||
private string _modDir = string.Empty;
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Steam Game Description.
|
|
||||||
/// </summary>
|
|
||||||
[Tooltip("Steam Game Description.")]
|
|
||||||
[SerializeField]
|
|
||||||
private string _gameDesc = string.Empty;
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Steam version.
|
|
||||||
/// </summary>
|
|
||||||
[Tooltip("Steam version.")]
|
|
||||||
[SerializeField]
|
|
||||||
private string _version = string.Empty;
|
|
||||||
|
|
||||||
[Header("Server Settings")]
|
|
||||||
/// <summary>
|
|
||||||
/// Servername.
|
|
||||||
/// </summary>
|
|
||||||
[Tooltip("Server Name")]
|
|
||||||
[SerializeField]
|
|
||||||
private string _serverName = string.Empty;
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Server Password.
|
|
||||||
/// </summary>
|
|
||||||
[Tooltip("Server Password.")]
|
|
||||||
[SerializeField]
|
|
||||||
private string _password = string.Empty;
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Steam Server Query Port.
|
|
||||||
/// </summary>
|
|
||||||
[Tooltip("Server Query Port.")]
|
|
||||||
[SerializeField]
|
|
||||||
private ushort _queryPort = 27016;
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Server VAC Secure.
|
|
||||||
/// </summary>
|
|
||||||
[Tooltip("Server VAC Secure.")]
|
|
||||||
[SerializeField]
|
|
||||||
private bool _vac = true;
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Server as Dedicated Server.
|
|
||||||
/// </summary>
|
|
||||||
[Tooltip("Server as Dedicated Server.")]
|
|
||||||
[SerializeField]
|
|
||||||
private bool _ds = true;
|
|
||||||
#endregion
|
|
||||||
|
|
||||||
void Start()
|
|
||||||
{
|
|
||||||
#if UNITY_SERVER
|
|
||||||
InstanceFinder.ServerManager.StartConnection();
|
|
||||||
InstanceFinder.ServerManager.OnServerConnectionState += OnServerConnectionState;
|
|
||||||
#endif
|
|
||||||
}
|
|
||||||
|
|
||||||
private void OnServerConnectionState(FishNet.Transporting.ServerConnectionStateArgs state)
|
|
||||||
{
|
|
||||||
if (state.ConnectionState == FishNet.Transporting.LocalConnectionState.Started)
|
|
||||||
{
|
|
||||||
var serverInit = new SteamServerInit(_modDir, _gameDesc)
|
|
||||||
{
|
|
||||||
IpAddress = IPAddress.Parse(InstanceFinder.TransportManager.Transport.GetServerBindAddress(IPAddressType.IPv4)),
|
|
||||||
GamePort = InstanceFinder.TransportManager.Transport.GetPort(),
|
|
||||||
QueryPort = _queryPort,
|
|
||||||
Secure = _vac,
|
|
||||||
DedicatedServer = _ds,
|
|
||||||
VersionString = _version,
|
|
||||||
};
|
|
||||||
serverInit.WithRandomSteamPort();
|
|
||||||
|
|
||||||
try
|
|
||||||
{
|
|
||||||
SteamServer.Init(1280590, serverInit, true);
|
|
||||||
SteamServer.ServerName = _serverName;
|
|
||||||
SteamServer.MaxPlayers = InstanceFinder.TransportManager.Transport.GetMaximumClients();
|
|
||||||
SteamServer.Passworded = !string.IsNullOrEmpty(_password);
|
|
||||||
|
|
||||||
SteamServer.DedicatedServer = _ds;
|
|
||||||
SteamServer.AutomaticHeartbeats = true;
|
|
||||||
|
|
||||||
SteamServer.LogOnAnonymous();
|
|
||||||
|
|
||||||
SteamServer.OnSteamServersConnected += OnSteamServersConnected;
|
|
||||||
SteamServer.OnSteamServersDisconnected += OnSteamServersDisconnected;
|
|
||||||
SteamServer.OnSteamServerConnectFailure += OnSteamServerConnectFailure;
|
|
||||||
|
|
||||||
if (!SteamServer.IsValid)
|
|
||||||
{
|
|
||||||
Debug.LogWarning("Couldn't initialize server");
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
catch (Exception ex)
|
|
||||||
{
|
|
||||||
Debug.LogError("Couldn't initialize Steam server (" + ex.Message + ")");
|
|
||||||
Application.Quit();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
private void OnSteamServersConnected()
|
|
||||||
{
|
|
||||||
Debug.Log("Dedicated Server connected to Steam successfully");
|
|
||||||
}
|
|
||||||
|
|
||||||
private void OnSteamServerConnectFailure(Result result, bool stilltrying)
|
|
||||||
{
|
|
||||||
Debug.Log("Dedicated Server failed to connect to Steam");
|
|
||||||
}
|
|
||||||
|
|
||||||
private void OnSteamServersDisconnected(Result result)
|
|
||||||
{
|
|
||||||
Debug.Log("Dedicated Server got logged out of Steam");
|
|
||||||
}
|
|
||||||
}
|
|
@ -1 +1,3 @@
|
|||||||
{"StripReleaseBuilds":true}
|
{
|
||||||
|
"StripReleaseBuilds": true
|
||||||
|
}
|
@ -12,7 +12,7 @@ PluginImporter:
|
|||||||
validateReferences: 1
|
validateReferences: 1
|
||||||
platformData:
|
platformData:
|
||||||
- first:
|
- first:
|
||||||
'': Any
|
: Any
|
||||||
second:
|
second:
|
||||||
enabled: 0
|
enabled: 0
|
||||||
settings:
|
settings:
|
||||||
|
@ -299,7 +299,8 @@
|
|||||||
</member>
|
</member>
|
||||||
<member name="M:Steamworks.Data.Connection.Close(System.Boolean,System.Int32,System.String)">
|
<member name="M:Steamworks.Data.Connection.Close(System.Boolean,System.Int32,System.String)">
|
||||||
<summary>
|
<summary>
|
||||||
Disconnects from the remote host and invalidates the connection handle. Any unread data on the connection is discarded..
|
Disconnects from the remote host and invalidates the connection handle. Any unread data on the
|
||||||
|
connection is discarded..
|
||||||
reasonCode is defined and used by you.
|
reasonCode is defined and used by you.
|
||||||
</summary>
|
</summary>
|
||||||
</member>
|
</member>
|
||||||
@ -435,7 +436,8 @@
|
|||||||
<member name="M:Steamworks.Data.Achievement.GetIcon">
|
<member name="M:Steamworks.Data.Achievement.GetIcon">
|
||||||
<summary>
|
<summary>
|
||||||
Gets the icon of the achievement. This can return a null image even though the image exists if the image
|
Gets the icon of the achievement. This can return a null image even though the image exists if the image
|
||||||
hasn't been downloaded by Steam yet. You can use GetIconAsync if you want to wait for the image to be downloaded.
|
hasn't been downloaded by Steam yet. You can use GetIconAsync if you want to wait for the image to be
|
||||||
|
downloaded.
|
||||||
</summary>
|
</summary>
|
||||||
</member>
|
</member>
|
||||||
<member name="M:Steamworks.Data.Achievement.GetIconAsync(System.Int32)">
|
<member name="M:Steamworks.Data.Achievement.GetIconAsync(System.Int32)">
|
||||||
@ -445,7 +447,8 @@
|
|||||||
</member>
|
</member>
|
||||||
<member name="P:Steamworks.Data.Achievement.GlobalUnlocked">
|
<member name="P:Steamworks.Data.Achievement.GlobalUnlocked">
|
||||||
<summary>
|
<summary>
|
||||||
Returns the fraction (0-1) of users who have unlocked the specified achievement, or -1 if no data available.
|
Returns the fraction (0-1) of users who have unlocked the specified achievement, or -1 if no data
|
||||||
|
available.
|
||||||
</summary>
|
</summary>
|
||||||
</member>
|
</member>
|
||||||
<member name="M:Steamworks.Data.Achievement.Trigger(System.Boolean)">
|
<member name="M:Steamworks.Data.Achievement.Trigger(System.Boolean)">
|
||||||
@ -461,7 +464,8 @@
|
|||||||
<member name="T:Steamworks.Data.DurationControl">
|
<member name="T:Steamworks.Data.DurationControl">
|
||||||
<summary>
|
<summary>
|
||||||
Sent for games with enabled anti indulgence / duration control, for enabled users.
|
Sent for games with enabled anti indulgence / duration control, for enabled users.
|
||||||
Lets the game know whether persistent rewards or XP should be granted at normal rate, half rate, or zero rate.
|
Lets the game know whether persistent rewards or XP should be granted at normal rate, half rate, or zero
|
||||||
|
rate.
|
||||||
</summary>
|
</summary>
|
||||||
</member>
|
</member>
|
||||||
<member name="P:Steamworks.Data.DurationControl.Appid">
|
<member name="P:Steamworks.Data.DurationControl.Appid">
|
||||||
@ -476,7 +480,8 @@
|
|||||||
</member>
|
</member>
|
||||||
<member name="P:Steamworks.Data.DurationControl.PlaytimeInLastFiveHours">
|
<member name="P:Steamworks.Data.DurationControl.PlaytimeInLastFiveHours">
|
||||||
<summary>
|
<summary>
|
||||||
playtime since most recent 5 hour gap in playtime, only counting up to regulatory limit of playtime, in seconds
|
playtime since most recent 5 hour gap in playtime, only counting up to regulatory limit of playtime, in
|
||||||
|
seconds
|
||||||
</summary>
|
</summary>
|
||||||
</member>
|
</member>
|
||||||
<member name="P:Steamworks.Data.DurationControl.PlaytimeToday">
|
<member name="P:Steamworks.Data.DurationControl.PlaytimeToday">
|
||||||
@ -516,9 +521,12 @@
|
|||||||
</member>
|
</member>
|
||||||
<member name="M:Steamworks.Data.Leaderboard.GetScoresAroundUserAsync(System.Int32,System.Int32)">
|
<member name="M:Steamworks.Data.Leaderboard.GetScoresAroundUserAsync(System.Int32,System.Int32)">
|
||||||
<summary>
|
<summary>
|
||||||
Used to retrieve leaderboard entries relative a user's entry. If there are not enough entries in the leaderboard
|
Used to retrieve leaderboard entries relative a user's entry. If there are not enough entries in the
|
||||||
before or after the user's entry, Steam will adjust the range to try to return the number of entries requested.
|
leaderboard
|
||||||
For example, if the user is #1 on the leaderboard and start is set to -2, end is set to 2, Steam will return the first
|
before or after the user's entry, Steam will adjust the range to try to return the number of entries
|
||||||
|
requested.
|
||||||
|
For example, if the user is #1 on the leaderboard and start is set to -2, end is set to 2, Steam will
|
||||||
|
return the first
|
||||||
5 entries in the leaderboard. If The current user has no entry, this will return null.
|
5 entries in the leaderboard. If The current user has no entry, this will return null.
|
||||||
</summary>
|
</summary>
|
||||||
</member>
|
</member>
|
||||||
@ -816,17 +824,21 @@
|
|||||||
</member>
|
</member>
|
||||||
<member name="M:Steamworks.ISteamInventory.GetResultItems(Steamworks.Data.SteamInventoryResult_t,Steamworks.Data.SteamItemDetails_t[],System.UInt32@)">
|
<member name="M:Steamworks.ISteamInventory.GetResultItems(Steamworks.Data.SteamInventoryResult_t,Steamworks.Data.SteamItemDetails_t[],System.UInt32@)">
|
||||||
<summary>
|
<summary>
|
||||||
Copies the contents of a result set into a flat array. The specific contents of the result set depend on which query which was used.
|
Copies the contents of a result set into a flat array. The specific contents of the result set depend on
|
||||||
|
which query which was used.
|
||||||
</summary>
|
</summary>
|
||||||
</member>
|
</member>
|
||||||
<member name="M:Steamworks.ISteamInventory.GetResultTimestamp(Steamworks.Data.SteamInventoryResult_t)">
|
<member name="M:Steamworks.ISteamInventory.GetResultTimestamp(Steamworks.Data.SteamInventoryResult_t)">
|
||||||
<summary>
|
<summary>
|
||||||
Returns the server time at which the result was generated. Compare against the value of IClientUtils::GetServerRealTime() to determine age.
|
Returns the server time at which the result was generated. Compare against the value of
|
||||||
|
IClientUtils::GetServerRealTime() to determine age.
|
||||||
</summary>
|
</summary>
|
||||||
</member>
|
</member>
|
||||||
<member name="M:Steamworks.ISteamInventory.CheckResultSteamID(Steamworks.Data.SteamInventoryResult_t,Steamworks.SteamId)">
|
<member name="M:Steamworks.ISteamInventory.CheckResultSteamID(Steamworks.Data.SteamInventoryResult_t,Steamworks.SteamId)">
|
||||||
<summary>
|
<summary>
|
||||||
Returns true if the result belongs to the target steam ID or false if the result does not. This is important when using DeserializeResult to verify that a remote player is not pretending to have a different users inventory.
|
Returns true if the result belongs to the target steam ID or false if the result does not. This is
|
||||||
|
important when using DeserializeResult to verify that a remote player is not pretending to have a
|
||||||
|
different users inventory.
|
||||||
</summary>
|
</summary>
|
||||||
</member>
|
</member>
|
||||||
<member name="M:Steamworks.ISteamInventory.DestroyResult(Steamworks.Data.SteamInventoryResult_t)">
|
<member name="M:Steamworks.ISteamInventory.DestroyResult(Steamworks.Data.SteamInventoryResult_t)">
|
||||||
@ -841,12 +853,14 @@
|
|||||||
</member>
|
</member>
|
||||||
<member name="M:Steamworks.ISteamInventory.GetItemsByID(Steamworks.Data.SteamInventoryResult_t@,Steamworks.Data.InventoryItemId@,System.UInt32)">
|
<member name="M:Steamworks.ISteamInventory.GetItemsByID(Steamworks.Data.SteamInventoryResult_t@,Steamworks.Data.InventoryItemId@,System.UInt32)">
|
||||||
<summary>
|
<summary>
|
||||||
Captures the state of a subset of the current users Steam inventory identified by an array of item instance IDs.
|
Captures the state of a subset of the current users Steam inventory identified by an array of item
|
||||||
|
instance IDs.
|
||||||
</summary>
|
</summary>
|
||||||
</member>
|
</member>
|
||||||
<member name="M:Steamworks.ISteamInventory.GrantPromoItems(Steamworks.Data.SteamInventoryResult_t@)">
|
<member name="M:Steamworks.ISteamInventory.GrantPromoItems(Steamworks.Data.SteamInventoryResult_t@)">
|
||||||
<summary>
|
<summary>
|
||||||
GrantPromoItems() checks the list of promotional items for which the user may be eligible and grants the items (one time only).
|
GrantPromoItems() checks the list of promotional items for which the user may be eligible and grants the
|
||||||
|
items (one time only).
|
||||||
</summary>
|
</summary>
|
||||||
</member>
|
</member>
|
||||||
<member name="M:Steamworks.ISteamInventory.ConsumeItem(Steamworks.Data.SteamInventoryResult_t@,Steamworks.Data.InventoryItemId,System.UInt32)">
|
<member name="M:Steamworks.ISteamInventory.ConsumeItem(Steamworks.Data.SteamInventoryResult_t@,Steamworks.Data.InventoryItemId,System.UInt32)">
|
||||||
@ -871,7 +885,8 @@
|
|||||||
</member>
|
</member>
|
||||||
<member name="M:Steamworks.ISteamUserStats.DownloadLeaderboardEntriesForUsers(Steamworks.Data.SteamLeaderboard_t,Steamworks.SteamId[],System.Int32)">
|
<member name="M:Steamworks.ISteamUserStats.DownloadLeaderboardEntriesForUsers(Steamworks.Data.SteamLeaderboard_t,Steamworks.SteamId[],System.Int32)">
|
||||||
<summary>
|
<summary>
|
||||||
Downloads leaderboard entries for an arbitrary set of users - ELeaderboardDataRequest is k_ELeaderboardDataRequestUsers
|
Downloads leaderboard entries for an arbitrary set of users - ELeaderboardDataRequest is
|
||||||
|
k_ELeaderboardDataRequestUsers
|
||||||
</summary>
|
</summary>
|
||||||
</member>
|
</member>
|
||||||
<member name="P:Steamworks.ConnectionManager.Interface">
|
<member name="P:Steamworks.ConnectionManager.Interface">
|
||||||
@ -1025,7 +1040,8 @@
|
|||||||
</member>
|
</member>
|
||||||
<member name="P:Steamworks.SteamApps.IsSubscribedFromFamilySharing">
|
<member name="P:Steamworks.SteamApps.IsSubscribedFromFamilySharing">
|
||||||
<summary>
|
<summary>
|
||||||
Check if user borrowed this game via Family Sharing, If true, call GetAppOwner() to get the lender SteamID
|
Check if user borrowed this game via Family Sharing, If true, call GetAppOwner() to get the lender
|
||||||
|
SteamID
|
||||||
</summary>
|
</summary>
|
||||||
</member>
|
</member>
|
||||||
<member name="P:Steamworks.SteamApps.IsLowVoilence">
|
<member name="P:Steamworks.SteamApps.IsLowVoilence">
|
||||||
@ -1102,7 +1118,8 @@
|
|||||||
<summary>
|
<summary>
|
||||||
Allows you to force verify game content on next launch.
|
Allows you to force verify game content on next launch.
|
||||||
|
|
||||||
If you detect the game is out-of-date(for example, by having the client detect a version mismatch with a server),
|
If you detect the game is out-of-date(for example, by having the client detect a version mismatch with a
|
||||||
|
server),
|
||||||
you can call use MarkContentCorrupt to force a verify, show a message to the user, and then quit.
|
you can call use MarkContentCorrupt to force a verify, show a message to the user, and then quit.
|
||||||
</summary>
|
</summary>
|
||||||
</member>
|
</member>
|
||||||
@ -1114,24 +1131,30 @@
|
|||||||
<member name="M:Steamworks.SteamApps.AppInstallDir(Steamworks.AppId)">
|
<member name="M:Steamworks.SteamApps.AppInstallDir(Steamworks.AppId)">
|
||||||
<summary>
|
<summary>
|
||||||
Gets the install folder for a specific AppID.
|
Gets the install folder for a specific AppID.
|
||||||
This works even if the application is not installed, based on where the game would be installed with the default Steam library location.
|
This works even if the application is not installed, based on where the game would be installed with the
|
||||||
|
default Steam library location.
|
||||||
</summary>
|
</summary>
|
||||||
</member>
|
</member>
|
||||||
<member name="M:Steamworks.SteamApps.IsAppInstalled(Steamworks.AppId)">
|
<member name="M:Steamworks.SteamApps.IsAppInstalled(Steamworks.AppId)">
|
||||||
<summary>
|
<summary>
|
||||||
The app may not actually be owned by the current user, they may have it left over from a free weekend, etc.
|
The app may not actually be owned by the current user, they may have it left over from a free weekend,
|
||||||
|
etc.
|
||||||
</summary>
|
</summary>
|
||||||
</member>
|
</member>
|
||||||
<member name="P:Steamworks.SteamApps.AppOwner">
|
<member name="P:Steamworks.SteamApps.AppOwner">
|
||||||
<summary>
|
<summary>
|
||||||
Gets the Steam ID of the original owner of the current app. If it's different from the current user then it is borrowed..
|
Gets the Steam ID of the original owner of the current app. If it's different from the current user then
|
||||||
|
it is borrowed..
|
||||||
</summary>
|
</summary>
|
||||||
</member>
|
</member>
|
||||||
<member name="M:Steamworks.SteamApps.GetLaunchParam(System.String)">
|
<member name="M:Steamworks.SteamApps.GetLaunchParam(System.String)">
|
||||||
<summary>
|
<summary>
|
||||||
Gets the associated launch parameter if the game is run via steam://run/appid/?param1=value1;param2=value2;param3=value3 etc.
|
Gets the associated launch parameter if the game is run via
|
||||||
Parameter names starting with the character '@' are reserved for internal use and will always return an empty string.
|
steam://run/appid/?param1=value1;param2=value2;param3=value3 etc.
|
||||||
Parameter names starting with an underscore '_' are reserved for steam features -- they can be queried by the game,
|
Parameter names starting with the character '@' are reserved for internal use and will always return an
|
||||||
|
empty string.
|
||||||
|
Parameter names starting with an underscore '_' are reserved for steam features -- they can be queried
|
||||||
|
by the game,
|
||||||
but it is advised that you not param names beginning with an underscore for your own features.
|
but it is advised that you not param names beginning with an underscore for your own features.
|
||||||
</summary>
|
</summary>
|
||||||
</member>
|
</member>
|
||||||
@ -1280,13 +1303,16 @@
|
|||||||
<summary>
|
<summary>
|
||||||
"steamid" - Opens the overlay web browser to the specified user or groups profile.
|
"steamid" - Opens the overlay web browser to the specified user or groups profile.
|
||||||
"chat" - Opens a chat window to the specified user, or joins the group chat.
|
"chat" - Opens a chat window to the specified user, or joins the group chat.
|
||||||
"jointrade" - Opens a window to a Steam Trading session that was started with the ISteamEconomy/StartTrade Web API.
|
"jointrade" - Opens a window to a Steam Trading session that was started with the
|
||||||
|
ISteamEconomy/StartTrade Web API.
|
||||||
"stats" - Opens the overlay web browser to the specified user's stats.
|
"stats" - Opens the overlay web browser to the specified user's stats.
|
||||||
"achievements" - Opens the overlay web browser to the specified user's achievements.
|
"achievements" - Opens the overlay web browser to the specified user's achievements.
|
||||||
"friendadd" - Opens the overlay in minimal mode prompting the user to add the target user as a friend.
|
"friendadd" - Opens the overlay in minimal mode prompting the user to add the target user as a friend.
|
||||||
"friendremove" - Opens the overlay in minimal mode prompting the user to remove the target friend.
|
"friendremove" - Opens the overlay in minimal mode prompting the user to remove the target friend.
|
||||||
"friendrequestaccept" - Opens the overlay in minimal mode prompting the user to accept an incoming friend invite.
|
"friendrequestaccept" - Opens the overlay in minimal mode prompting the user to accept an incoming
|
||||||
"friendrequestignore" - Opens the overlay in minimal mode prompting the user to ignore an incoming friend invite.
|
friend invite.
|
||||||
|
"friendrequestignore" - Opens the overlay in minimal mode prompting the user to ignore an incoming
|
||||||
|
friend invite.
|
||||||
</summary>
|
</summary>
|
||||||
</member>
|
</member>
|
||||||
<member name="M:Steamworks.SteamFriends.OpenStoreOverlay(Steamworks.AppId)">
|
<member name="M:Steamworks.SteamFriends.OpenStoreOverlay(Steamworks.AppId)">
|
||||||
@ -1301,7 +1327,8 @@
|
|||||||
</member>
|
</member>
|
||||||
<member name="M:Steamworks.SteamFriends.OpenGameInviteOverlay(Steamworks.SteamId)">
|
<member name="M:Steamworks.SteamFriends.OpenGameInviteOverlay(Steamworks.SteamId)">
|
||||||
<summary>
|
<summary>
|
||||||
Activates the Steam Overlay to open the invite dialog. Invitations sent from this dialog will be for the provided lobby.
|
Activates the Steam Overlay to open the invite dialog. Invitations sent from this dialog will be for the
|
||||||
|
provided lobby.
|
||||||
</summary>
|
</summary>
|
||||||
</member>
|
</member>
|
||||||
<member name="M:Steamworks.SteamFriends.SetPlayedWith(Steamworks.SteamId)">
|
<member name="M:Steamworks.SteamFriends.SetPlayedWith(Steamworks.SteamId)">
|
||||||
@ -1313,7 +1340,8 @@
|
|||||||
<member name="M:Steamworks.SteamFriends.RequestUserInformation(Steamworks.SteamId,System.Boolean)">
|
<member name="M:Steamworks.SteamFriends.RequestUserInformation(Steamworks.SteamId,System.Boolean)">
|
||||||
<summary>
|
<summary>
|
||||||
Requests the persona name and optionally the avatar of a specified user.
|
Requests the persona name and optionally the avatar of a specified user.
|
||||||
NOTE: It's a lot slower to download avatars and churns the local cache, so if you don't need avatars, don't request them.
|
NOTE: It's a lot slower to download avatars and churns the local cache, so if you don't need avatars,
|
||||||
|
don't request them.
|
||||||
returns true if we're fetching the data, false if we already have it
|
returns true if we're fetching the data, false if we already have it
|
||||||
</summary>
|
</summary>
|
||||||
</member>
|
</member>
|
||||||
@ -1335,7 +1363,8 @@
|
|||||||
<member name="P:Steamworks.SteamFriends.ListenForFriendsMessages">
|
<member name="P:Steamworks.SteamFriends.ListenForFriendsMessages">
|
||||||
<summary>
|
<summary>
|
||||||
Listens for Steam friends chat messages.
|
Listens for Steam friends chat messages.
|
||||||
You can then show these chats inline in the game. For example with a Blizzard style chat message system or the chat system in Dota 2.
|
You can then show these chats inline in the game. For example with a Blizzard style chat message system
|
||||||
|
or the chat system in Dota 2.
|
||||||
After enabling this you will receive callbacks when ever the user receives a chat message.
|
After enabling this you will receive callbacks when ever the user receives a chat message.
|
||||||
</summary>
|
</summary>
|
||||||
</member>
|
</member>
|
||||||
@ -1658,14 +1687,16 @@
|
|||||||
<member name="M:Steamworks.SteamNetworking.SendP2PPacket(Steamworks.SteamId,System.Byte[],System.Int32,System.Int32,Steamworks.P2PSend)">
|
<member name="M:Steamworks.SteamNetworking.SendP2PPacket(Steamworks.SteamId,System.Byte[],System.Int32,System.Int32,Steamworks.P2PSend)">
|
||||||
<summary>
|
<summary>
|
||||||
Sends a P2P packet to the specified user.
|
Sends a P2P packet to the specified user.
|
||||||
This is a session-less API which automatically establishes NAT-traversing or Steam relay server connections.
|
This is a session-less API which automatically establishes NAT-traversing or Steam relay server
|
||||||
|
connections.
|
||||||
NOTE: The first packet send may be delayed as the NAT-traversal code runs.
|
NOTE: The first packet send may be delayed as the NAT-traversal code runs.
|
||||||
</summary>
|
</summary>
|
||||||
</member>
|
</member>
|
||||||
<member name="M:Steamworks.SteamNetworking.SendP2PPacket(Steamworks.SteamId,System.Byte*,System.UInt32,System.Int32,Steamworks.P2PSend)">
|
<member name="M:Steamworks.SteamNetworking.SendP2PPacket(Steamworks.SteamId,System.Byte*,System.UInt32,System.Int32,Steamworks.P2PSend)">
|
||||||
<summary>
|
<summary>
|
||||||
Sends a P2P packet to the specified user.
|
Sends a P2P packet to the specified user.
|
||||||
This is a session-less API which automatically establishes NAT-traversing or Steam relay server connections.
|
This is a session-less API which automatically establishes NAT-traversing or Steam relay server
|
||||||
|
connections.
|
||||||
NOTE: The first packet send may be delayed as the NAT-traversal code runs.
|
NOTE: The first packet send may be delayed as the NAT-traversal code runs.
|
||||||
</summary>
|
</summary>
|
||||||
</member>
|
</member>
|
||||||
@ -1691,12 +1722,14 @@
|
|||||||
</member>
|
</member>
|
||||||
<member name="M:Steamworks.SteamNetworkingSockets.ConnectNormal``1(Steamworks.Data.NetAddress)">
|
<member name="M:Steamworks.SteamNetworkingSockets.ConnectNormal``1(Steamworks.Data.NetAddress)">
|
||||||
<summary>
|
<summary>
|
||||||
Connect to a socket created via <method>CreateListenSocketIP</method>
|
Connect to a socket created via
|
||||||
|
<method>CreateListenSocketIP</method>
|
||||||
</summary>
|
</summary>
|
||||||
</member>
|
</member>
|
||||||
<member name="M:Steamworks.SteamNetworkingSockets.ConnectNormal(Steamworks.Data.NetAddress,Steamworks.IConnectionManager)">
|
<member name="M:Steamworks.SteamNetworkingSockets.ConnectNormal(Steamworks.Data.NetAddress,Steamworks.IConnectionManager)">
|
||||||
<summary>
|
<summary>
|
||||||
Connect to a socket created via <method>CreateListenSocketIP</method>
|
Connect to a socket created via
|
||||||
|
<method>CreateListenSocketIP</method>
|
||||||
</summary>
|
</summary>
|
||||||
</member>
|
</member>
|
||||||
<member name="M:Steamworks.SteamNetworkingSockets.CreateRelaySocket``1(System.Int32)">
|
<member name="M:Steamworks.SteamNetworkingSockets.CreateRelaySocket``1(System.Int32)">
|
||||||
@ -1839,7 +1872,8 @@
|
|||||||
</member>
|
</member>
|
||||||
<member name="M:Steamworks.SteamNetworkingUtils.OnDebugMessage(Steamworks.NetDebugOutput,System.IntPtr)">
|
<member name="M:Steamworks.SteamNetworkingUtils.OnDebugMessage(Steamworks.NetDebugOutput,System.IntPtr)">
|
||||||
<summary>
|
<summary>
|
||||||
This can be called from other threads - so we're going to queue these up and process them in a safe place.
|
This can be called from other threads - so we're going to queue these up and process them in a safe
|
||||||
|
place.
|
||||||
</summary>
|
</summary>
|
||||||
</member>
|
</member>
|
||||||
<member name="M:Steamworks.SteamNetworkingUtils.OutputDebugMessages">
|
<member name="M:Steamworks.SteamNetworkingUtils.OutputDebugMessages">
|
||||||
@ -1908,7 +1942,8 @@
|
|||||||
</member>
|
</member>
|
||||||
<member name="T:Steamworks.SteamRemotePlay">
|
<member name="T:Steamworks.SteamRemotePlay">
|
||||||
<summary>
|
<summary>
|
||||||
Functions that provide information about Steam Remote Play sessions, streaming your game content to another computer or to a Steam Link app or hardware.
|
Functions that provide information about Steam Remote Play sessions, streaming your game content to
|
||||||
|
another computer or to a Steam Link app or hardware.
|
||||||
</summary>
|
</summary>
|
||||||
</member>
|
</member>
|
||||||
<member name="E:Steamworks.SteamRemotePlay.OnSessionConnected">
|
<member name="E:Steamworks.SteamRemotePlay.OnSessionConnected">
|
||||||
@ -1976,7 +2011,8 @@
|
|||||||
</member>
|
</member>
|
||||||
<member name="M:Steamworks.SteamRemoteStorage.FileForget(System.String)">
|
<member name="M:Steamworks.SteamRemoteStorage.FileForget(System.String)">
|
||||||
<summary>
|
<summary>
|
||||||
Deletes the file from remote storage, but leaves it on the local disk and remains accessible from the API.
|
Deletes the file from remote storage, but leaves it on the local disk and remains accessible from the
|
||||||
|
API.
|
||||||
</summary>
|
</summary>
|
||||||
</member>
|
</member>
|
||||||
<member name="M:Steamworks.SteamRemoteStorage.FileDelete(System.String)">
|
<member name="M:Steamworks.SteamRemoteStorage.FileDelete(System.String)">
|
||||||
@ -2054,15 +2090,20 @@
|
|||||||
</member>
|
</member>
|
||||||
<member name="M:Steamworks.SteamScreenshots.WriteScreenshot(System.Byte[],System.Int32,System.Int32)">
|
<member name="M:Steamworks.SteamScreenshots.WriteScreenshot(System.Byte[],System.Int32,System.Int32)">
|
||||||
<summary>
|
<summary>
|
||||||
Writes a screenshot to the user's screenshot library given the raw image data, which must be in RGB format.
|
Writes a screenshot to the user's screenshot library given the raw image data, which must be in RGB
|
||||||
The return value is a handle that is valid for the duration of the game process and can be used to apply tags.
|
format.
|
||||||
|
The return value is a handle that is valid for the duration of the game process and can be used to apply
|
||||||
|
tags.
|
||||||
</summary>
|
</summary>
|
||||||
</member>
|
</member>
|
||||||
<member name="M:Steamworks.SteamScreenshots.AddScreenshot(System.String,System.String,System.Int32,System.Int32)">
|
<member name="M:Steamworks.SteamScreenshots.AddScreenshot(System.String,System.String,System.Int32,System.Int32)">
|
||||||
<summary>
|
<summary>
|
||||||
Adds a screenshot to the user's screenshot library from disk. If a thumbnail is provided, it must be 200 pixels wide and the same aspect ratio
|
Adds a screenshot to the user's screenshot library from disk. If a thumbnail is provided, it must be 200
|
||||||
as the screenshot, otherwise a thumbnail will be generated if the user uploads the screenshot. The screenshots must be in either JPEG or TGA format.
|
pixels wide and the same aspect ratio
|
||||||
The return value is a handle that is valid for the duration of the game process and can be used to apply tags.
|
as the screenshot, otherwise a thumbnail will be generated if the user uploads the screenshot. The
|
||||||
|
screenshots must be in either JPEG or TGA format.
|
||||||
|
The return value is a handle that is valid for the duration of the game process and can be used to apply
|
||||||
|
tags.
|
||||||
JPEG, TGA, and PNG formats are supported.
|
JPEG, TGA, and PNG formats are supported.
|
||||||
</summary>
|
</summary>
|
||||||
</member>
|
</member>
|
||||||
@ -2075,10 +2116,13 @@
|
|||||||
</member>
|
</member>
|
||||||
<member name="P:Steamworks.SteamScreenshots.Hooked">
|
<member name="P:Steamworks.SteamScreenshots.Hooked">
|
||||||
<summary>
|
<summary>
|
||||||
Toggles whether the overlay handles screenshots when the user presses the screenshot hotkey, or if the game handles them.
|
Toggles whether the overlay handles screenshots when the user presses the screenshot hotkey, or if the
|
||||||
|
game handles them.
|
||||||
Hooking is disabled by default, and only ever enabled if you do so with this function.
|
Hooking is disabled by default, and only ever enabled if you do so with this function.
|
||||||
If the hooking is enabled, then the ScreenshotRequested_t callback will be sent if the user presses the hotkey or
|
If the hooking is enabled, then the ScreenshotRequested_t callback will be sent if the user presses the
|
||||||
when TriggerScreenshot is called, and then the game is expected to call WriteScreenshot or AddScreenshotToLibrary in response.
|
hotkey or
|
||||||
|
when TriggerScreenshot is called, and then the game is expected to call WriteScreenshot or
|
||||||
|
AddScreenshotToLibrary in response.
|
||||||
</summary>
|
</summary>
|
||||||
</member>
|
</member>
|
||||||
<member name="T:Steamworks.SteamServer">
|
<member name="T:Steamworks.SteamServer">
|
||||||
@ -2099,7 +2143,8 @@
|
|||||||
</member>
|
</member>
|
||||||
<member name="E:Steamworks.SteamServer.OnSteamServerConnectFailure">
|
<member name="E:Steamworks.SteamServer.OnSteamServerConnectFailure">
|
||||||
<summary>
|
<summary>
|
||||||
This will occur periodically if the Steam client is not connected, and has failed when retrying to establish a connection (result, stilltrying)
|
This will occur periodically if the Steam client is not connected, and has failed when retrying to
|
||||||
|
establish a connection (result, stilltrying)
|
||||||
</summary>
|
</summary>
|
||||||
</member>
|
</member>
|
||||||
<member name="E:Steamworks.SteamServer.OnSteamServersDisconnected">
|
<member name="E:Steamworks.SteamServer.OnSteamServersDisconnected">
|
||||||
@ -2307,7 +2352,8 @@
|
|||||||
</member>
|
</member>
|
||||||
<member name="M:Steamworks.SteamServerStats.ClearAchievement(Steamworks.SteamId,System.String)">
|
<member name="M:Steamworks.SteamServerStats.ClearAchievement(Steamworks.SteamId,System.String)">
|
||||||
<summary>
|
<summary>
|
||||||
Resets the unlock status of an achievement for the specified user. Must have called Refresh on a steamid first.
|
Resets the unlock status of an achievement for the specified user. Must have called Refresh on a steamid
|
||||||
|
first.
|
||||||
Remember to use Commit after use.
|
Remember to use Commit after use.
|
||||||
</summary>
|
</summary>
|
||||||
</member>
|
</member>
|
||||||
@ -2419,8 +2465,10 @@
|
|||||||
</member>
|
</member>
|
||||||
<member name="E:Steamworks.SteamUser.OnGameWebCallback">
|
<member name="E:Steamworks.SteamUser.OnGameWebCallback">
|
||||||
<summary>
|
<summary>
|
||||||
Sent to your game in response to a steam://gamewebcallback/ command from a user clicking a link in the Steam overlay browser.
|
Sent to your game in response to a steam://gamewebcallback/ command from a user clicking a link in the
|
||||||
You can use this to add support for external site signups where you want to pop back into the browser after some web page
|
Steam overlay browser.
|
||||||
|
You can use this to add support for external site signups where you want to pop back into the browser
|
||||||
|
after some web page
|
||||||
signup sequence, and optionally get back some detail about that.
|
signup sequence, and optionally get back some detail about that.
|
||||||
</summary>
|
</summary>
|
||||||
</member>
|
</member>
|
||||||
@ -2447,8 +2495,10 @@
|
|||||||
<summary>
|
<summary>
|
||||||
Reads the voice data and returns the number of bytes written.
|
Reads the voice data and returns the number of bytes written.
|
||||||
The compressed data can be transmitted by your application and decoded back into raw audio data using
|
The compressed data can be transmitted by your application and decoded back into raw audio data using
|
||||||
DecompressVoice on the other side. The compressed data provided is in an arbitrary format and is not meant to be played directly.
|
DecompressVoice on the other side. The compressed data provided is in an arbitrary format and is not
|
||||||
This should be called once per frame, and at worst no more than four times a second to keep the microphone input delay as low as
|
meant to be played directly.
|
||||||
|
This should be called once per frame, and at worst no more than four times a second to keep the
|
||||||
|
microphone input delay as low as
|
||||||
possible. Calling this any less may result in gaps in the returned stream.
|
possible. Calling this any less may result in gaps in the returned stream.
|
||||||
</summary>
|
</summary>
|
||||||
</member>
|
</member>
|
||||||
@ -2462,7 +2512,8 @@
|
|||||||
<member name="M:Steamworks.SteamUser.DecompressVoice(System.IO.Stream,System.Int32,System.IO.Stream)">
|
<member name="M:Steamworks.SteamUser.DecompressVoice(System.IO.Stream,System.Int32,System.IO.Stream)">
|
||||||
<summary>
|
<summary>
|
||||||
Decodes the compressed voice data returned by GetVoice.
|
Decodes the compressed voice data returned by GetVoice.
|
||||||
The output data is raw single-channel 16-bit PCM audio.The decoder supports any sample rate from 11025 to 48000.
|
The output data is raw single-channel 16-bit PCM audio.The decoder supports any sample rate from 11025
|
||||||
|
to 48000.
|
||||||
</summary>
|
</summary>
|
||||||
</member>
|
</member>
|
||||||
<member name="M:Steamworks.SteamUser.GetAuthSessionTicket">
|
<member name="M:Steamworks.SteamUser.GetAuthSessionTicket">
|
||||||
@ -2491,10 +2542,15 @@
|
|||||||
</member>
|
</member>
|
||||||
<member name="M:Steamworks.SteamUser.GetStoreAuthUrlAsync(System.String)">
|
<member name="M:Steamworks.SteamUser.GetStoreAuthUrlAsync(System.String)">
|
||||||
<summary>
|
<summary>
|
||||||
Requests a URL which authenticates an in-game browser for store check-out, and then redirects to the specified URL.
|
Requests a URL which authenticates an in-game browser for store check-out, and then redirects to the
|
||||||
As long as the in-game browser accepts and handles session cookies, Steam microtransaction checkout pages will automatically recognize the user instead of presenting a login page.
|
specified URL.
|
||||||
NOTE: The URL has a very short lifetime to prevent history-snooping attacks, so you should only call this API when you are about to launch the browser, or else immediately navigate to the result URL using a hidden browser window.
|
As long as the in-game browser accepts and handles session cookies, Steam microtransaction checkout
|
||||||
NOTE: The resulting authorization cookie has an expiration time of one day, so it would be a good idea to request and visit a new auth URL every 12 hours.
|
pages will automatically recognize the user instead of presenting a login page.
|
||||||
|
NOTE: The URL has a very short lifetime to prevent history-snooping attacks, so you should only call
|
||||||
|
this API when you are about to launch the browser, or else immediately navigate to the result URL using
|
||||||
|
a hidden browser window.
|
||||||
|
NOTE: The resulting authorization cookie has an expiration time of one day, so it would be a good idea
|
||||||
|
to request and visit a new auth URL every 12 hours.
|
||||||
</summary>
|
</summary>
|
||||||
</member>
|
</member>
|
||||||
<member name="P:Steamworks.SteamUser.IsPhoneVerified">
|
<member name="P:Steamworks.SteamUser.IsPhoneVerified">
|
||||||
@ -2523,7 +2579,8 @@
|
|||||||
The encryption key can be obtained from the Encrypted App Ticket Key page on the App Admin for your app.
|
The encryption key can be obtained from the Encrypted App Ticket Key page on the App Admin for your app.
|
||||||
There can only be one call pending, and this call is subject to a 60 second rate limit.
|
There can only be one call pending, and this call is subject to a 60 second rate limit.
|
||||||
If you get a null result from this it's probably because you're calling it too often.
|
If you get a null result from this it's probably because you're calling it too often.
|
||||||
This can fail if you don't have an encrypted ticket set for your app here https://partner.steamgames.com/apps/sdkauth/
|
This can fail if you don't have an encrypted ticket set for your app here
|
||||||
|
https://partner.steamgames.com/apps/sdkauth/
|
||||||
</summary>
|
</summary>
|
||||||
</member>
|
</member>
|
||||||
<member name="M:Steamworks.SteamUser.RequestEncryptedAppTicketAsync">
|
<member name="M:Steamworks.SteamUser.RequestEncryptedAppTicketAsync">
|
||||||
@ -2531,7 +2588,8 @@
|
|||||||
Requests an application ticket encrypted with the secret "encrypted app ticket key".
|
Requests an application ticket encrypted with the secret "encrypted app ticket key".
|
||||||
The encryption key can be obtained from the Encrypted App Ticket Key page on the App Admin for your app.
|
The encryption key can be obtained from the Encrypted App Ticket Key page on the App Admin for your app.
|
||||||
There can only be one call pending, and this call is subject to a 60 second rate limit.
|
There can only be one call pending, and this call is subject to a 60 second rate limit.
|
||||||
This can fail if you don't have an encrypted ticket set for your app here https://partner.steamgames.com/apps/sdkauth/
|
This can fail if you don't have an encrypted ticket set for your app here
|
||||||
|
https://partner.steamgames.com/apps/sdkauth/
|
||||||
</summary>
|
</summary>
|
||||||
</member>
|
</member>
|
||||||
<member name="M:Steamworks.SteamUser.GetDurationControl">
|
<member name="M:Steamworks.SteamUser.GetDurationControl">
|
||||||
@ -2589,13 +2647,19 @@
|
|||||||
<member name="M:Steamworks.SteamUserStats.StoreStats">
|
<member name="M:Steamworks.SteamUserStats.StoreStats">
|
||||||
<summary>
|
<summary>
|
||||||
Send the changed stats and achievements data to the server for permanent storage.
|
Send the changed stats and achievements data to the server for permanent storage.
|
||||||
If this fails then nothing is sent to the server. It's advisable to keep trying until the call is successful.
|
If this fails then nothing is sent to the server. It's advisable to keep trying until the call is
|
||||||
This call can be rate limited. Call frequency should be on the order of minutes, rather than seconds.You should only be calling this during major state changes such as the end of a round, the map changing, or the user leaving a server. This call is required to display the achievement unlock notification dialog though, so if you have called SetAchievement then it's advisable to call this soon after that.
|
successful.
|
||||||
If you have stats or achievements that you have saved locally but haven't uploaded with this function when your application process ends then this function will automatically be called.
|
This call can be rate limited. Call frequency should be on the order of minutes, rather than seconds.You
|
||||||
|
should only be calling this during major state changes such as the end of a round, the map changing, or
|
||||||
|
the user leaving a server. This call is required to display the achievement unlock notification dialog
|
||||||
|
though, so if you have called SetAchievement then it's advisable to call this soon after that.
|
||||||
|
If you have stats or achievements that you have saved locally but haven't uploaded with this function
|
||||||
|
when your application process ends then this function will automatically be called.
|
||||||
You can find additional debug information written to the %steam_install%\logs\stats_log.txt file.
|
You can find additional debug information written to the %steam_install%\logs\stats_log.txt file.
|
||||||
This function returns true upon success if :
|
This function returns true upon success if :
|
||||||
RequestCurrentStats has completed and successfully returned its callback AND
|
RequestCurrentStats has completed and successfully returned its callback AND
|
||||||
the current game has stats associated with it in the Steamworks Partner backend, and those stats are published.
|
the current game has stats associated with it in the Steamworks Partner backend, and those stats are
|
||||||
|
published.
|
||||||
</summary>
|
</summary>
|
||||||
</member>
|
</member>
|
||||||
<member name="M:Steamworks.SteamUserStats.RequestCurrentStats">
|
<member name="M:Steamworks.SteamUserStats.RequestCurrentStats">
|
||||||
@ -2613,8 +2677,12 @@
|
|||||||
You must have called RequestCurrentStats and it needs to return successfully via
|
You must have called RequestCurrentStats and it needs to return successfully via
|
||||||
its callback prior to calling this.
|
its callback prior to calling this.
|
||||||
</summary>
|
</summary>
|
||||||
<param name="days">How many days of day-by-day history to retrieve in addition to the overall totals. The limit is 60.</param>
|
<param name="days">How many days of day-by-day history to retrieve in addition to the overall totals. The
|
||||||
<returns>OK indicates success, InvalidState means you need to call RequestCurrentStats first, Fail means the remote call failed</returns>
|
limit is 60.
|
||||||
|
</param>
|
||||||
|
<returns>OK indicates success, InvalidState means you need to call RequestCurrentStats first, Fail means the
|
||||||
|
remote call failed
|
||||||
|
</returns>
|
||||||
</member>
|
</member>
|
||||||
<member name="M:Steamworks.SteamUserStats.FindOrCreateLeaderboardAsync(System.String,Steamworks.Data.LeaderboardSort,Steamworks.Data.LeaderboardDisplay)">
|
<member name="M:Steamworks.SteamUserStats.FindOrCreateLeaderboardAsync(System.String,Steamworks.Data.LeaderboardSort,Steamworks.Data.LeaderboardDisplay)">
|
||||||
<summary>
|
<summary>
|
||||||
@ -2692,7 +2760,8 @@
|
|||||||
</member>
|
</member>
|
||||||
<member name="E:Steamworks.SteamUtils.OnGamepadTextInputDismissed">
|
<member name="E:Steamworks.SteamUtils.OnGamepadTextInputDismissed">
|
||||||
<summary>
|
<summary>
|
||||||
Big Picture gamepad text input has been closed. Parameter is true if text was submitted, false if cancelled etc.
|
Big Picture gamepad text input has been closed. Parameter is true if text was submitted, false if
|
||||||
|
cancelled etc.
|
||||||
</summary>
|
</summary>
|
||||||
</member>
|
</member>
|
||||||
<member name="P:Steamworks.SteamUtils.SecondsSinceAppActive">
|
<member name="P:Steamworks.SteamUtils.SecondsSinceAppActive">
|
||||||
@ -2712,7 +2781,8 @@
|
|||||||
</member>
|
</member>
|
||||||
<member name="P:Steamworks.SteamUtils.IpCountry">
|
<member name="P:Steamworks.SteamUtils.IpCountry">
|
||||||
<summary>
|
<summary>
|
||||||
returns the 2 digit ISO 3166-1-alpha-2 format country code this client is running in (as looked up via an IP-to-location database)
|
returns the 2 digit ISO 3166-1-alpha-2 format country code this client is running in (as looked up via
|
||||||
|
an IP-to-location database)
|
||||||
e.g "US" or "UK".
|
e.g "US" or "UK".
|
||||||
</summary>
|
</summary>
|
||||||
</member>
|
</member>
|
||||||
@ -2741,13 +2811,16 @@
|
|||||||
<member name="P:Steamworks.SteamUtils.OverlayNotificationPosition">
|
<member name="P:Steamworks.SteamUtils.OverlayNotificationPosition">
|
||||||
<summary>
|
<summary>
|
||||||
Sets the position where the overlay instance for the currently calling game should show notifications.
|
Sets the position where the overlay instance for the currently calling game should show notifications.
|
||||||
This position is per-game and if this function is called from outside of a game context it will do nothing.
|
This position is per-game and if this function is called from outside of a game context it will do
|
||||||
|
nothing.
|
||||||
</summary>
|
</summary>
|
||||||
</member>
|
</member>
|
||||||
<member name="P:Steamworks.SteamUtils.IsOverlayEnabled">
|
<member name="P:Steamworks.SteamUtils.IsOverlayEnabled">
|
||||||
<summary>
|
<summary>
|
||||||
Returns true if the overlay is running and the user can access it. The overlay process could take a few seconds to
|
Returns true if the overlay is running and the user can access it. The overlay process could take a few
|
||||||
start and hook the game process, so this function will initially return false while the overlay is loading.
|
seconds to
|
||||||
|
start and hook the game process, so this function will initially return false while the overlay is
|
||||||
|
loading.
|
||||||
</summary>
|
</summary>
|
||||||
</member>
|
</member>
|
||||||
<member name="P:Steamworks.SteamUtils.DoesOverlayNeedPresent">
|
<member name="P:Steamworks.SteamUtils.DoesOverlayNeedPresent">
|
||||||
@ -2758,14 +2831,16 @@
|
|||||||
However, if you have a game that only refreshes the screen on an event driven basis then that can break
|
However, if you have a game that only refreshes the screen on an event driven basis then that can break
|
||||||
the overlay, as it uses your Present/SwapBuffers calls to drive it's internal frame loop and it may also
|
the overlay, as it uses your Present/SwapBuffers calls to drive it's internal frame loop and it may also
|
||||||
need to Present() to the screen any time an even needing a notification happens or when the overlay is
|
need to Present() to the screen any time an even needing a notification happens or when the overlay is
|
||||||
brought up over the game by a user. You can use this API to ask the overlay if it currently need a present
|
brought up over the game by a user. You can use this API to ask the overlay if it currently need a
|
||||||
|
present
|
||||||
in that case, and then you can check for this periodically (roughly 33hz is desirable) and make sure you
|
in that case, and then you can check for this periodically (roughly 33hz is desirable) and make sure you
|
||||||
refresh the screen with Present or SwapBuffers to allow the overlay to do it's work.
|
refresh the screen with Present or SwapBuffers to allow the overlay to do it's work.
|
||||||
</summary>
|
</summary>
|
||||||
</member>
|
</member>
|
||||||
<member name="M:Steamworks.SteamUtils.CheckFileSignatureAsync(System.String)">
|
<member name="M:Steamworks.SteamUtils.CheckFileSignatureAsync(System.String)">
|
||||||
<summary>
|
<summary>
|
||||||
Asynchronous call to check if an executable file has been signed using the public key set on the signing tab
|
Asynchronous call to check if an executable file has been signed using the public key set on the signing
|
||||||
|
tab
|
||||||
of the partner site, for example to refuse to load modified executable files.
|
of the partner site, for example to refuse to load modified executable files.
|
||||||
</summary>
|
</summary>
|
||||||
</member>
|
</member>
|
||||||
@ -2810,8 +2885,10 @@
|
|||||||
<member name="P:Steamworks.SteamUtils.VrHeadsetStreaming">
|
<member name="P:Steamworks.SteamUtils.VrHeadsetStreaming">
|
||||||
<summary>
|
<summary>
|
||||||
Set whether the HMD content will be streamed via Steam In-Home Streaming
|
Set whether the HMD content will be streamed via Steam In-Home Streaming
|
||||||
If this is set to true, then the scene in the HMD headset will be streamed, and remote input will not be allowed.
|
If this is set to true, then the scene in the HMD headset will be streamed, and remote input will not be
|
||||||
If this is set to false, then the application window will be streamed instead, and remote input will be allowed.
|
allowed.
|
||||||
|
If this is set to false, then the application window will be streamed instead, and remote input will be
|
||||||
|
allowed.
|
||||||
The default is true unless "VRHeadsetStreaming" "0" is in the extended appinfo for a game.
|
The default is true unless "VRHeadsetStreaming" "0" is in the extended appinfo for a game.
|
||||||
(this is useful for games that have asymmetric multiplayer gameplay)
|
(this is useful for games that have asymmetric multiplayer gameplay)
|
||||||
</summary>
|
</summary>
|
||||||
@ -2944,7 +3021,9 @@
|
|||||||
Gets a the time this achievement was unlocked.
|
Gets a the time this achievement was unlocked.
|
||||||
</summary>
|
</summary>
|
||||||
<param name="statName">The name of the achievement you want to get</param>
|
<param name="statName">The name of the achievement you want to get</param>
|
||||||
<returns>The time unlocked. If it wasn't unlocked, or you haven't downloaded the stats yet - will return DateTime.MinValue</returns>
|
<returns>The time unlocked. If it wasn't unlocked, or you haven't downloaded the stats yet - will return
|
||||||
|
DateTime.MinValue
|
||||||
|
</returns>
|
||||||
</member>
|
</member>
|
||||||
<member name="P:Steamworks.InventoryDef.Name">
|
<member name="P:Steamworks.InventoryDef.Name">
|
||||||
<summary>
|
<summary>
|
||||||
@ -3073,10 +3152,14 @@
|
|||||||
</member>
|
</member>
|
||||||
<member name="M:Steamworks.InventoryItem.ConsumeAsync(System.Int32)">
|
<member name="M:Steamworks.InventoryItem.ConsumeAsync(System.Int32)">
|
||||||
<summary>
|
<summary>
|
||||||
Consumes items from a user's inventory. If the quantity of the given item goes to zero, it is permanently removed.
|
Consumes items from a user's inventory. If the quantity of the given item goes to zero, it is
|
||||||
Once an item is removed it cannot be recovered.This is not for the faint of heart - if your game implements item removal at all,
|
permanently removed.
|
||||||
a high-friction UI confirmation process is highly recommended.ConsumeItem can be restricted to certain item definitions or fully
|
Once an item is removed it cannot be recovered.This is not for the faint of heart - if your game
|
||||||
blocked via the Steamworks website to minimize support/abuse issues such as the classic "my brother borrowed my laptop and deleted all of my rare items".
|
implements item removal at all,
|
||||||
|
a high-friction UI confirmation process is highly recommended.ConsumeItem can be restricted to certain
|
||||||
|
item definitions or fully
|
||||||
|
blocked via the Steamworks website to minimize support/abuse issues such as the classic "my brother
|
||||||
|
borrowed my laptop and deleted all of my rare items".
|
||||||
</summary>
|
</summary>
|
||||||
</member>
|
</member>
|
||||||
<member name="M:Steamworks.InventoryItem.SplitStackAsync(System.Int32)">
|
<member name="M:Steamworks.InventoryItem.SplitStackAsync(System.Int32)">
|
||||||
@ -3140,18 +3223,24 @@
|
|||||||
<member name="M:Steamworks.InventoryResult.BelongsTo(Steamworks.SteamId)">
|
<member name="M:Steamworks.InventoryResult.BelongsTo(Steamworks.SteamId)">
|
||||||
<summary>
|
<summary>
|
||||||
Checks whether an inventory result handle belongs to the specified Steam ID.
|
Checks whether an inventory result handle belongs to the specified Steam ID.
|
||||||
This is important when using Deserialize, to verify that a remote player is not pretending to have a different user's inventory
|
This is important when using Deserialize, to verify that a remote player is not pretending to have a
|
||||||
|
different user's inventory
|
||||||
</summary>
|
</summary>
|
||||||
</member>
|
</member>
|
||||||
<member name="M:Steamworks.InventoryResult.Serialize">
|
<member name="M:Steamworks.InventoryResult.Serialize">
|
||||||
<summary>
|
<summary>
|
||||||
Serialized result sets contain a short signature which can't be forged or replayed across different game sessions.
|
Serialized result sets contain a short signature which can't be forged or replayed across different game
|
||||||
A result set can be serialized on the local client, transmitted to other players via your game networking, and
|
sessions.
|
||||||
|
A result set can be serialized on the local client, transmitted to other players via your game
|
||||||
|
networking, and
|
||||||
deserialized by the remote players.This is a secure way of preventing hackers from lying about posessing
|
deserialized by the remote players.This is a secure way of preventing hackers from lying about posessing
|
||||||
rare/high-value items. Serializes a result set with signature bytes to an output buffer.The size of a serialized
|
rare/high-value items. Serializes a result set with signature bytes to an output buffer.The size of a
|
||||||
result depends on the number items which are being serialized.When securely transmitting items to other players,
|
serialized
|
||||||
|
result depends on the number items which are being serialized.When securely transmitting items to other
|
||||||
|
players,
|
||||||
it is recommended to use GetItemsByID first to create a minimal result set.
|
it is recommended to use GetItemsByID first to create a minimal result set.
|
||||||
Results have a built-in timestamp which will be considered "expired" after an hour has elapsed.See DeserializeResult
|
Results have a built-in timestamp which will be considered "expired" after an hour has elapsed.See
|
||||||
|
DeserializeResult
|
||||||
for expiration handling.
|
for expiration handling.
|
||||||
</summary>
|
</summary>
|
||||||
</member>
|
</member>
|
||||||
@ -3173,15 +3262,18 @@
|
|||||||
</member>
|
</member>
|
||||||
<member name="M:Steamworks.PartyBeacon.OnReservationCompleted(Steamworks.SteamId)">
|
<member name="M:Steamworks.PartyBeacon.OnReservationCompleted(Steamworks.SteamId)">
|
||||||
<summary>
|
<summary>
|
||||||
When a user follows your beacon, Steam will reserve one of the open party slots for them, and send your game a ReservationNotification callback.
|
When a user follows your beacon, Steam will reserve one of the open party slots for them, and send your
|
||||||
When that user joins your party, call OnReservationCompleted to notify Steam that the user has joined successfully
|
game a ReservationNotification callback.
|
||||||
|
When that user joins your party, call OnReservationCompleted to notify Steam that the user has joined
|
||||||
|
successfully
|
||||||
</summary>
|
</summary>
|
||||||
</member>
|
</member>
|
||||||
<member name="M:Steamworks.PartyBeacon.CancelReservation(Steamworks.SteamId)">
|
<member name="M:Steamworks.PartyBeacon.CancelReservation(Steamworks.SteamId)">
|
||||||
<summary>
|
<summary>
|
||||||
To cancel a reservation (due to timeout or user input), call this.
|
To cancel a reservation (due to timeout or user input), call this.
|
||||||
Steam will open a new reservation slot.
|
Steam will open a new reservation slot.
|
||||||
Note: The user may already be in-flight to your game, so it's possible they will still connect and try to join your party.
|
Note: The user may already be in-flight to your game, so it's possible they will still connect and try
|
||||||
|
to join your party.
|
||||||
</summary>
|
</summary>
|
||||||
</member>
|
</member>
|
||||||
<member name="M:Steamworks.PartyBeacon.Destroy">
|
<member name="M:Steamworks.PartyBeacon.Destroy">
|
||||||
@ -3197,14 +3289,17 @@
|
|||||||
</member>
|
</member>
|
||||||
<member name="F:Steamworks.SteamServerInit.VersionString">
|
<member name="F:Steamworks.SteamServerInit.VersionString">
|
||||||
<summary>
|
<summary>
|
||||||
The version string is usually in the form x.x.x.x, and is used by the master server to detect when the server is out of date.
|
The version string is usually in the form x.x.x.x, and is used by the master server to detect when the
|
||||||
If you go into the dedicated server tab on steamworks you'll be able to server the latest version. If this version number is
|
server is out of date.
|
||||||
|
If you go into the dedicated server tab on steamworks you'll be able to server the latest version. If
|
||||||
|
this version number is
|
||||||
less than that latest version then your server won't show.
|
less than that latest version then your server won't show.
|
||||||
</summary>
|
</summary>
|
||||||
</member>
|
</member>
|
||||||
<member name="F:Steamworks.SteamServerInit.ModDir">
|
<member name="F:Steamworks.SteamServerInit.ModDir">
|
||||||
<summary>
|
<summary>
|
||||||
This should be the same directory game where gets installed into. Just the folder name, not the whole path. I.e. "Rust", "Garrysmod".
|
This should be the same directory game where gets installed into. Just the folder name, not the whole
|
||||||
|
path. I.e. "Rust", "Garrysmod".
|
||||||
</summary>
|
</summary>
|
||||||
</member>
|
</member>
|
||||||
<member name="F:Steamworks.SteamServerInit.GameDescription">
|
<member name="F:Steamworks.SteamServerInit.GameDescription">
|
||||||
@ -3224,8 +3319,10 @@
|
|||||||
</member>
|
</member>
|
||||||
<member name="M:Steamworks.SteamServerInit.WithQueryShareGamePort">
|
<member name="M:Steamworks.SteamServerInit.WithQueryShareGamePort">
|
||||||
<summary>
|
<summary>
|
||||||
If you pass MASTERSERVERUPDATERPORT_USEGAMESOCKETSHARE into usQueryPort, then it causes the game server API to use
|
If you pass MASTERSERVERUPDATERPORT_USEGAMESOCKETSHARE into usQueryPort, then it causes the game server
|
||||||
"GameSocketShare" mode, which means that the game is responsible for sending and receiving UDP packets for the master
|
API to use
|
||||||
|
"GameSocketShare" mode, which means that the game is responsible for sending and receiving UDP packets
|
||||||
|
for the master
|
||||||
server updater.
|
server updater.
|
||||||
|
|
||||||
More info about this here: https://partner.steamgames.com/doc/api/ISteamGameServer#HandleIncomingPacket
|
More info about this here: https://partner.steamgames.com/doc/api/ISteamGameServer#HandleIncomingPacket
|
||||||
|
@ -299,7 +299,8 @@
|
|||||||
</member>
|
</member>
|
||||||
<member name="M:Steamworks.Data.Connection.Close(System.Boolean,System.Int32,System.String)">
|
<member name="M:Steamworks.Data.Connection.Close(System.Boolean,System.Int32,System.String)">
|
||||||
<summary>
|
<summary>
|
||||||
Disconnects from the remote host and invalidates the connection handle. Any unread data on the connection is discarded..
|
Disconnects from the remote host and invalidates the connection handle. Any unread data on the
|
||||||
|
connection is discarded..
|
||||||
reasonCode is defined and used by you.
|
reasonCode is defined and used by you.
|
||||||
</summary>
|
</summary>
|
||||||
</member>
|
</member>
|
||||||
@ -435,7 +436,8 @@
|
|||||||
<member name="M:Steamworks.Data.Achievement.GetIcon">
|
<member name="M:Steamworks.Data.Achievement.GetIcon">
|
||||||
<summary>
|
<summary>
|
||||||
Gets the icon of the achievement. This can return a null image even though the image exists if the image
|
Gets the icon of the achievement. This can return a null image even though the image exists if the image
|
||||||
hasn't been downloaded by Steam yet. You can use GetIconAsync if you want to wait for the image to be downloaded.
|
hasn't been downloaded by Steam yet. You can use GetIconAsync if you want to wait for the image to be
|
||||||
|
downloaded.
|
||||||
</summary>
|
</summary>
|
||||||
</member>
|
</member>
|
||||||
<member name="M:Steamworks.Data.Achievement.GetIconAsync(System.Int32)">
|
<member name="M:Steamworks.Data.Achievement.GetIconAsync(System.Int32)">
|
||||||
@ -445,7 +447,8 @@
|
|||||||
</member>
|
</member>
|
||||||
<member name="P:Steamworks.Data.Achievement.GlobalUnlocked">
|
<member name="P:Steamworks.Data.Achievement.GlobalUnlocked">
|
||||||
<summary>
|
<summary>
|
||||||
Returns the fraction (0-1) of users who have unlocked the specified achievement, or -1 if no data available.
|
Returns the fraction (0-1) of users who have unlocked the specified achievement, or -1 if no data
|
||||||
|
available.
|
||||||
</summary>
|
</summary>
|
||||||
</member>
|
</member>
|
||||||
<member name="M:Steamworks.Data.Achievement.Trigger(System.Boolean)">
|
<member name="M:Steamworks.Data.Achievement.Trigger(System.Boolean)">
|
||||||
@ -461,7 +464,8 @@
|
|||||||
<member name="T:Steamworks.Data.DurationControl">
|
<member name="T:Steamworks.Data.DurationControl">
|
||||||
<summary>
|
<summary>
|
||||||
Sent for games with enabled anti indulgence / duration control, for enabled users.
|
Sent for games with enabled anti indulgence / duration control, for enabled users.
|
||||||
Lets the game know whether persistent rewards or XP should be granted at normal rate, half rate, or zero rate.
|
Lets the game know whether persistent rewards or XP should be granted at normal rate, half rate, or zero
|
||||||
|
rate.
|
||||||
</summary>
|
</summary>
|
||||||
</member>
|
</member>
|
||||||
<member name="P:Steamworks.Data.DurationControl.Appid">
|
<member name="P:Steamworks.Data.DurationControl.Appid">
|
||||||
@ -476,7 +480,8 @@
|
|||||||
</member>
|
</member>
|
||||||
<member name="P:Steamworks.Data.DurationControl.PlaytimeInLastFiveHours">
|
<member name="P:Steamworks.Data.DurationControl.PlaytimeInLastFiveHours">
|
||||||
<summary>
|
<summary>
|
||||||
playtime since most recent 5 hour gap in playtime, only counting up to regulatory limit of playtime, in seconds
|
playtime since most recent 5 hour gap in playtime, only counting up to regulatory limit of playtime, in
|
||||||
|
seconds
|
||||||
</summary>
|
</summary>
|
||||||
</member>
|
</member>
|
||||||
<member name="P:Steamworks.Data.DurationControl.PlaytimeToday">
|
<member name="P:Steamworks.Data.DurationControl.PlaytimeToday">
|
||||||
@ -516,9 +521,12 @@
|
|||||||
</member>
|
</member>
|
||||||
<member name="M:Steamworks.Data.Leaderboard.GetScoresAroundUserAsync(System.Int32,System.Int32)">
|
<member name="M:Steamworks.Data.Leaderboard.GetScoresAroundUserAsync(System.Int32,System.Int32)">
|
||||||
<summary>
|
<summary>
|
||||||
Used to retrieve leaderboard entries relative a user's entry. If there are not enough entries in the leaderboard
|
Used to retrieve leaderboard entries relative a user's entry. If there are not enough entries in the
|
||||||
before or after the user's entry, Steam will adjust the range to try to return the number of entries requested.
|
leaderboard
|
||||||
For example, if the user is #1 on the leaderboard and start is set to -2, end is set to 2, Steam will return the first
|
before or after the user's entry, Steam will adjust the range to try to return the number of entries
|
||||||
|
requested.
|
||||||
|
For example, if the user is #1 on the leaderboard and start is set to -2, end is set to 2, Steam will
|
||||||
|
return the first
|
||||||
5 entries in the leaderboard. If The current user has no entry, this will return null.
|
5 entries in the leaderboard. If The current user has no entry, this will return null.
|
||||||
</summary>
|
</summary>
|
||||||
</member>
|
</member>
|
||||||
@ -816,17 +824,21 @@
|
|||||||
</member>
|
</member>
|
||||||
<member name="M:Steamworks.ISteamInventory.GetResultItems(Steamworks.Data.SteamInventoryResult_t,Steamworks.Data.SteamItemDetails_t[],System.UInt32@)">
|
<member name="M:Steamworks.ISteamInventory.GetResultItems(Steamworks.Data.SteamInventoryResult_t,Steamworks.Data.SteamItemDetails_t[],System.UInt32@)">
|
||||||
<summary>
|
<summary>
|
||||||
Copies the contents of a result set into a flat array. The specific contents of the result set depend on which query which was used.
|
Copies the contents of a result set into a flat array. The specific contents of the result set depend on
|
||||||
|
which query which was used.
|
||||||
</summary>
|
</summary>
|
||||||
</member>
|
</member>
|
||||||
<member name="M:Steamworks.ISteamInventory.GetResultTimestamp(Steamworks.Data.SteamInventoryResult_t)">
|
<member name="M:Steamworks.ISteamInventory.GetResultTimestamp(Steamworks.Data.SteamInventoryResult_t)">
|
||||||
<summary>
|
<summary>
|
||||||
Returns the server time at which the result was generated. Compare against the value of IClientUtils::GetServerRealTime() to determine age.
|
Returns the server time at which the result was generated. Compare against the value of
|
||||||
|
IClientUtils::GetServerRealTime() to determine age.
|
||||||
</summary>
|
</summary>
|
||||||
</member>
|
</member>
|
||||||
<member name="M:Steamworks.ISteamInventory.CheckResultSteamID(Steamworks.Data.SteamInventoryResult_t,Steamworks.SteamId)">
|
<member name="M:Steamworks.ISteamInventory.CheckResultSteamID(Steamworks.Data.SteamInventoryResult_t,Steamworks.SteamId)">
|
||||||
<summary>
|
<summary>
|
||||||
Returns true if the result belongs to the target steam ID or false if the result does not. This is important when using DeserializeResult to verify that a remote player is not pretending to have a different users inventory.
|
Returns true if the result belongs to the target steam ID or false if the result does not. This is
|
||||||
|
important when using DeserializeResult to verify that a remote player is not pretending to have a
|
||||||
|
different users inventory.
|
||||||
</summary>
|
</summary>
|
||||||
</member>
|
</member>
|
||||||
<member name="M:Steamworks.ISteamInventory.DestroyResult(Steamworks.Data.SteamInventoryResult_t)">
|
<member name="M:Steamworks.ISteamInventory.DestroyResult(Steamworks.Data.SteamInventoryResult_t)">
|
||||||
@ -841,12 +853,14 @@
|
|||||||
</member>
|
</member>
|
||||||
<member name="M:Steamworks.ISteamInventory.GetItemsByID(Steamworks.Data.SteamInventoryResult_t@,Steamworks.Data.InventoryItemId@,System.UInt32)">
|
<member name="M:Steamworks.ISteamInventory.GetItemsByID(Steamworks.Data.SteamInventoryResult_t@,Steamworks.Data.InventoryItemId@,System.UInt32)">
|
||||||
<summary>
|
<summary>
|
||||||
Captures the state of a subset of the current users Steam inventory identified by an array of item instance IDs.
|
Captures the state of a subset of the current users Steam inventory identified by an array of item
|
||||||
|
instance IDs.
|
||||||
</summary>
|
</summary>
|
||||||
</member>
|
</member>
|
||||||
<member name="M:Steamworks.ISteamInventory.GrantPromoItems(Steamworks.Data.SteamInventoryResult_t@)">
|
<member name="M:Steamworks.ISteamInventory.GrantPromoItems(Steamworks.Data.SteamInventoryResult_t@)">
|
||||||
<summary>
|
<summary>
|
||||||
GrantPromoItems() checks the list of promotional items for which the user may be eligible and grants the items (one time only).
|
GrantPromoItems() checks the list of promotional items for which the user may be eligible and grants the
|
||||||
|
items (one time only).
|
||||||
</summary>
|
</summary>
|
||||||
</member>
|
</member>
|
||||||
<member name="M:Steamworks.ISteamInventory.ConsumeItem(Steamworks.Data.SteamInventoryResult_t@,Steamworks.Data.InventoryItemId,System.UInt32)">
|
<member name="M:Steamworks.ISteamInventory.ConsumeItem(Steamworks.Data.SteamInventoryResult_t@,Steamworks.Data.InventoryItemId,System.UInt32)">
|
||||||
@ -871,7 +885,8 @@
|
|||||||
</member>
|
</member>
|
||||||
<member name="M:Steamworks.ISteamUserStats.DownloadLeaderboardEntriesForUsers(Steamworks.Data.SteamLeaderboard_t,Steamworks.SteamId[],System.Int32)">
|
<member name="M:Steamworks.ISteamUserStats.DownloadLeaderboardEntriesForUsers(Steamworks.Data.SteamLeaderboard_t,Steamworks.SteamId[],System.Int32)">
|
||||||
<summary>
|
<summary>
|
||||||
Downloads leaderboard entries for an arbitrary set of users - ELeaderboardDataRequest is k_ELeaderboardDataRequestUsers
|
Downloads leaderboard entries for an arbitrary set of users - ELeaderboardDataRequest is
|
||||||
|
k_ELeaderboardDataRequestUsers
|
||||||
</summary>
|
</summary>
|
||||||
</member>
|
</member>
|
||||||
<member name="P:Steamworks.ConnectionManager.Interface">
|
<member name="P:Steamworks.ConnectionManager.Interface">
|
||||||
@ -1025,7 +1040,8 @@
|
|||||||
</member>
|
</member>
|
||||||
<member name="P:Steamworks.SteamApps.IsSubscribedFromFamilySharing">
|
<member name="P:Steamworks.SteamApps.IsSubscribedFromFamilySharing">
|
||||||
<summary>
|
<summary>
|
||||||
Check if user borrowed this game via Family Sharing, If true, call GetAppOwner() to get the lender SteamID
|
Check if user borrowed this game via Family Sharing, If true, call GetAppOwner() to get the lender
|
||||||
|
SteamID
|
||||||
</summary>
|
</summary>
|
||||||
</member>
|
</member>
|
||||||
<member name="P:Steamworks.SteamApps.IsLowVoilence">
|
<member name="P:Steamworks.SteamApps.IsLowVoilence">
|
||||||
@ -1102,7 +1118,8 @@
|
|||||||
<summary>
|
<summary>
|
||||||
Allows you to force verify game content on next launch.
|
Allows you to force verify game content on next launch.
|
||||||
|
|
||||||
If you detect the game is out-of-date(for example, by having the client detect a version mismatch with a server),
|
If you detect the game is out-of-date(for example, by having the client detect a version mismatch with a
|
||||||
|
server),
|
||||||
you can call use MarkContentCorrupt to force a verify, show a message to the user, and then quit.
|
you can call use MarkContentCorrupt to force a verify, show a message to the user, and then quit.
|
||||||
</summary>
|
</summary>
|
||||||
</member>
|
</member>
|
||||||
@ -1114,24 +1131,30 @@
|
|||||||
<member name="M:Steamworks.SteamApps.AppInstallDir(Steamworks.AppId)">
|
<member name="M:Steamworks.SteamApps.AppInstallDir(Steamworks.AppId)">
|
||||||
<summary>
|
<summary>
|
||||||
Gets the install folder for a specific AppID.
|
Gets the install folder for a specific AppID.
|
||||||
This works even if the application is not installed, based on where the game would be installed with the default Steam library location.
|
This works even if the application is not installed, based on where the game would be installed with the
|
||||||
|
default Steam library location.
|
||||||
</summary>
|
</summary>
|
||||||
</member>
|
</member>
|
||||||
<member name="M:Steamworks.SteamApps.IsAppInstalled(Steamworks.AppId)">
|
<member name="M:Steamworks.SteamApps.IsAppInstalled(Steamworks.AppId)">
|
||||||
<summary>
|
<summary>
|
||||||
The app may not actually be owned by the current user, they may have it left over from a free weekend, etc.
|
The app may not actually be owned by the current user, they may have it left over from a free weekend,
|
||||||
|
etc.
|
||||||
</summary>
|
</summary>
|
||||||
</member>
|
</member>
|
||||||
<member name="P:Steamworks.SteamApps.AppOwner">
|
<member name="P:Steamworks.SteamApps.AppOwner">
|
||||||
<summary>
|
<summary>
|
||||||
Gets the Steam ID of the original owner of the current app. If it's different from the current user then it is borrowed..
|
Gets the Steam ID of the original owner of the current app. If it's different from the current user then
|
||||||
|
it is borrowed..
|
||||||
</summary>
|
</summary>
|
||||||
</member>
|
</member>
|
||||||
<member name="M:Steamworks.SteamApps.GetLaunchParam(System.String)">
|
<member name="M:Steamworks.SteamApps.GetLaunchParam(System.String)">
|
||||||
<summary>
|
<summary>
|
||||||
Gets the associated launch parameter if the game is run via steam://run/appid/?param1=value1;param2=value2;param3=value3 etc.
|
Gets the associated launch parameter if the game is run via
|
||||||
Parameter names starting with the character '@' are reserved for internal use and will always return an empty string.
|
steam://run/appid/?param1=value1;param2=value2;param3=value3 etc.
|
||||||
Parameter names starting with an underscore '_' are reserved for steam features -- they can be queried by the game,
|
Parameter names starting with the character '@' are reserved for internal use and will always return an
|
||||||
|
empty string.
|
||||||
|
Parameter names starting with an underscore '_' are reserved for steam features -- they can be queried
|
||||||
|
by the game,
|
||||||
but it is advised that you not param names beginning with an underscore for your own features.
|
but it is advised that you not param names beginning with an underscore for your own features.
|
||||||
</summary>
|
</summary>
|
||||||
</member>
|
</member>
|
||||||
@ -1280,13 +1303,16 @@
|
|||||||
<summary>
|
<summary>
|
||||||
"steamid" - Opens the overlay web browser to the specified user or groups profile.
|
"steamid" - Opens the overlay web browser to the specified user or groups profile.
|
||||||
"chat" - Opens a chat window to the specified user, or joins the group chat.
|
"chat" - Opens a chat window to the specified user, or joins the group chat.
|
||||||
"jointrade" - Opens a window to a Steam Trading session that was started with the ISteamEconomy/StartTrade Web API.
|
"jointrade" - Opens a window to a Steam Trading session that was started with the
|
||||||
|
ISteamEconomy/StartTrade Web API.
|
||||||
"stats" - Opens the overlay web browser to the specified user's stats.
|
"stats" - Opens the overlay web browser to the specified user's stats.
|
||||||
"achievements" - Opens the overlay web browser to the specified user's achievements.
|
"achievements" - Opens the overlay web browser to the specified user's achievements.
|
||||||
"friendadd" - Opens the overlay in minimal mode prompting the user to add the target user as a friend.
|
"friendadd" - Opens the overlay in minimal mode prompting the user to add the target user as a friend.
|
||||||
"friendremove" - Opens the overlay in minimal mode prompting the user to remove the target friend.
|
"friendremove" - Opens the overlay in minimal mode prompting the user to remove the target friend.
|
||||||
"friendrequestaccept" - Opens the overlay in minimal mode prompting the user to accept an incoming friend invite.
|
"friendrequestaccept" - Opens the overlay in minimal mode prompting the user to accept an incoming
|
||||||
"friendrequestignore" - Opens the overlay in minimal mode prompting the user to ignore an incoming friend invite.
|
friend invite.
|
||||||
|
"friendrequestignore" - Opens the overlay in minimal mode prompting the user to ignore an incoming
|
||||||
|
friend invite.
|
||||||
</summary>
|
</summary>
|
||||||
</member>
|
</member>
|
||||||
<member name="M:Steamworks.SteamFriends.OpenStoreOverlay(Steamworks.AppId)">
|
<member name="M:Steamworks.SteamFriends.OpenStoreOverlay(Steamworks.AppId)">
|
||||||
@ -1301,7 +1327,8 @@
|
|||||||
</member>
|
</member>
|
||||||
<member name="M:Steamworks.SteamFriends.OpenGameInviteOverlay(Steamworks.SteamId)">
|
<member name="M:Steamworks.SteamFriends.OpenGameInviteOverlay(Steamworks.SteamId)">
|
||||||
<summary>
|
<summary>
|
||||||
Activates the Steam Overlay to open the invite dialog. Invitations sent from this dialog will be for the provided lobby.
|
Activates the Steam Overlay to open the invite dialog. Invitations sent from this dialog will be for the
|
||||||
|
provided lobby.
|
||||||
</summary>
|
</summary>
|
||||||
</member>
|
</member>
|
||||||
<member name="M:Steamworks.SteamFriends.SetPlayedWith(Steamworks.SteamId)">
|
<member name="M:Steamworks.SteamFriends.SetPlayedWith(Steamworks.SteamId)">
|
||||||
@ -1313,7 +1340,8 @@
|
|||||||
<member name="M:Steamworks.SteamFriends.RequestUserInformation(Steamworks.SteamId,System.Boolean)">
|
<member name="M:Steamworks.SteamFriends.RequestUserInformation(Steamworks.SteamId,System.Boolean)">
|
||||||
<summary>
|
<summary>
|
||||||
Requests the persona name and optionally the avatar of a specified user.
|
Requests the persona name and optionally the avatar of a specified user.
|
||||||
NOTE: It's a lot slower to download avatars and churns the local cache, so if you don't need avatars, don't request them.
|
NOTE: It's a lot slower to download avatars and churns the local cache, so if you don't need avatars,
|
||||||
|
don't request them.
|
||||||
returns true if we're fetching the data, false if we already have it
|
returns true if we're fetching the data, false if we already have it
|
||||||
</summary>
|
</summary>
|
||||||
</member>
|
</member>
|
||||||
@ -1335,7 +1363,8 @@
|
|||||||
<member name="P:Steamworks.SteamFriends.ListenForFriendsMessages">
|
<member name="P:Steamworks.SteamFriends.ListenForFriendsMessages">
|
||||||
<summary>
|
<summary>
|
||||||
Listens for Steam friends chat messages.
|
Listens for Steam friends chat messages.
|
||||||
You can then show these chats inline in the game. For example with a Blizzard style chat message system or the chat system in Dota 2.
|
You can then show these chats inline in the game. For example with a Blizzard style chat message system
|
||||||
|
or the chat system in Dota 2.
|
||||||
After enabling this you will receive callbacks when ever the user receives a chat message.
|
After enabling this you will receive callbacks when ever the user receives a chat message.
|
||||||
</summary>
|
</summary>
|
||||||
</member>
|
</member>
|
||||||
@ -1658,14 +1687,16 @@
|
|||||||
<member name="M:Steamworks.SteamNetworking.SendP2PPacket(Steamworks.SteamId,System.Byte[],System.Int32,System.Int32,Steamworks.P2PSend)">
|
<member name="M:Steamworks.SteamNetworking.SendP2PPacket(Steamworks.SteamId,System.Byte[],System.Int32,System.Int32,Steamworks.P2PSend)">
|
||||||
<summary>
|
<summary>
|
||||||
Sends a P2P packet to the specified user.
|
Sends a P2P packet to the specified user.
|
||||||
This is a session-less API which automatically establishes NAT-traversing or Steam relay server connections.
|
This is a session-less API which automatically establishes NAT-traversing or Steam relay server
|
||||||
|
connections.
|
||||||
NOTE: The first packet send may be delayed as the NAT-traversal code runs.
|
NOTE: The first packet send may be delayed as the NAT-traversal code runs.
|
||||||
</summary>
|
</summary>
|
||||||
</member>
|
</member>
|
||||||
<member name="M:Steamworks.SteamNetworking.SendP2PPacket(Steamworks.SteamId,System.Byte*,System.UInt32,System.Int32,Steamworks.P2PSend)">
|
<member name="M:Steamworks.SteamNetworking.SendP2PPacket(Steamworks.SteamId,System.Byte*,System.UInt32,System.Int32,Steamworks.P2PSend)">
|
||||||
<summary>
|
<summary>
|
||||||
Sends a P2P packet to the specified user.
|
Sends a P2P packet to the specified user.
|
||||||
This is a session-less API which automatically establishes NAT-traversing or Steam relay server connections.
|
This is a session-less API which automatically establishes NAT-traversing or Steam relay server
|
||||||
|
connections.
|
||||||
NOTE: The first packet send may be delayed as the NAT-traversal code runs.
|
NOTE: The first packet send may be delayed as the NAT-traversal code runs.
|
||||||
</summary>
|
</summary>
|
||||||
</member>
|
</member>
|
||||||
@ -1691,12 +1722,14 @@
|
|||||||
</member>
|
</member>
|
||||||
<member name="M:Steamworks.SteamNetworkingSockets.ConnectNormal``1(Steamworks.Data.NetAddress)">
|
<member name="M:Steamworks.SteamNetworkingSockets.ConnectNormal``1(Steamworks.Data.NetAddress)">
|
||||||
<summary>
|
<summary>
|
||||||
Connect to a socket created via <method>CreateListenSocketIP</method>
|
Connect to a socket created via
|
||||||
|
<method>CreateListenSocketIP</method>
|
||||||
</summary>
|
</summary>
|
||||||
</member>
|
</member>
|
||||||
<member name="M:Steamworks.SteamNetworkingSockets.ConnectNormal(Steamworks.Data.NetAddress,Steamworks.IConnectionManager)">
|
<member name="M:Steamworks.SteamNetworkingSockets.ConnectNormal(Steamworks.Data.NetAddress,Steamworks.IConnectionManager)">
|
||||||
<summary>
|
<summary>
|
||||||
Connect to a socket created via <method>CreateListenSocketIP</method>
|
Connect to a socket created via
|
||||||
|
<method>CreateListenSocketIP</method>
|
||||||
</summary>
|
</summary>
|
||||||
</member>
|
</member>
|
||||||
<member name="M:Steamworks.SteamNetworkingSockets.CreateRelaySocket``1(System.Int32)">
|
<member name="M:Steamworks.SteamNetworkingSockets.CreateRelaySocket``1(System.Int32)">
|
||||||
@ -1839,7 +1872,8 @@
|
|||||||
</member>
|
</member>
|
||||||
<member name="M:Steamworks.SteamNetworkingUtils.OnDebugMessage(Steamworks.NetDebugOutput,System.IntPtr)">
|
<member name="M:Steamworks.SteamNetworkingUtils.OnDebugMessage(Steamworks.NetDebugOutput,System.IntPtr)">
|
||||||
<summary>
|
<summary>
|
||||||
This can be called from other threads - so we're going to queue these up and process them in a safe place.
|
This can be called from other threads - so we're going to queue these up and process them in a safe
|
||||||
|
place.
|
||||||
</summary>
|
</summary>
|
||||||
</member>
|
</member>
|
||||||
<member name="M:Steamworks.SteamNetworkingUtils.OutputDebugMessages">
|
<member name="M:Steamworks.SteamNetworkingUtils.OutputDebugMessages">
|
||||||
@ -1908,7 +1942,8 @@
|
|||||||
</member>
|
</member>
|
||||||
<member name="T:Steamworks.SteamRemotePlay">
|
<member name="T:Steamworks.SteamRemotePlay">
|
||||||
<summary>
|
<summary>
|
||||||
Functions that provide information about Steam Remote Play sessions, streaming your game content to another computer or to a Steam Link app or hardware.
|
Functions that provide information about Steam Remote Play sessions, streaming your game content to
|
||||||
|
another computer or to a Steam Link app or hardware.
|
||||||
</summary>
|
</summary>
|
||||||
</member>
|
</member>
|
||||||
<member name="E:Steamworks.SteamRemotePlay.OnSessionConnected">
|
<member name="E:Steamworks.SteamRemotePlay.OnSessionConnected">
|
||||||
@ -1976,7 +2011,8 @@
|
|||||||
</member>
|
</member>
|
||||||
<member name="M:Steamworks.SteamRemoteStorage.FileForget(System.String)">
|
<member name="M:Steamworks.SteamRemoteStorage.FileForget(System.String)">
|
||||||
<summary>
|
<summary>
|
||||||
Deletes the file from remote storage, but leaves it on the local disk and remains accessible from the API.
|
Deletes the file from remote storage, but leaves it on the local disk and remains accessible from the
|
||||||
|
API.
|
||||||
</summary>
|
</summary>
|
||||||
</member>
|
</member>
|
||||||
<member name="M:Steamworks.SteamRemoteStorage.FileDelete(System.String)">
|
<member name="M:Steamworks.SteamRemoteStorage.FileDelete(System.String)">
|
||||||
@ -2054,15 +2090,20 @@
|
|||||||
</member>
|
</member>
|
||||||
<member name="M:Steamworks.SteamScreenshots.WriteScreenshot(System.Byte[],System.Int32,System.Int32)">
|
<member name="M:Steamworks.SteamScreenshots.WriteScreenshot(System.Byte[],System.Int32,System.Int32)">
|
||||||
<summary>
|
<summary>
|
||||||
Writes a screenshot to the user's screenshot library given the raw image data, which must be in RGB format.
|
Writes a screenshot to the user's screenshot library given the raw image data, which must be in RGB
|
||||||
The return value is a handle that is valid for the duration of the game process and can be used to apply tags.
|
format.
|
||||||
|
The return value is a handle that is valid for the duration of the game process and can be used to apply
|
||||||
|
tags.
|
||||||
</summary>
|
</summary>
|
||||||
</member>
|
</member>
|
||||||
<member name="M:Steamworks.SteamScreenshots.AddScreenshot(System.String,System.String,System.Int32,System.Int32)">
|
<member name="M:Steamworks.SteamScreenshots.AddScreenshot(System.String,System.String,System.Int32,System.Int32)">
|
||||||
<summary>
|
<summary>
|
||||||
Adds a screenshot to the user's screenshot library from disk. If a thumbnail is provided, it must be 200 pixels wide and the same aspect ratio
|
Adds a screenshot to the user's screenshot library from disk. If a thumbnail is provided, it must be 200
|
||||||
as the screenshot, otherwise a thumbnail will be generated if the user uploads the screenshot. The screenshots must be in either JPEG or TGA format.
|
pixels wide and the same aspect ratio
|
||||||
The return value is a handle that is valid for the duration of the game process and can be used to apply tags.
|
as the screenshot, otherwise a thumbnail will be generated if the user uploads the screenshot. The
|
||||||
|
screenshots must be in either JPEG or TGA format.
|
||||||
|
The return value is a handle that is valid for the duration of the game process and can be used to apply
|
||||||
|
tags.
|
||||||
JPEG, TGA, and PNG formats are supported.
|
JPEG, TGA, and PNG formats are supported.
|
||||||
</summary>
|
</summary>
|
||||||
</member>
|
</member>
|
||||||
@ -2075,10 +2116,13 @@
|
|||||||
</member>
|
</member>
|
||||||
<member name="P:Steamworks.SteamScreenshots.Hooked">
|
<member name="P:Steamworks.SteamScreenshots.Hooked">
|
||||||
<summary>
|
<summary>
|
||||||
Toggles whether the overlay handles screenshots when the user presses the screenshot hotkey, or if the game handles them.
|
Toggles whether the overlay handles screenshots when the user presses the screenshot hotkey, or if the
|
||||||
|
game handles them.
|
||||||
Hooking is disabled by default, and only ever enabled if you do so with this function.
|
Hooking is disabled by default, and only ever enabled if you do so with this function.
|
||||||
If the hooking is enabled, then the ScreenshotRequested_t callback will be sent if the user presses the hotkey or
|
If the hooking is enabled, then the ScreenshotRequested_t callback will be sent if the user presses the
|
||||||
when TriggerScreenshot is called, and then the game is expected to call WriteScreenshot or AddScreenshotToLibrary in response.
|
hotkey or
|
||||||
|
when TriggerScreenshot is called, and then the game is expected to call WriteScreenshot or
|
||||||
|
AddScreenshotToLibrary in response.
|
||||||
</summary>
|
</summary>
|
||||||
</member>
|
</member>
|
||||||
<member name="T:Steamworks.SteamServer">
|
<member name="T:Steamworks.SteamServer">
|
||||||
@ -2099,7 +2143,8 @@
|
|||||||
</member>
|
</member>
|
||||||
<member name="E:Steamworks.SteamServer.OnSteamServerConnectFailure">
|
<member name="E:Steamworks.SteamServer.OnSteamServerConnectFailure">
|
||||||
<summary>
|
<summary>
|
||||||
This will occur periodically if the Steam client is not connected, and has failed when retrying to establish a connection (result, stilltrying)
|
This will occur periodically if the Steam client is not connected, and has failed when retrying to
|
||||||
|
establish a connection (result, stilltrying)
|
||||||
</summary>
|
</summary>
|
||||||
</member>
|
</member>
|
||||||
<member name="E:Steamworks.SteamServer.OnSteamServersDisconnected">
|
<member name="E:Steamworks.SteamServer.OnSteamServersDisconnected">
|
||||||
@ -2307,7 +2352,8 @@
|
|||||||
</member>
|
</member>
|
||||||
<member name="M:Steamworks.SteamServerStats.ClearAchievement(Steamworks.SteamId,System.String)">
|
<member name="M:Steamworks.SteamServerStats.ClearAchievement(Steamworks.SteamId,System.String)">
|
||||||
<summary>
|
<summary>
|
||||||
Resets the unlock status of an achievement for the specified user. Must have called Refresh on a steamid first.
|
Resets the unlock status of an achievement for the specified user. Must have called Refresh on a steamid
|
||||||
|
first.
|
||||||
Remember to use Commit after use.
|
Remember to use Commit after use.
|
||||||
</summary>
|
</summary>
|
||||||
</member>
|
</member>
|
||||||
@ -2419,8 +2465,10 @@
|
|||||||
</member>
|
</member>
|
||||||
<member name="E:Steamworks.SteamUser.OnGameWebCallback">
|
<member name="E:Steamworks.SteamUser.OnGameWebCallback">
|
||||||
<summary>
|
<summary>
|
||||||
Sent to your game in response to a steam://gamewebcallback/ command from a user clicking a link in the Steam overlay browser.
|
Sent to your game in response to a steam://gamewebcallback/ command from a user clicking a link in the
|
||||||
You can use this to add support for external site signups where you want to pop back into the browser after some web page
|
Steam overlay browser.
|
||||||
|
You can use this to add support for external site signups where you want to pop back into the browser
|
||||||
|
after some web page
|
||||||
signup sequence, and optionally get back some detail about that.
|
signup sequence, and optionally get back some detail about that.
|
||||||
</summary>
|
</summary>
|
||||||
</member>
|
</member>
|
||||||
@ -2447,8 +2495,10 @@
|
|||||||
<summary>
|
<summary>
|
||||||
Reads the voice data and returns the number of bytes written.
|
Reads the voice data and returns the number of bytes written.
|
||||||
The compressed data can be transmitted by your application and decoded back into raw audio data using
|
The compressed data can be transmitted by your application and decoded back into raw audio data using
|
||||||
DecompressVoice on the other side. The compressed data provided is in an arbitrary format and is not meant to be played directly.
|
DecompressVoice on the other side. The compressed data provided is in an arbitrary format and is not
|
||||||
This should be called once per frame, and at worst no more than four times a second to keep the microphone input delay as low as
|
meant to be played directly.
|
||||||
|
This should be called once per frame, and at worst no more than four times a second to keep the
|
||||||
|
microphone input delay as low as
|
||||||
possible. Calling this any less may result in gaps in the returned stream.
|
possible. Calling this any less may result in gaps in the returned stream.
|
||||||
</summary>
|
</summary>
|
||||||
</member>
|
</member>
|
||||||
@ -2462,7 +2512,8 @@
|
|||||||
<member name="M:Steamworks.SteamUser.DecompressVoice(System.IO.Stream,System.Int32,System.IO.Stream)">
|
<member name="M:Steamworks.SteamUser.DecompressVoice(System.IO.Stream,System.Int32,System.IO.Stream)">
|
||||||
<summary>
|
<summary>
|
||||||
Decodes the compressed voice data returned by GetVoice.
|
Decodes the compressed voice data returned by GetVoice.
|
||||||
The output data is raw single-channel 16-bit PCM audio.The decoder supports any sample rate from 11025 to 48000.
|
The output data is raw single-channel 16-bit PCM audio.The decoder supports any sample rate from 11025
|
||||||
|
to 48000.
|
||||||
</summary>
|
</summary>
|
||||||
</member>
|
</member>
|
||||||
<member name="M:Steamworks.SteamUser.GetAuthSessionTicket">
|
<member name="M:Steamworks.SteamUser.GetAuthSessionTicket">
|
||||||
@ -2491,10 +2542,15 @@
|
|||||||
</member>
|
</member>
|
||||||
<member name="M:Steamworks.SteamUser.GetStoreAuthUrlAsync(System.String)">
|
<member name="M:Steamworks.SteamUser.GetStoreAuthUrlAsync(System.String)">
|
||||||
<summary>
|
<summary>
|
||||||
Requests a URL which authenticates an in-game browser for store check-out, and then redirects to the specified URL.
|
Requests a URL which authenticates an in-game browser for store check-out, and then redirects to the
|
||||||
As long as the in-game browser accepts and handles session cookies, Steam microtransaction checkout pages will automatically recognize the user instead of presenting a login page.
|
specified URL.
|
||||||
NOTE: The URL has a very short lifetime to prevent history-snooping attacks, so you should only call this API when you are about to launch the browser, or else immediately navigate to the result URL using a hidden browser window.
|
As long as the in-game browser accepts and handles session cookies, Steam microtransaction checkout
|
||||||
NOTE: The resulting authorization cookie has an expiration time of one day, so it would be a good idea to request and visit a new auth URL every 12 hours.
|
pages will automatically recognize the user instead of presenting a login page.
|
||||||
|
NOTE: The URL has a very short lifetime to prevent history-snooping attacks, so you should only call
|
||||||
|
this API when you are about to launch the browser, or else immediately navigate to the result URL using
|
||||||
|
a hidden browser window.
|
||||||
|
NOTE: The resulting authorization cookie has an expiration time of one day, so it would be a good idea
|
||||||
|
to request and visit a new auth URL every 12 hours.
|
||||||
</summary>
|
</summary>
|
||||||
</member>
|
</member>
|
||||||
<member name="P:Steamworks.SteamUser.IsPhoneVerified">
|
<member name="P:Steamworks.SteamUser.IsPhoneVerified">
|
||||||
@ -2523,7 +2579,8 @@
|
|||||||
The encryption key can be obtained from the Encrypted App Ticket Key page on the App Admin for your app.
|
The encryption key can be obtained from the Encrypted App Ticket Key page on the App Admin for your app.
|
||||||
There can only be one call pending, and this call is subject to a 60 second rate limit.
|
There can only be one call pending, and this call is subject to a 60 second rate limit.
|
||||||
If you get a null result from this it's probably because you're calling it too often.
|
If you get a null result from this it's probably because you're calling it too often.
|
||||||
This can fail if you don't have an encrypted ticket set for your app here https://partner.steamgames.com/apps/sdkauth/
|
This can fail if you don't have an encrypted ticket set for your app here
|
||||||
|
https://partner.steamgames.com/apps/sdkauth/
|
||||||
</summary>
|
</summary>
|
||||||
</member>
|
</member>
|
||||||
<member name="M:Steamworks.SteamUser.RequestEncryptedAppTicketAsync">
|
<member name="M:Steamworks.SteamUser.RequestEncryptedAppTicketAsync">
|
||||||
@ -2531,7 +2588,8 @@
|
|||||||
Requests an application ticket encrypted with the secret "encrypted app ticket key".
|
Requests an application ticket encrypted with the secret "encrypted app ticket key".
|
||||||
The encryption key can be obtained from the Encrypted App Ticket Key page on the App Admin for your app.
|
The encryption key can be obtained from the Encrypted App Ticket Key page on the App Admin for your app.
|
||||||
There can only be one call pending, and this call is subject to a 60 second rate limit.
|
There can only be one call pending, and this call is subject to a 60 second rate limit.
|
||||||
This can fail if you don't have an encrypted ticket set for your app here https://partner.steamgames.com/apps/sdkauth/
|
This can fail if you don't have an encrypted ticket set for your app here
|
||||||
|
https://partner.steamgames.com/apps/sdkauth/
|
||||||
</summary>
|
</summary>
|
||||||
</member>
|
</member>
|
||||||
<member name="M:Steamworks.SteamUser.GetDurationControl">
|
<member name="M:Steamworks.SteamUser.GetDurationControl">
|
||||||
@ -2589,13 +2647,19 @@
|
|||||||
<member name="M:Steamworks.SteamUserStats.StoreStats">
|
<member name="M:Steamworks.SteamUserStats.StoreStats">
|
||||||
<summary>
|
<summary>
|
||||||
Send the changed stats and achievements data to the server for permanent storage.
|
Send the changed stats and achievements data to the server for permanent storage.
|
||||||
If this fails then nothing is sent to the server. It's advisable to keep trying until the call is successful.
|
If this fails then nothing is sent to the server. It's advisable to keep trying until the call is
|
||||||
This call can be rate limited. Call frequency should be on the order of minutes, rather than seconds.You should only be calling this during major state changes such as the end of a round, the map changing, or the user leaving a server. This call is required to display the achievement unlock notification dialog though, so if you have called SetAchievement then it's advisable to call this soon after that.
|
successful.
|
||||||
If you have stats or achievements that you have saved locally but haven't uploaded with this function when your application process ends then this function will automatically be called.
|
This call can be rate limited. Call frequency should be on the order of minutes, rather than seconds.You
|
||||||
|
should only be calling this during major state changes such as the end of a round, the map changing, or
|
||||||
|
the user leaving a server. This call is required to display the achievement unlock notification dialog
|
||||||
|
though, so if you have called SetAchievement then it's advisable to call this soon after that.
|
||||||
|
If you have stats or achievements that you have saved locally but haven't uploaded with this function
|
||||||
|
when your application process ends then this function will automatically be called.
|
||||||
You can find additional debug information written to the %steam_install%\logs\stats_log.txt file.
|
You can find additional debug information written to the %steam_install%\logs\stats_log.txt file.
|
||||||
This function returns true upon success if :
|
This function returns true upon success if :
|
||||||
RequestCurrentStats has completed and successfully returned its callback AND
|
RequestCurrentStats has completed and successfully returned its callback AND
|
||||||
the current game has stats associated with it in the Steamworks Partner backend, and those stats are published.
|
the current game has stats associated with it in the Steamworks Partner backend, and those stats are
|
||||||
|
published.
|
||||||
</summary>
|
</summary>
|
||||||
</member>
|
</member>
|
||||||
<member name="M:Steamworks.SteamUserStats.RequestCurrentStats">
|
<member name="M:Steamworks.SteamUserStats.RequestCurrentStats">
|
||||||
@ -2613,8 +2677,12 @@
|
|||||||
You must have called RequestCurrentStats and it needs to return successfully via
|
You must have called RequestCurrentStats and it needs to return successfully via
|
||||||
its callback prior to calling this.
|
its callback prior to calling this.
|
||||||
</summary>
|
</summary>
|
||||||
<param name="days">How many days of day-by-day history to retrieve in addition to the overall totals. The limit is 60.</param>
|
<param name="days">How many days of day-by-day history to retrieve in addition to the overall totals. The
|
||||||
<returns>OK indicates success, InvalidState means you need to call RequestCurrentStats first, Fail means the remote call failed</returns>
|
limit is 60.
|
||||||
|
</param>
|
||||||
|
<returns>OK indicates success, InvalidState means you need to call RequestCurrentStats first, Fail means the
|
||||||
|
remote call failed
|
||||||
|
</returns>
|
||||||
</member>
|
</member>
|
||||||
<member name="M:Steamworks.SteamUserStats.FindOrCreateLeaderboardAsync(System.String,Steamworks.Data.LeaderboardSort,Steamworks.Data.LeaderboardDisplay)">
|
<member name="M:Steamworks.SteamUserStats.FindOrCreateLeaderboardAsync(System.String,Steamworks.Data.LeaderboardSort,Steamworks.Data.LeaderboardDisplay)">
|
||||||
<summary>
|
<summary>
|
||||||
@ -2692,7 +2760,8 @@
|
|||||||
</member>
|
</member>
|
||||||
<member name="E:Steamworks.SteamUtils.OnGamepadTextInputDismissed">
|
<member name="E:Steamworks.SteamUtils.OnGamepadTextInputDismissed">
|
||||||
<summary>
|
<summary>
|
||||||
Big Picture gamepad text input has been closed. Parameter is true if text was submitted, false if cancelled etc.
|
Big Picture gamepad text input has been closed. Parameter is true if text was submitted, false if
|
||||||
|
cancelled etc.
|
||||||
</summary>
|
</summary>
|
||||||
</member>
|
</member>
|
||||||
<member name="P:Steamworks.SteamUtils.SecondsSinceAppActive">
|
<member name="P:Steamworks.SteamUtils.SecondsSinceAppActive">
|
||||||
@ -2712,7 +2781,8 @@
|
|||||||
</member>
|
</member>
|
||||||
<member name="P:Steamworks.SteamUtils.IpCountry">
|
<member name="P:Steamworks.SteamUtils.IpCountry">
|
||||||
<summary>
|
<summary>
|
||||||
returns the 2 digit ISO 3166-1-alpha-2 format country code this client is running in (as looked up via an IP-to-location database)
|
returns the 2 digit ISO 3166-1-alpha-2 format country code this client is running in (as looked up via
|
||||||
|
an IP-to-location database)
|
||||||
e.g "US" or "UK".
|
e.g "US" or "UK".
|
||||||
</summary>
|
</summary>
|
||||||
</member>
|
</member>
|
||||||
@ -2741,13 +2811,16 @@
|
|||||||
<member name="P:Steamworks.SteamUtils.OverlayNotificationPosition">
|
<member name="P:Steamworks.SteamUtils.OverlayNotificationPosition">
|
||||||
<summary>
|
<summary>
|
||||||
Sets the position where the overlay instance for the currently calling game should show notifications.
|
Sets the position where the overlay instance for the currently calling game should show notifications.
|
||||||
This position is per-game and if this function is called from outside of a game context it will do nothing.
|
This position is per-game and if this function is called from outside of a game context it will do
|
||||||
|
nothing.
|
||||||
</summary>
|
</summary>
|
||||||
</member>
|
</member>
|
||||||
<member name="P:Steamworks.SteamUtils.IsOverlayEnabled">
|
<member name="P:Steamworks.SteamUtils.IsOverlayEnabled">
|
||||||
<summary>
|
<summary>
|
||||||
Returns true if the overlay is running and the user can access it. The overlay process could take a few seconds to
|
Returns true if the overlay is running and the user can access it. The overlay process could take a few
|
||||||
start and hook the game process, so this function will initially return false while the overlay is loading.
|
seconds to
|
||||||
|
start and hook the game process, so this function will initially return false while the overlay is
|
||||||
|
loading.
|
||||||
</summary>
|
</summary>
|
||||||
</member>
|
</member>
|
||||||
<member name="P:Steamworks.SteamUtils.DoesOverlayNeedPresent">
|
<member name="P:Steamworks.SteamUtils.DoesOverlayNeedPresent">
|
||||||
@ -2758,14 +2831,16 @@
|
|||||||
However, if you have a game that only refreshes the screen on an event driven basis then that can break
|
However, if you have a game that only refreshes the screen on an event driven basis then that can break
|
||||||
the overlay, as it uses your Present/SwapBuffers calls to drive it's internal frame loop and it may also
|
the overlay, as it uses your Present/SwapBuffers calls to drive it's internal frame loop and it may also
|
||||||
need to Present() to the screen any time an even needing a notification happens or when the overlay is
|
need to Present() to the screen any time an even needing a notification happens or when the overlay is
|
||||||
brought up over the game by a user. You can use this API to ask the overlay if it currently need a present
|
brought up over the game by a user. You can use this API to ask the overlay if it currently need a
|
||||||
|
present
|
||||||
in that case, and then you can check for this periodically (roughly 33hz is desirable) and make sure you
|
in that case, and then you can check for this periodically (roughly 33hz is desirable) and make sure you
|
||||||
refresh the screen with Present or SwapBuffers to allow the overlay to do it's work.
|
refresh the screen with Present or SwapBuffers to allow the overlay to do it's work.
|
||||||
</summary>
|
</summary>
|
||||||
</member>
|
</member>
|
||||||
<member name="M:Steamworks.SteamUtils.CheckFileSignatureAsync(System.String)">
|
<member name="M:Steamworks.SteamUtils.CheckFileSignatureAsync(System.String)">
|
||||||
<summary>
|
<summary>
|
||||||
Asynchronous call to check if an executable file has been signed using the public key set on the signing tab
|
Asynchronous call to check if an executable file has been signed using the public key set on the signing
|
||||||
|
tab
|
||||||
of the partner site, for example to refuse to load modified executable files.
|
of the partner site, for example to refuse to load modified executable files.
|
||||||
</summary>
|
</summary>
|
||||||
</member>
|
</member>
|
||||||
@ -2810,8 +2885,10 @@
|
|||||||
<member name="P:Steamworks.SteamUtils.VrHeadsetStreaming">
|
<member name="P:Steamworks.SteamUtils.VrHeadsetStreaming">
|
||||||
<summary>
|
<summary>
|
||||||
Set whether the HMD content will be streamed via Steam In-Home Streaming
|
Set whether the HMD content will be streamed via Steam In-Home Streaming
|
||||||
If this is set to true, then the scene in the HMD headset will be streamed, and remote input will not be allowed.
|
If this is set to true, then the scene in the HMD headset will be streamed, and remote input will not be
|
||||||
If this is set to false, then the application window will be streamed instead, and remote input will be allowed.
|
allowed.
|
||||||
|
If this is set to false, then the application window will be streamed instead, and remote input will be
|
||||||
|
allowed.
|
||||||
The default is true unless "VRHeadsetStreaming" "0" is in the extended appinfo for a game.
|
The default is true unless "VRHeadsetStreaming" "0" is in the extended appinfo for a game.
|
||||||
(this is useful for games that have asymmetric multiplayer gameplay)
|
(this is useful for games that have asymmetric multiplayer gameplay)
|
||||||
</summary>
|
</summary>
|
||||||
@ -2944,7 +3021,9 @@
|
|||||||
Gets a the time this achievement was unlocked.
|
Gets a the time this achievement was unlocked.
|
||||||
</summary>
|
</summary>
|
||||||
<param name="statName">The name of the achievement you want to get</param>
|
<param name="statName">The name of the achievement you want to get</param>
|
||||||
<returns>The time unlocked. If it wasn't unlocked, or you haven't downloaded the stats yet - will return DateTime.MinValue</returns>
|
<returns>The time unlocked. If it wasn't unlocked, or you haven't downloaded the stats yet - will return
|
||||||
|
DateTime.MinValue
|
||||||
|
</returns>
|
||||||
</member>
|
</member>
|
||||||
<member name="P:Steamworks.InventoryDef.Name">
|
<member name="P:Steamworks.InventoryDef.Name">
|
||||||
<summary>
|
<summary>
|
||||||
@ -3073,10 +3152,14 @@
|
|||||||
</member>
|
</member>
|
||||||
<member name="M:Steamworks.InventoryItem.ConsumeAsync(System.Int32)">
|
<member name="M:Steamworks.InventoryItem.ConsumeAsync(System.Int32)">
|
||||||
<summary>
|
<summary>
|
||||||
Consumes items from a user's inventory. If the quantity of the given item goes to zero, it is permanently removed.
|
Consumes items from a user's inventory. If the quantity of the given item goes to zero, it is
|
||||||
Once an item is removed it cannot be recovered.This is not for the faint of heart - if your game implements item removal at all,
|
permanently removed.
|
||||||
a high-friction UI confirmation process is highly recommended.ConsumeItem can be restricted to certain item definitions or fully
|
Once an item is removed it cannot be recovered.This is not for the faint of heart - if your game
|
||||||
blocked via the Steamworks website to minimize support/abuse issues such as the classic "my brother borrowed my laptop and deleted all of my rare items".
|
implements item removal at all,
|
||||||
|
a high-friction UI confirmation process is highly recommended.ConsumeItem can be restricted to certain
|
||||||
|
item definitions or fully
|
||||||
|
blocked via the Steamworks website to minimize support/abuse issues such as the classic "my brother
|
||||||
|
borrowed my laptop and deleted all of my rare items".
|
||||||
</summary>
|
</summary>
|
||||||
</member>
|
</member>
|
||||||
<member name="M:Steamworks.InventoryItem.SplitStackAsync(System.Int32)">
|
<member name="M:Steamworks.InventoryItem.SplitStackAsync(System.Int32)">
|
||||||
@ -3140,18 +3223,24 @@
|
|||||||
<member name="M:Steamworks.InventoryResult.BelongsTo(Steamworks.SteamId)">
|
<member name="M:Steamworks.InventoryResult.BelongsTo(Steamworks.SteamId)">
|
||||||
<summary>
|
<summary>
|
||||||
Checks whether an inventory result handle belongs to the specified Steam ID.
|
Checks whether an inventory result handle belongs to the specified Steam ID.
|
||||||
This is important when using Deserialize, to verify that a remote player is not pretending to have a different user's inventory
|
This is important when using Deserialize, to verify that a remote player is not pretending to have a
|
||||||
|
different user's inventory
|
||||||
</summary>
|
</summary>
|
||||||
</member>
|
</member>
|
||||||
<member name="M:Steamworks.InventoryResult.Serialize">
|
<member name="M:Steamworks.InventoryResult.Serialize">
|
||||||
<summary>
|
<summary>
|
||||||
Serialized result sets contain a short signature which can't be forged or replayed across different game sessions.
|
Serialized result sets contain a short signature which can't be forged or replayed across different game
|
||||||
A result set can be serialized on the local client, transmitted to other players via your game networking, and
|
sessions.
|
||||||
|
A result set can be serialized on the local client, transmitted to other players via your game
|
||||||
|
networking, and
|
||||||
deserialized by the remote players.This is a secure way of preventing hackers from lying about posessing
|
deserialized by the remote players.This is a secure way of preventing hackers from lying about posessing
|
||||||
rare/high-value items. Serializes a result set with signature bytes to an output buffer.The size of a serialized
|
rare/high-value items. Serializes a result set with signature bytes to an output buffer.The size of a
|
||||||
result depends on the number items which are being serialized.When securely transmitting items to other players,
|
serialized
|
||||||
|
result depends on the number items which are being serialized.When securely transmitting items to other
|
||||||
|
players,
|
||||||
it is recommended to use GetItemsByID first to create a minimal result set.
|
it is recommended to use GetItemsByID first to create a minimal result set.
|
||||||
Results have a built-in timestamp which will be considered "expired" after an hour has elapsed.See DeserializeResult
|
Results have a built-in timestamp which will be considered "expired" after an hour has elapsed.See
|
||||||
|
DeserializeResult
|
||||||
for expiration handling.
|
for expiration handling.
|
||||||
</summary>
|
</summary>
|
||||||
</member>
|
</member>
|
||||||
@ -3173,15 +3262,18 @@
|
|||||||
</member>
|
</member>
|
||||||
<member name="M:Steamworks.PartyBeacon.OnReservationCompleted(Steamworks.SteamId)">
|
<member name="M:Steamworks.PartyBeacon.OnReservationCompleted(Steamworks.SteamId)">
|
||||||
<summary>
|
<summary>
|
||||||
When a user follows your beacon, Steam will reserve one of the open party slots for them, and send your game a ReservationNotification callback.
|
When a user follows your beacon, Steam will reserve one of the open party slots for them, and send your
|
||||||
When that user joins your party, call OnReservationCompleted to notify Steam that the user has joined successfully
|
game a ReservationNotification callback.
|
||||||
|
When that user joins your party, call OnReservationCompleted to notify Steam that the user has joined
|
||||||
|
successfully
|
||||||
</summary>
|
</summary>
|
||||||
</member>
|
</member>
|
||||||
<member name="M:Steamworks.PartyBeacon.CancelReservation(Steamworks.SteamId)">
|
<member name="M:Steamworks.PartyBeacon.CancelReservation(Steamworks.SteamId)">
|
||||||
<summary>
|
<summary>
|
||||||
To cancel a reservation (due to timeout or user input), call this.
|
To cancel a reservation (due to timeout or user input), call this.
|
||||||
Steam will open a new reservation slot.
|
Steam will open a new reservation slot.
|
||||||
Note: The user may already be in-flight to your game, so it's possible they will still connect and try to join your party.
|
Note: The user may already be in-flight to your game, so it's possible they will still connect and try
|
||||||
|
to join your party.
|
||||||
</summary>
|
</summary>
|
||||||
</member>
|
</member>
|
||||||
<member name="M:Steamworks.PartyBeacon.Destroy">
|
<member name="M:Steamworks.PartyBeacon.Destroy">
|
||||||
@ -3197,14 +3289,17 @@
|
|||||||
</member>
|
</member>
|
||||||
<member name="F:Steamworks.SteamServerInit.VersionString">
|
<member name="F:Steamworks.SteamServerInit.VersionString">
|
||||||
<summary>
|
<summary>
|
||||||
The version string is usually in the form x.x.x.x, and is used by the master server to detect when the server is out of date.
|
The version string is usually in the form x.x.x.x, and is used by the master server to detect when the
|
||||||
If you go into the dedicated server tab on steamworks you'll be able to server the latest version. If this version number is
|
server is out of date.
|
||||||
|
If you go into the dedicated server tab on steamworks you'll be able to server the latest version. If
|
||||||
|
this version number is
|
||||||
less than that latest version then your server won't show.
|
less than that latest version then your server won't show.
|
||||||
</summary>
|
</summary>
|
||||||
</member>
|
</member>
|
||||||
<member name="F:Steamworks.SteamServerInit.ModDir">
|
<member name="F:Steamworks.SteamServerInit.ModDir">
|
||||||
<summary>
|
<summary>
|
||||||
This should be the same directory game where gets installed into. Just the folder name, not the whole path. I.e. "Rust", "Garrysmod".
|
This should be the same directory game where gets installed into. Just the folder name, not the whole
|
||||||
|
path. I.e. "Rust", "Garrysmod".
|
||||||
</summary>
|
</summary>
|
||||||
</member>
|
</member>
|
||||||
<member name="F:Steamworks.SteamServerInit.GameDescription">
|
<member name="F:Steamworks.SteamServerInit.GameDescription">
|
||||||
@ -3224,8 +3319,10 @@
|
|||||||
</member>
|
</member>
|
||||||
<member name="M:Steamworks.SteamServerInit.WithQueryShareGamePort">
|
<member name="M:Steamworks.SteamServerInit.WithQueryShareGamePort">
|
||||||
<summary>
|
<summary>
|
||||||
If you pass MASTERSERVERUPDATERPORT_USEGAMESOCKETSHARE into usQueryPort, then it causes the game server API to use
|
If you pass MASTERSERVERUPDATERPORT_USEGAMESOCKETSHARE into usQueryPort, then it causes the game server
|
||||||
"GameSocketShare" mode, which means that the game is responsible for sending and receiving UDP packets for the master
|
API to use
|
||||||
|
"GameSocketShare" mode, which means that the game is responsible for sending and receiving UDP packets
|
||||||
|
for the master
|
||||||
server updater.
|
server updater.
|
||||||
|
|
||||||
More info about this here: https://partner.steamgames.com/doc/api/ISteamGameServer#HandleIncomingPacket
|
More info about this here: https://partner.steamgames.com/doc/api/ISteamGameServer#HandleIncomingPacket
|
||||||
|
@ -299,7 +299,8 @@
|
|||||||
</member>
|
</member>
|
||||||
<member name="M:Steamworks.Data.Connection.Close(System.Boolean,System.Int32,System.String)">
|
<member name="M:Steamworks.Data.Connection.Close(System.Boolean,System.Int32,System.String)">
|
||||||
<summary>
|
<summary>
|
||||||
Disconnects from the remote host and invalidates the connection handle. Any unread data on the connection is discarded..
|
Disconnects from the remote host and invalidates the connection handle. Any unread data on the
|
||||||
|
connection is discarded..
|
||||||
reasonCode is defined and used by you.
|
reasonCode is defined and used by you.
|
||||||
</summary>
|
</summary>
|
||||||
</member>
|
</member>
|
||||||
@ -435,7 +436,8 @@
|
|||||||
<member name="M:Steamworks.Data.Achievement.GetIcon">
|
<member name="M:Steamworks.Data.Achievement.GetIcon">
|
||||||
<summary>
|
<summary>
|
||||||
Gets the icon of the achievement. This can return a null image even though the image exists if the image
|
Gets the icon of the achievement. This can return a null image even though the image exists if the image
|
||||||
hasn't been downloaded by Steam yet. You can use GetIconAsync if you want to wait for the image to be downloaded.
|
hasn't been downloaded by Steam yet. You can use GetIconAsync if you want to wait for the image to be
|
||||||
|
downloaded.
|
||||||
</summary>
|
</summary>
|
||||||
</member>
|
</member>
|
||||||
<member name="M:Steamworks.Data.Achievement.GetIconAsync(System.Int32)">
|
<member name="M:Steamworks.Data.Achievement.GetIconAsync(System.Int32)">
|
||||||
@ -445,7 +447,8 @@
|
|||||||
</member>
|
</member>
|
||||||
<member name="P:Steamworks.Data.Achievement.GlobalUnlocked">
|
<member name="P:Steamworks.Data.Achievement.GlobalUnlocked">
|
||||||
<summary>
|
<summary>
|
||||||
Returns the fraction (0-1) of users who have unlocked the specified achievement, or -1 if no data available.
|
Returns the fraction (0-1) of users who have unlocked the specified achievement, or -1 if no data
|
||||||
|
available.
|
||||||
</summary>
|
</summary>
|
||||||
</member>
|
</member>
|
||||||
<member name="M:Steamworks.Data.Achievement.Trigger(System.Boolean)">
|
<member name="M:Steamworks.Data.Achievement.Trigger(System.Boolean)">
|
||||||
@ -461,7 +464,8 @@
|
|||||||
<member name="T:Steamworks.Data.DurationControl">
|
<member name="T:Steamworks.Data.DurationControl">
|
||||||
<summary>
|
<summary>
|
||||||
Sent for games with enabled anti indulgence / duration control, for enabled users.
|
Sent for games with enabled anti indulgence / duration control, for enabled users.
|
||||||
Lets the game know whether persistent rewards or XP should be granted at normal rate, half rate, or zero rate.
|
Lets the game know whether persistent rewards or XP should be granted at normal rate, half rate, or zero
|
||||||
|
rate.
|
||||||
</summary>
|
</summary>
|
||||||
</member>
|
</member>
|
||||||
<member name="P:Steamworks.Data.DurationControl.Appid">
|
<member name="P:Steamworks.Data.DurationControl.Appid">
|
||||||
@ -476,7 +480,8 @@
|
|||||||
</member>
|
</member>
|
||||||
<member name="P:Steamworks.Data.DurationControl.PlaytimeInLastFiveHours">
|
<member name="P:Steamworks.Data.DurationControl.PlaytimeInLastFiveHours">
|
||||||
<summary>
|
<summary>
|
||||||
playtime since most recent 5 hour gap in playtime, only counting up to regulatory limit of playtime, in seconds
|
playtime since most recent 5 hour gap in playtime, only counting up to regulatory limit of playtime, in
|
||||||
|
seconds
|
||||||
</summary>
|
</summary>
|
||||||
</member>
|
</member>
|
||||||
<member name="P:Steamworks.Data.DurationControl.PlaytimeToday">
|
<member name="P:Steamworks.Data.DurationControl.PlaytimeToday">
|
||||||
@ -516,9 +521,12 @@
|
|||||||
</member>
|
</member>
|
||||||
<member name="M:Steamworks.Data.Leaderboard.GetScoresAroundUserAsync(System.Int32,System.Int32)">
|
<member name="M:Steamworks.Data.Leaderboard.GetScoresAroundUserAsync(System.Int32,System.Int32)">
|
||||||
<summary>
|
<summary>
|
||||||
Used to retrieve leaderboard entries relative a user's entry. If there are not enough entries in the leaderboard
|
Used to retrieve leaderboard entries relative a user's entry. If there are not enough entries in the
|
||||||
before or after the user's entry, Steam will adjust the range to try to return the number of entries requested.
|
leaderboard
|
||||||
For example, if the user is #1 on the leaderboard and start is set to -2, end is set to 2, Steam will return the first
|
before or after the user's entry, Steam will adjust the range to try to return the number of entries
|
||||||
|
requested.
|
||||||
|
For example, if the user is #1 on the leaderboard and start is set to -2, end is set to 2, Steam will
|
||||||
|
return the first
|
||||||
5 entries in the leaderboard. If The current user has no entry, this will return null.
|
5 entries in the leaderboard. If The current user has no entry, this will return null.
|
||||||
</summary>
|
</summary>
|
||||||
</member>
|
</member>
|
||||||
@ -816,17 +824,21 @@
|
|||||||
</member>
|
</member>
|
||||||
<member name="M:Steamworks.ISteamInventory.GetResultItems(Steamworks.Data.SteamInventoryResult_t,Steamworks.Data.SteamItemDetails_t[],System.UInt32@)">
|
<member name="M:Steamworks.ISteamInventory.GetResultItems(Steamworks.Data.SteamInventoryResult_t,Steamworks.Data.SteamItemDetails_t[],System.UInt32@)">
|
||||||
<summary>
|
<summary>
|
||||||
Copies the contents of a result set into a flat array. The specific contents of the result set depend on which query which was used.
|
Copies the contents of a result set into a flat array. The specific contents of the result set depend on
|
||||||
|
which query which was used.
|
||||||
</summary>
|
</summary>
|
||||||
</member>
|
</member>
|
||||||
<member name="M:Steamworks.ISteamInventory.GetResultTimestamp(Steamworks.Data.SteamInventoryResult_t)">
|
<member name="M:Steamworks.ISteamInventory.GetResultTimestamp(Steamworks.Data.SteamInventoryResult_t)">
|
||||||
<summary>
|
<summary>
|
||||||
Returns the server time at which the result was generated. Compare against the value of IClientUtils::GetServerRealTime() to determine age.
|
Returns the server time at which the result was generated. Compare against the value of
|
||||||
|
IClientUtils::GetServerRealTime() to determine age.
|
||||||
</summary>
|
</summary>
|
||||||
</member>
|
</member>
|
||||||
<member name="M:Steamworks.ISteamInventory.CheckResultSteamID(Steamworks.Data.SteamInventoryResult_t,Steamworks.SteamId)">
|
<member name="M:Steamworks.ISteamInventory.CheckResultSteamID(Steamworks.Data.SteamInventoryResult_t,Steamworks.SteamId)">
|
||||||
<summary>
|
<summary>
|
||||||
Returns true if the result belongs to the target steam ID or false if the result does not. This is important when using DeserializeResult to verify that a remote player is not pretending to have a different users inventory.
|
Returns true if the result belongs to the target steam ID or false if the result does not. This is
|
||||||
|
important when using DeserializeResult to verify that a remote player is not pretending to have a
|
||||||
|
different users inventory.
|
||||||
</summary>
|
</summary>
|
||||||
</member>
|
</member>
|
||||||
<member name="M:Steamworks.ISteamInventory.DestroyResult(Steamworks.Data.SteamInventoryResult_t)">
|
<member name="M:Steamworks.ISteamInventory.DestroyResult(Steamworks.Data.SteamInventoryResult_t)">
|
||||||
@ -841,12 +853,14 @@
|
|||||||
</member>
|
</member>
|
||||||
<member name="M:Steamworks.ISteamInventory.GetItemsByID(Steamworks.Data.SteamInventoryResult_t@,Steamworks.Data.InventoryItemId@,System.UInt32)">
|
<member name="M:Steamworks.ISteamInventory.GetItemsByID(Steamworks.Data.SteamInventoryResult_t@,Steamworks.Data.InventoryItemId@,System.UInt32)">
|
||||||
<summary>
|
<summary>
|
||||||
Captures the state of a subset of the current users Steam inventory identified by an array of item instance IDs.
|
Captures the state of a subset of the current users Steam inventory identified by an array of item
|
||||||
|
instance IDs.
|
||||||
</summary>
|
</summary>
|
||||||
</member>
|
</member>
|
||||||
<member name="M:Steamworks.ISteamInventory.GrantPromoItems(Steamworks.Data.SteamInventoryResult_t@)">
|
<member name="M:Steamworks.ISteamInventory.GrantPromoItems(Steamworks.Data.SteamInventoryResult_t@)">
|
||||||
<summary>
|
<summary>
|
||||||
GrantPromoItems() checks the list of promotional items for which the user may be eligible and grants the items (one time only).
|
GrantPromoItems() checks the list of promotional items for which the user may be eligible and grants the
|
||||||
|
items (one time only).
|
||||||
</summary>
|
</summary>
|
||||||
</member>
|
</member>
|
||||||
<member name="M:Steamworks.ISteamInventory.ConsumeItem(Steamworks.Data.SteamInventoryResult_t@,Steamworks.Data.InventoryItemId,System.UInt32)">
|
<member name="M:Steamworks.ISteamInventory.ConsumeItem(Steamworks.Data.SteamInventoryResult_t@,Steamworks.Data.InventoryItemId,System.UInt32)">
|
||||||
@ -871,7 +885,8 @@
|
|||||||
</member>
|
</member>
|
||||||
<member name="M:Steamworks.ISteamUserStats.DownloadLeaderboardEntriesForUsers(Steamworks.Data.SteamLeaderboard_t,Steamworks.SteamId[],System.Int32)">
|
<member name="M:Steamworks.ISteamUserStats.DownloadLeaderboardEntriesForUsers(Steamworks.Data.SteamLeaderboard_t,Steamworks.SteamId[],System.Int32)">
|
||||||
<summary>
|
<summary>
|
||||||
Downloads leaderboard entries for an arbitrary set of users - ELeaderboardDataRequest is k_ELeaderboardDataRequestUsers
|
Downloads leaderboard entries for an arbitrary set of users - ELeaderboardDataRequest is
|
||||||
|
k_ELeaderboardDataRequestUsers
|
||||||
</summary>
|
</summary>
|
||||||
</member>
|
</member>
|
||||||
<member name="P:Steamworks.ConnectionManager.Interface">
|
<member name="P:Steamworks.ConnectionManager.Interface">
|
||||||
@ -1025,7 +1040,8 @@
|
|||||||
</member>
|
</member>
|
||||||
<member name="P:Steamworks.SteamApps.IsSubscribedFromFamilySharing">
|
<member name="P:Steamworks.SteamApps.IsSubscribedFromFamilySharing">
|
||||||
<summary>
|
<summary>
|
||||||
Check if user borrowed this game via Family Sharing, If true, call GetAppOwner() to get the lender SteamID
|
Check if user borrowed this game via Family Sharing, If true, call GetAppOwner() to get the lender
|
||||||
|
SteamID
|
||||||
</summary>
|
</summary>
|
||||||
</member>
|
</member>
|
||||||
<member name="P:Steamworks.SteamApps.IsLowVoilence">
|
<member name="P:Steamworks.SteamApps.IsLowVoilence">
|
||||||
@ -1102,7 +1118,8 @@
|
|||||||
<summary>
|
<summary>
|
||||||
Allows you to force verify game content on next launch.
|
Allows you to force verify game content on next launch.
|
||||||
|
|
||||||
If you detect the game is out-of-date(for example, by having the client detect a version mismatch with a server),
|
If you detect the game is out-of-date(for example, by having the client detect a version mismatch with a
|
||||||
|
server),
|
||||||
you can call use MarkContentCorrupt to force a verify, show a message to the user, and then quit.
|
you can call use MarkContentCorrupt to force a verify, show a message to the user, and then quit.
|
||||||
</summary>
|
</summary>
|
||||||
</member>
|
</member>
|
||||||
@ -1114,24 +1131,30 @@
|
|||||||
<member name="M:Steamworks.SteamApps.AppInstallDir(Steamworks.AppId)">
|
<member name="M:Steamworks.SteamApps.AppInstallDir(Steamworks.AppId)">
|
||||||
<summary>
|
<summary>
|
||||||
Gets the install folder for a specific AppID.
|
Gets the install folder for a specific AppID.
|
||||||
This works even if the application is not installed, based on where the game would be installed with the default Steam library location.
|
This works even if the application is not installed, based on where the game would be installed with the
|
||||||
|
default Steam library location.
|
||||||
</summary>
|
</summary>
|
||||||
</member>
|
</member>
|
||||||
<member name="M:Steamworks.SteamApps.IsAppInstalled(Steamworks.AppId)">
|
<member name="M:Steamworks.SteamApps.IsAppInstalled(Steamworks.AppId)">
|
||||||
<summary>
|
<summary>
|
||||||
The app may not actually be owned by the current user, they may have it left over from a free weekend, etc.
|
The app may not actually be owned by the current user, they may have it left over from a free weekend,
|
||||||
|
etc.
|
||||||
</summary>
|
</summary>
|
||||||
</member>
|
</member>
|
||||||
<member name="P:Steamworks.SteamApps.AppOwner">
|
<member name="P:Steamworks.SteamApps.AppOwner">
|
||||||
<summary>
|
<summary>
|
||||||
Gets the Steam ID of the original owner of the current app. If it's different from the current user then it is borrowed..
|
Gets the Steam ID of the original owner of the current app. If it's different from the current user then
|
||||||
|
it is borrowed..
|
||||||
</summary>
|
</summary>
|
||||||
</member>
|
</member>
|
||||||
<member name="M:Steamworks.SteamApps.GetLaunchParam(System.String)">
|
<member name="M:Steamworks.SteamApps.GetLaunchParam(System.String)">
|
||||||
<summary>
|
<summary>
|
||||||
Gets the associated launch parameter if the game is run via steam://run/appid/?param1=value1;param2=value2;param3=value3 etc.
|
Gets the associated launch parameter if the game is run via
|
||||||
Parameter names starting with the character '@' are reserved for internal use and will always return an empty string.
|
steam://run/appid/?param1=value1;param2=value2;param3=value3 etc.
|
||||||
Parameter names starting with an underscore '_' are reserved for steam features -- they can be queried by the game,
|
Parameter names starting with the character '@' are reserved for internal use and will always return an
|
||||||
|
empty string.
|
||||||
|
Parameter names starting with an underscore '_' are reserved for steam features -- they can be queried
|
||||||
|
by the game,
|
||||||
but it is advised that you not param names beginning with an underscore for your own features.
|
but it is advised that you not param names beginning with an underscore for your own features.
|
||||||
</summary>
|
</summary>
|
||||||
</member>
|
</member>
|
||||||
@ -1280,13 +1303,16 @@
|
|||||||
<summary>
|
<summary>
|
||||||
"steamid" - Opens the overlay web browser to the specified user or groups profile.
|
"steamid" - Opens the overlay web browser to the specified user or groups profile.
|
||||||
"chat" - Opens a chat window to the specified user, or joins the group chat.
|
"chat" - Opens a chat window to the specified user, or joins the group chat.
|
||||||
"jointrade" - Opens a window to a Steam Trading session that was started with the ISteamEconomy/StartTrade Web API.
|
"jointrade" - Opens a window to a Steam Trading session that was started with the
|
||||||
|
ISteamEconomy/StartTrade Web API.
|
||||||
"stats" - Opens the overlay web browser to the specified user's stats.
|
"stats" - Opens the overlay web browser to the specified user's stats.
|
||||||
"achievements" - Opens the overlay web browser to the specified user's achievements.
|
"achievements" - Opens the overlay web browser to the specified user's achievements.
|
||||||
"friendadd" - Opens the overlay in minimal mode prompting the user to add the target user as a friend.
|
"friendadd" - Opens the overlay in minimal mode prompting the user to add the target user as a friend.
|
||||||
"friendremove" - Opens the overlay in minimal mode prompting the user to remove the target friend.
|
"friendremove" - Opens the overlay in minimal mode prompting the user to remove the target friend.
|
||||||
"friendrequestaccept" - Opens the overlay in minimal mode prompting the user to accept an incoming friend invite.
|
"friendrequestaccept" - Opens the overlay in minimal mode prompting the user to accept an incoming
|
||||||
"friendrequestignore" - Opens the overlay in minimal mode prompting the user to ignore an incoming friend invite.
|
friend invite.
|
||||||
|
"friendrequestignore" - Opens the overlay in minimal mode prompting the user to ignore an incoming
|
||||||
|
friend invite.
|
||||||
</summary>
|
</summary>
|
||||||
</member>
|
</member>
|
||||||
<member name="M:Steamworks.SteamFriends.OpenStoreOverlay(Steamworks.AppId)">
|
<member name="M:Steamworks.SteamFriends.OpenStoreOverlay(Steamworks.AppId)">
|
||||||
@ -1301,7 +1327,8 @@
|
|||||||
</member>
|
</member>
|
||||||
<member name="M:Steamworks.SteamFriends.OpenGameInviteOverlay(Steamworks.SteamId)">
|
<member name="M:Steamworks.SteamFriends.OpenGameInviteOverlay(Steamworks.SteamId)">
|
||||||
<summary>
|
<summary>
|
||||||
Activates the Steam Overlay to open the invite dialog. Invitations sent from this dialog will be for the provided lobby.
|
Activates the Steam Overlay to open the invite dialog. Invitations sent from this dialog will be for the
|
||||||
|
provided lobby.
|
||||||
</summary>
|
</summary>
|
||||||
</member>
|
</member>
|
||||||
<member name="M:Steamworks.SteamFriends.SetPlayedWith(Steamworks.SteamId)">
|
<member name="M:Steamworks.SteamFriends.SetPlayedWith(Steamworks.SteamId)">
|
||||||
@ -1313,7 +1340,8 @@
|
|||||||
<member name="M:Steamworks.SteamFriends.RequestUserInformation(Steamworks.SteamId,System.Boolean)">
|
<member name="M:Steamworks.SteamFriends.RequestUserInformation(Steamworks.SteamId,System.Boolean)">
|
||||||
<summary>
|
<summary>
|
||||||
Requests the persona name and optionally the avatar of a specified user.
|
Requests the persona name and optionally the avatar of a specified user.
|
||||||
NOTE: It's a lot slower to download avatars and churns the local cache, so if you don't need avatars, don't request them.
|
NOTE: It's a lot slower to download avatars and churns the local cache, so if you don't need avatars,
|
||||||
|
don't request them.
|
||||||
returns true if we're fetching the data, false if we already have it
|
returns true if we're fetching the data, false if we already have it
|
||||||
</summary>
|
</summary>
|
||||||
</member>
|
</member>
|
||||||
@ -1335,7 +1363,8 @@
|
|||||||
<member name="P:Steamworks.SteamFriends.ListenForFriendsMessages">
|
<member name="P:Steamworks.SteamFriends.ListenForFriendsMessages">
|
||||||
<summary>
|
<summary>
|
||||||
Listens for Steam friends chat messages.
|
Listens for Steam friends chat messages.
|
||||||
You can then show these chats inline in the game. For example with a Blizzard style chat message system or the chat system in Dota 2.
|
You can then show these chats inline in the game. For example with a Blizzard style chat message system
|
||||||
|
or the chat system in Dota 2.
|
||||||
After enabling this you will receive callbacks when ever the user receives a chat message.
|
After enabling this you will receive callbacks when ever the user receives a chat message.
|
||||||
</summary>
|
</summary>
|
||||||
</member>
|
</member>
|
||||||
@ -1658,14 +1687,16 @@
|
|||||||
<member name="M:Steamworks.SteamNetworking.SendP2PPacket(Steamworks.SteamId,System.Byte[],System.Int32,System.Int32,Steamworks.P2PSend)">
|
<member name="M:Steamworks.SteamNetworking.SendP2PPacket(Steamworks.SteamId,System.Byte[],System.Int32,System.Int32,Steamworks.P2PSend)">
|
||||||
<summary>
|
<summary>
|
||||||
Sends a P2P packet to the specified user.
|
Sends a P2P packet to the specified user.
|
||||||
This is a session-less API which automatically establishes NAT-traversing or Steam relay server connections.
|
This is a session-less API which automatically establishes NAT-traversing or Steam relay server
|
||||||
|
connections.
|
||||||
NOTE: The first packet send may be delayed as the NAT-traversal code runs.
|
NOTE: The first packet send may be delayed as the NAT-traversal code runs.
|
||||||
</summary>
|
</summary>
|
||||||
</member>
|
</member>
|
||||||
<member name="M:Steamworks.SteamNetworking.SendP2PPacket(Steamworks.SteamId,System.Byte*,System.UInt32,System.Int32,Steamworks.P2PSend)">
|
<member name="M:Steamworks.SteamNetworking.SendP2PPacket(Steamworks.SteamId,System.Byte*,System.UInt32,System.Int32,Steamworks.P2PSend)">
|
||||||
<summary>
|
<summary>
|
||||||
Sends a P2P packet to the specified user.
|
Sends a P2P packet to the specified user.
|
||||||
This is a session-less API which automatically establishes NAT-traversing or Steam relay server connections.
|
This is a session-less API which automatically establishes NAT-traversing or Steam relay server
|
||||||
|
connections.
|
||||||
NOTE: The first packet send may be delayed as the NAT-traversal code runs.
|
NOTE: The first packet send may be delayed as the NAT-traversal code runs.
|
||||||
</summary>
|
</summary>
|
||||||
</member>
|
</member>
|
||||||
@ -1691,12 +1722,14 @@
|
|||||||
</member>
|
</member>
|
||||||
<member name="M:Steamworks.SteamNetworkingSockets.ConnectNormal``1(Steamworks.Data.NetAddress)">
|
<member name="M:Steamworks.SteamNetworkingSockets.ConnectNormal``1(Steamworks.Data.NetAddress)">
|
||||||
<summary>
|
<summary>
|
||||||
Connect to a socket created via <method>CreateListenSocketIP</method>
|
Connect to a socket created via
|
||||||
|
<method>CreateListenSocketIP</method>
|
||||||
</summary>
|
</summary>
|
||||||
</member>
|
</member>
|
||||||
<member name="M:Steamworks.SteamNetworkingSockets.ConnectNormal(Steamworks.Data.NetAddress,Steamworks.IConnectionManager)">
|
<member name="M:Steamworks.SteamNetworkingSockets.ConnectNormal(Steamworks.Data.NetAddress,Steamworks.IConnectionManager)">
|
||||||
<summary>
|
<summary>
|
||||||
Connect to a socket created via <method>CreateListenSocketIP</method>
|
Connect to a socket created via
|
||||||
|
<method>CreateListenSocketIP</method>
|
||||||
</summary>
|
</summary>
|
||||||
</member>
|
</member>
|
||||||
<member name="M:Steamworks.SteamNetworkingSockets.CreateRelaySocket``1(System.Int32)">
|
<member name="M:Steamworks.SteamNetworkingSockets.CreateRelaySocket``1(System.Int32)">
|
||||||
@ -1839,7 +1872,8 @@
|
|||||||
</member>
|
</member>
|
||||||
<member name="M:Steamworks.SteamNetworkingUtils.OnDebugMessage(Steamworks.NetDebugOutput,System.IntPtr)">
|
<member name="M:Steamworks.SteamNetworkingUtils.OnDebugMessage(Steamworks.NetDebugOutput,System.IntPtr)">
|
||||||
<summary>
|
<summary>
|
||||||
This can be called from other threads - so we're going to queue these up and process them in a safe place.
|
This can be called from other threads - so we're going to queue these up and process them in a safe
|
||||||
|
place.
|
||||||
</summary>
|
</summary>
|
||||||
</member>
|
</member>
|
||||||
<member name="M:Steamworks.SteamNetworkingUtils.OutputDebugMessages">
|
<member name="M:Steamworks.SteamNetworkingUtils.OutputDebugMessages">
|
||||||
@ -1908,7 +1942,8 @@
|
|||||||
</member>
|
</member>
|
||||||
<member name="T:Steamworks.SteamRemotePlay">
|
<member name="T:Steamworks.SteamRemotePlay">
|
||||||
<summary>
|
<summary>
|
||||||
Functions that provide information about Steam Remote Play sessions, streaming your game content to another computer or to a Steam Link app or hardware.
|
Functions that provide information about Steam Remote Play sessions, streaming your game content to
|
||||||
|
another computer or to a Steam Link app or hardware.
|
||||||
</summary>
|
</summary>
|
||||||
</member>
|
</member>
|
||||||
<member name="E:Steamworks.SteamRemotePlay.OnSessionConnected">
|
<member name="E:Steamworks.SteamRemotePlay.OnSessionConnected">
|
||||||
@ -1976,7 +2011,8 @@
|
|||||||
</member>
|
</member>
|
||||||
<member name="M:Steamworks.SteamRemoteStorage.FileForget(System.String)">
|
<member name="M:Steamworks.SteamRemoteStorage.FileForget(System.String)">
|
||||||
<summary>
|
<summary>
|
||||||
Deletes the file from remote storage, but leaves it on the local disk and remains accessible from the API.
|
Deletes the file from remote storage, but leaves it on the local disk and remains accessible from the
|
||||||
|
API.
|
||||||
</summary>
|
</summary>
|
||||||
</member>
|
</member>
|
||||||
<member name="M:Steamworks.SteamRemoteStorage.FileDelete(System.String)">
|
<member name="M:Steamworks.SteamRemoteStorage.FileDelete(System.String)">
|
||||||
@ -2054,15 +2090,20 @@
|
|||||||
</member>
|
</member>
|
||||||
<member name="M:Steamworks.SteamScreenshots.WriteScreenshot(System.Byte[],System.Int32,System.Int32)">
|
<member name="M:Steamworks.SteamScreenshots.WriteScreenshot(System.Byte[],System.Int32,System.Int32)">
|
||||||
<summary>
|
<summary>
|
||||||
Writes a screenshot to the user's screenshot library given the raw image data, which must be in RGB format.
|
Writes a screenshot to the user's screenshot library given the raw image data, which must be in RGB
|
||||||
The return value is a handle that is valid for the duration of the game process and can be used to apply tags.
|
format.
|
||||||
|
The return value is a handle that is valid for the duration of the game process and can be used to apply
|
||||||
|
tags.
|
||||||
</summary>
|
</summary>
|
||||||
</member>
|
</member>
|
||||||
<member name="M:Steamworks.SteamScreenshots.AddScreenshot(System.String,System.String,System.Int32,System.Int32)">
|
<member name="M:Steamworks.SteamScreenshots.AddScreenshot(System.String,System.String,System.Int32,System.Int32)">
|
||||||
<summary>
|
<summary>
|
||||||
Adds a screenshot to the user's screenshot library from disk. If a thumbnail is provided, it must be 200 pixels wide and the same aspect ratio
|
Adds a screenshot to the user's screenshot library from disk. If a thumbnail is provided, it must be 200
|
||||||
as the screenshot, otherwise a thumbnail will be generated if the user uploads the screenshot. The screenshots must be in either JPEG or TGA format.
|
pixels wide and the same aspect ratio
|
||||||
The return value is a handle that is valid for the duration of the game process and can be used to apply tags.
|
as the screenshot, otherwise a thumbnail will be generated if the user uploads the screenshot. The
|
||||||
|
screenshots must be in either JPEG or TGA format.
|
||||||
|
The return value is a handle that is valid for the duration of the game process and can be used to apply
|
||||||
|
tags.
|
||||||
JPEG, TGA, and PNG formats are supported.
|
JPEG, TGA, and PNG formats are supported.
|
||||||
</summary>
|
</summary>
|
||||||
</member>
|
</member>
|
||||||
@ -2075,10 +2116,13 @@
|
|||||||
</member>
|
</member>
|
||||||
<member name="P:Steamworks.SteamScreenshots.Hooked">
|
<member name="P:Steamworks.SteamScreenshots.Hooked">
|
||||||
<summary>
|
<summary>
|
||||||
Toggles whether the overlay handles screenshots when the user presses the screenshot hotkey, or if the game handles them.
|
Toggles whether the overlay handles screenshots when the user presses the screenshot hotkey, or if the
|
||||||
|
game handles them.
|
||||||
Hooking is disabled by default, and only ever enabled if you do so with this function.
|
Hooking is disabled by default, and only ever enabled if you do so with this function.
|
||||||
If the hooking is enabled, then the ScreenshotRequested_t callback will be sent if the user presses the hotkey or
|
If the hooking is enabled, then the ScreenshotRequested_t callback will be sent if the user presses the
|
||||||
when TriggerScreenshot is called, and then the game is expected to call WriteScreenshot or AddScreenshotToLibrary in response.
|
hotkey or
|
||||||
|
when TriggerScreenshot is called, and then the game is expected to call WriteScreenshot or
|
||||||
|
AddScreenshotToLibrary in response.
|
||||||
</summary>
|
</summary>
|
||||||
</member>
|
</member>
|
||||||
<member name="T:Steamworks.SteamServer">
|
<member name="T:Steamworks.SteamServer">
|
||||||
@ -2099,7 +2143,8 @@
|
|||||||
</member>
|
</member>
|
||||||
<member name="E:Steamworks.SteamServer.OnSteamServerConnectFailure">
|
<member name="E:Steamworks.SteamServer.OnSteamServerConnectFailure">
|
||||||
<summary>
|
<summary>
|
||||||
This will occur periodically if the Steam client is not connected, and has failed when retrying to establish a connection (result, stilltrying)
|
This will occur periodically if the Steam client is not connected, and has failed when retrying to
|
||||||
|
establish a connection (result, stilltrying)
|
||||||
</summary>
|
</summary>
|
||||||
</member>
|
</member>
|
||||||
<member name="E:Steamworks.SteamServer.OnSteamServersDisconnected">
|
<member name="E:Steamworks.SteamServer.OnSteamServersDisconnected">
|
||||||
@ -2307,7 +2352,8 @@
|
|||||||
</member>
|
</member>
|
||||||
<member name="M:Steamworks.SteamServerStats.ClearAchievement(Steamworks.SteamId,System.String)">
|
<member name="M:Steamworks.SteamServerStats.ClearAchievement(Steamworks.SteamId,System.String)">
|
||||||
<summary>
|
<summary>
|
||||||
Resets the unlock status of an achievement for the specified user. Must have called Refresh on a steamid first.
|
Resets the unlock status of an achievement for the specified user. Must have called Refresh on a steamid
|
||||||
|
first.
|
||||||
Remember to use Commit after use.
|
Remember to use Commit after use.
|
||||||
</summary>
|
</summary>
|
||||||
</member>
|
</member>
|
||||||
@ -2419,8 +2465,10 @@
|
|||||||
</member>
|
</member>
|
||||||
<member name="E:Steamworks.SteamUser.OnGameWebCallback">
|
<member name="E:Steamworks.SteamUser.OnGameWebCallback">
|
||||||
<summary>
|
<summary>
|
||||||
Sent to your game in response to a steam://gamewebcallback/ command from a user clicking a link in the Steam overlay browser.
|
Sent to your game in response to a steam://gamewebcallback/ command from a user clicking a link in the
|
||||||
You can use this to add support for external site signups where you want to pop back into the browser after some web page
|
Steam overlay browser.
|
||||||
|
You can use this to add support for external site signups where you want to pop back into the browser
|
||||||
|
after some web page
|
||||||
signup sequence, and optionally get back some detail about that.
|
signup sequence, and optionally get back some detail about that.
|
||||||
</summary>
|
</summary>
|
||||||
</member>
|
</member>
|
||||||
@ -2447,8 +2495,10 @@
|
|||||||
<summary>
|
<summary>
|
||||||
Reads the voice data and returns the number of bytes written.
|
Reads the voice data and returns the number of bytes written.
|
||||||
The compressed data can be transmitted by your application and decoded back into raw audio data using
|
The compressed data can be transmitted by your application and decoded back into raw audio data using
|
||||||
DecompressVoice on the other side. The compressed data provided is in an arbitrary format and is not meant to be played directly.
|
DecompressVoice on the other side. The compressed data provided is in an arbitrary format and is not
|
||||||
This should be called once per frame, and at worst no more than four times a second to keep the microphone input delay as low as
|
meant to be played directly.
|
||||||
|
This should be called once per frame, and at worst no more than four times a second to keep the
|
||||||
|
microphone input delay as low as
|
||||||
possible. Calling this any less may result in gaps in the returned stream.
|
possible. Calling this any less may result in gaps in the returned stream.
|
||||||
</summary>
|
</summary>
|
||||||
</member>
|
</member>
|
||||||
@ -2462,7 +2512,8 @@
|
|||||||
<member name="M:Steamworks.SteamUser.DecompressVoice(System.IO.Stream,System.Int32,System.IO.Stream)">
|
<member name="M:Steamworks.SteamUser.DecompressVoice(System.IO.Stream,System.Int32,System.IO.Stream)">
|
||||||
<summary>
|
<summary>
|
||||||
Decodes the compressed voice data returned by GetVoice.
|
Decodes the compressed voice data returned by GetVoice.
|
||||||
The output data is raw single-channel 16-bit PCM audio.The decoder supports any sample rate from 11025 to 48000.
|
The output data is raw single-channel 16-bit PCM audio.The decoder supports any sample rate from 11025
|
||||||
|
to 48000.
|
||||||
</summary>
|
</summary>
|
||||||
</member>
|
</member>
|
||||||
<member name="M:Steamworks.SteamUser.GetAuthSessionTicket">
|
<member name="M:Steamworks.SteamUser.GetAuthSessionTicket">
|
||||||
@ -2491,10 +2542,15 @@
|
|||||||
</member>
|
</member>
|
||||||
<member name="M:Steamworks.SteamUser.GetStoreAuthUrlAsync(System.String)">
|
<member name="M:Steamworks.SteamUser.GetStoreAuthUrlAsync(System.String)">
|
||||||
<summary>
|
<summary>
|
||||||
Requests a URL which authenticates an in-game browser for store check-out, and then redirects to the specified URL.
|
Requests a URL which authenticates an in-game browser for store check-out, and then redirects to the
|
||||||
As long as the in-game browser accepts and handles session cookies, Steam microtransaction checkout pages will automatically recognize the user instead of presenting a login page.
|
specified URL.
|
||||||
NOTE: The URL has a very short lifetime to prevent history-snooping attacks, so you should only call this API when you are about to launch the browser, or else immediately navigate to the result URL using a hidden browser window.
|
As long as the in-game browser accepts and handles session cookies, Steam microtransaction checkout
|
||||||
NOTE: The resulting authorization cookie has an expiration time of one day, so it would be a good idea to request and visit a new auth URL every 12 hours.
|
pages will automatically recognize the user instead of presenting a login page.
|
||||||
|
NOTE: The URL has a very short lifetime to prevent history-snooping attacks, so you should only call
|
||||||
|
this API when you are about to launch the browser, or else immediately navigate to the result URL using
|
||||||
|
a hidden browser window.
|
||||||
|
NOTE: The resulting authorization cookie has an expiration time of one day, so it would be a good idea
|
||||||
|
to request and visit a new auth URL every 12 hours.
|
||||||
</summary>
|
</summary>
|
||||||
</member>
|
</member>
|
||||||
<member name="P:Steamworks.SteamUser.IsPhoneVerified">
|
<member name="P:Steamworks.SteamUser.IsPhoneVerified">
|
||||||
@ -2523,7 +2579,8 @@
|
|||||||
The encryption key can be obtained from the Encrypted App Ticket Key page on the App Admin for your app.
|
The encryption key can be obtained from the Encrypted App Ticket Key page on the App Admin for your app.
|
||||||
There can only be one call pending, and this call is subject to a 60 second rate limit.
|
There can only be one call pending, and this call is subject to a 60 second rate limit.
|
||||||
If you get a null result from this it's probably because you're calling it too often.
|
If you get a null result from this it's probably because you're calling it too often.
|
||||||
This can fail if you don't have an encrypted ticket set for your app here https://partner.steamgames.com/apps/sdkauth/
|
This can fail if you don't have an encrypted ticket set for your app here
|
||||||
|
https://partner.steamgames.com/apps/sdkauth/
|
||||||
</summary>
|
</summary>
|
||||||
</member>
|
</member>
|
||||||
<member name="M:Steamworks.SteamUser.RequestEncryptedAppTicketAsync">
|
<member name="M:Steamworks.SteamUser.RequestEncryptedAppTicketAsync">
|
||||||
@ -2531,7 +2588,8 @@
|
|||||||
Requests an application ticket encrypted with the secret "encrypted app ticket key".
|
Requests an application ticket encrypted with the secret "encrypted app ticket key".
|
||||||
The encryption key can be obtained from the Encrypted App Ticket Key page on the App Admin for your app.
|
The encryption key can be obtained from the Encrypted App Ticket Key page on the App Admin for your app.
|
||||||
There can only be one call pending, and this call is subject to a 60 second rate limit.
|
There can only be one call pending, and this call is subject to a 60 second rate limit.
|
||||||
This can fail if you don't have an encrypted ticket set for your app here https://partner.steamgames.com/apps/sdkauth/
|
This can fail if you don't have an encrypted ticket set for your app here
|
||||||
|
https://partner.steamgames.com/apps/sdkauth/
|
||||||
</summary>
|
</summary>
|
||||||
</member>
|
</member>
|
||||||
<member name="M:Steamworks.SteamUser.GetDurationControl">
|
<member name="M:Steamworks.SteamUser.GetDurationControl">
|
||||||
@ -2589,13 +2647,19 @@
|
|||||||
<member name="M:Steamworks.SteamUserStats.StoreStats">
|
<member name="M:Steamworks.SteamUserStats.StoreStats">
|
||||||
<summary>
|
<summary>
|
||||||
Send the changed stats and achievements data to the server for permanent storage.
|
Send the changed stats and achievements data to the server for permanent storage.
|
||||||
If this fails then nothing is sent to the server. It's advisable to keep trying until the call is successful.
|
If this fails then nothing is sent to the server. It's advisable to keep trying until the call is
|
||||||
This call can be rate limited. Call frequency should be on the order of minutes, rather than seconds.You should only be calling this during major state changes such as the end of a round, the map changing, or the user leaving a server. This call is required to display the achievement unlock notification dialog though, so if you have called SetAchievement then it's advisable to call this soon after that.
|
successful.
|
||||||
If you have stats or achievements that you have saved locally but haven't uploaded with this function when your application process ends then this function will automatically be called.
|
This call can be rate limited. Call frequency should be on the order of minutes, rather than seconds.You
|
||||||
|
should only be calling this during major state changes such as the end of a round, the map changing, or
|
||||||
|
the user leaving a server. This call is required to display the achievement unlock notification dialog
|
||||||
|
though, so if you have called SetAchievement then it's advisable to call this soon after that.
|
||||||
|
If you have stats or achievements that you have saved locally but haven't uploaded with this function
|
||||||
|
when your application process ends then this function will automatically be called.
|
||||||
You can find additional debug information written to the %steam_install%\logs\stats_log.txt file.
|
You can find additional debug information written to the %steam_install%\logs\stats_log.txt file.
|
||||||
This function returns true upon success if :
|
This function returns true upon success if :
|
||||||
RequestCurrentStats has completed and successfully returned its callback AND
|
RequestCurrentStats has completed and successfully returned its callback AND
|
||||||
the current game has stats associated with it in the Steamworks Partner backend, and those stats are published.
|
the current game has stats associated with it in the Steamworks Partner backend, and those stats are
|
||||||
|
published.
|
||||||
</summary>
|
</summary>
|
||||||
</member>
|
</member>
|
||||||
<member name="M:Steamworks.SteamUserStats.RequestCurrentStats">
|
<member name="M:Steamworks.SteamUserStats.RequestCurrentStats">
|
||||||
@ -2613,8 +2677,12 @@
|
|||||||
You must have called RequestCurrentStats and it needs to return successfully via
|
You must have called RequestCurrentStats and it needs to return successfully via
|
||||||
its callback prior to calling this.
|
its callback prior to calling this.
|
||||||
</summary>
|
</summary>
|
||||||
<param name="days">How many days of day-by-day history to retrieve in addition to the overall totals. The limit is 60.</param>
|
<param name="days">How many days of day-by-day history to retrieve in addition to the overall totals. The
|
||||||
<returns>OK indicates success, InvalidState means you need to call RequestCurrentStats first, Fail means the remote call failed</returns>
|
limit is 60.
|
||||||
|
</param>
|
||||||
|
<returns>OK indicates success, InvalidState means you need to call RequestCurrentStats first, Fail means the
|
||||||
|
remote call failed
|
||||||
|
</returns>
|
||||||
</member>
|
</member>
|
||||||
<member name="M:Steamworks.SteamUserStats.FindOrCreateLeaderboardAsync(System.String,Steamworks.Data.LeaderboardSort,Steamworks.Data.LeaderboardDisplay)">
|
<member name="M:Steamworks.SteamUserStats.FindOrCreateLeaderboardAsync(System.String,Steamworks.Data.LeaderboardSort,Steamworks.Data.LeaderboardDisplay)">
|
||||||
<summary>
|
<summary>
|
||||||
@ -2692,7 +2760,8 @@
|
|||||||
</member>
|
</member>
|
||||||
<member name="E:Steamworks.SteamUtils.OnGamepadTextInputDismissed">
|
<member name="E:Steamworks.SteamUtils.OnGamepadTextInputDismissed">
|
||||||
<summary>
|
<summary>
|
||||||
Big Picture gamepad text input has been closed. Parameter is true if text was submitted, false if cancelled etc.
|
Big Picture gamepad text input has been closed. Parameter is true if text was submitted, false if
|
||||||
|
cancelled etc.
|
||||||
</summary>
|
</summary>
|
||||||
</member>
|
</member>
|
||||||
<member name="P:Steamworks.SteamUtils.SecondsSinceAppActive">
|
<member name="P:Steamworks.SteamUtils.SecondsSinceAppActive">
|
||||||
@ -2712,7 +2781,8 @@
|
|||||||
</member>
|
</member>
|
||||||
<member name="P:Steamworks.SteamUtils.IpCountry">
|
<member name="P:Steamworks.SteamUtils.IpCountry">
|
||||||
<summary>
|
<summary>
|
||||||
returns the 2 digit ISO 3166-1-alpha-2 format country code this client is running in (as looked up via an IP-to-location database)
|
returns the 2 digit ISO 3166-1-alpha-2 format country code this client is running in (as looked up via
|
||||||
|
an IP-to-location database)
|
||||||
e.g "US" or "UK".
|
e.g "US" or "UK".
|
||||||
</summary>
|
</summary>
|
||||||
</member>
|
</member>
|
||||||
@ -2741,13 +2811,16 @@
|
|||||||
<member name="P:Steamworks.SteamUtils.OverlayNotificationPosition">
|
<member name="P:Steamworks.SteamUtils.OverlayNotificationPosition">
|
||||||
<summary>
|
<summary>
|
||||||
Sets the position where the overlay instance for the currently calling game should show notifications.
|
Sets the position where the overlay instance for the currently calling game should show notifications.
|
||||||
This position is per-game and if this function is called from outside of a game context it will do nothing.
|
This position is per-game and if this function is called from outside of a game context it will do
|
||||||
|
nothing.
|
||||||
</summary>
|
</summary>
|
||||||
</member>
|
</member>
|
||||||
<member name="P:Steamworks.SteamUtils.IsOverlayEnabled">
|
<member name="P:Steamworks.SteamUtils.IsOverlayEnabled">
|
||||||
<summary>
|
<summary>
|
||||||
Returns true if the overlay is running and the user can access it. The overlay process could take a few seconds to
|
Returns true if the overlay is running and the user can access it. The overlay process could take a few
|
||||||
start and hook the game process, so this function will initially return false while the overlay is loading.
|
seconds to
|
||||||
|
start and hook the game process, so this function will initially return false while the overlay is
|
||||||
|
loading.
|
||||||
</summary>
|
</summary>
|
||||||
</member>
|
</member>
|
||||||
<member name="P:Steamworks.SteamUtils.DoesOverlayNeedPresent">
|
<member name="P:Steamworks.SteamUtils.DoesOverlayNeedPresent">
|
||||||
@ -2758,14 +2831,16 @@
|
|||||||
However, if you have a game that only refreshes the screen on an event driven basis then that can break
|
However, if you have a game that only refreshes the screen on an event driven basis then that can break
|
||||||
the overlay, as it uses your Present/SwapBuffers calls to drive it's internal frame loop and it may also
|
the overlay, as it uses your Present/SwapBuffers calls to drive it's internal frame loop and it may also
|
||||||
need to Present() to the screen any time an even needing a notification happens or when the overlay is
|
need to Present() to the screen any time an even needing a notification happens or when the overlay is
|
||||||
brought up over the game by a user. You can use this API to ask the overlay if it currently need a present
|
brought up over the game by a user. You can use this API to ask the overlay if it currently need a
|
||||||
|
present
|
||||||
in that case, and then you can check for this periodically (roughly 33hz is desirable) and make sure you
|
in that case, and then you can check for this periodically (roughly 33hz is desirable) and make sure you
|
||||||
refresh the screen with Present or SwapBuffers to allow the overlay to do it's work.
|
refresh the screen with Present or SwapBuffers to allow the overlay to do it's work.
|
||||||
</summary>
|
</summary>
|
||||||
</member>
|
</member>
|
||||||
<member name="M:Steamworks.SteamUtils.CheckFileSignatureAsync(System.String)">
|
<member name="M:Steamworks.SteamUtils.CheckFileSignatureAsync(System.String)">
|
||||||
<summary>
|
<summary>
|
||||||
Asynchronous call to check if an executable file has been signed using the public key set on the signing tab
|
Asynchronous call to check if an executable file has been signed using the public key set on the signing
|
||||||
|
tab
|
||||||
of the partner site, for example to refuse to load modified executable files.
|
of the partner site, for example to refuse to load modified executable files.
|
||||||
</summary>
|
</summary>
|
||||||
</member>
|
</member>
|
||||||
@ -2810,8 +2885,10 @@
|
|||||||
<member name="P:Steamworks.SteamUtils.VrHeadsetStreaming">
|
<member name="P:Steamworks.SteamUtils.VrHeadsetStreaming">
|
||||||
<summary>
|
<summary>
|
||||||
Set whether the HMD content will be streamed via Steam In-Home Streaming
|
Set whether the HMD content will be streamed via Steam In-Home Streaming
|
||||||
If this is set to true, then the scene in the HMD headset will be streamed, and remote input will not be allowed.
|
If this is set to true, then the scene in the HMD headset will be streamed, and remote input will not be
|
||||||
If this is set to false, then the application window will be streamed instead, and remote input will be allowed.
|
allowed.
|
||||||
|
If this is set to false, then the application window will be streamed instead, and remote input will be
|
||||||
|
allowed.
|
||||||
The default is true unless "VRHeadsetStreaming" "0" is in the extended appinfo for a game.
|
The default is true unless "VRHeadsetStreaming" "0" is in the extended appinfo for a game.
|
||||||
(this is useful for games that have asymmetric multiplayer gameplay)
|
(this is useful for games that have asymmetric multiplayer gameplay)
|
||||||
</summary>
|
</summary>
|
||||||
@ -2944,7 +3021,9 @@
|
|||||||
Gets a the time this achievement was unlocked.
|
Gets a the time this achievement was unlocked.
|
||||||
</summary>
|
</summary>
|
||||||
<param name="statName">The name of the achievement you want to get</param>
|
<param name="statName">The name of the achievement you want to get</param>
|
||||||
<returns>The time unlocked. If it wasn't unlocked, or you haven't downloaded the stats yet - will return DateTime.MinValue</returns>
|
<returns>The time unlocked. If it wasn't unlocked, or you haven't downloaded the stats yet - will return
|
||||||
|
DateTime.MinValue
|
||||||
|
</returns>
|
||||||
</member>
|
</member>
|
||||||
<member name="P:Steamworks.InventoryDef.Name">
|
<member name="P:Steamworks.InventoryDef.Name">
|
||||||
<summary>
|
<summary>
|
||||||
@ -3073,10 +3152,14 @@
|
|||||||
</member>
|
</member>
|
||||||
<member name="M:Steamworks.InventoryItem.ConsumeAsync(System.Int32)">
|
<member name="M:Steamworks.InventoryItem.ConsumeAsync(System.Int32)">
|
||||||
<summary>
|
<summary>
|
||||||
Consumes items from a user's inventory. If the quantity of the given item goes to zero, it is permanently removed.
|
Consumes items from a user's inventory. If the quantity of the given item goes to zero, it is
|
||||||
Once an item is removed it cannot be recovered.This is not for the faint of heart - if your game implements item removal at all,
|
permanently removed.
|
||||||
a high-friction UI confirmation process is highly recommended.ConsumeItem can be restricted to certain item definitions or fully
|
Once an item is removed it cannot be recovered.This is not for the faint of heart - if your game
|
||||||
blocked via the Steamworks website to minimize support/abuse issues such as the classic "my brother borrowed my laptop and deleted all of my rare items".
|
implements item removal at all,
|
||||||
|
a high-friction UI confirmation process is highly recommended.ConsumeItem can be restricted to certain
|
||||||
|
item definitions or fully
|
||||||
|
blocked via the Steamworks website to minimize support/abuse issues such as the classic "my brother
|
||||||
|
borrowed my laptop and deleted all of my rare items".
|
||||||
</summary>
|
</summary>
|
||||||
</member>
|
</member>
|
||||||
<member name="M:Steamworks.InventoryItem.SplitStackAsync(System.Int32)">
|
<member name="M:Steamworks.InventoryItem.SplitStackAsync(System.Int32)">
|
||||||
@ -3140,18 +3223,24 @@
|
|||||||
<member name="M:Steamworks.InventoryResult.BelongsTo(Steamworks.SteamId)">
|
<member name="M:Steamworks.InventoryResult.BelongsTo(Steamworks.SteamId)">
|
||||||
<summary>
|
<summary>
|
||||||
Checks whether an inventory result handle belongs to the specified Steam ID.
|
Checks whether an inventory result handle belongs to the specified Steam ID.
|
||||||
This is important when using Deserialize, to verify that a remote player is not pretending to have a different user's inventory
|
This is important when using Deserialize, to verify that a remote player is not pretending to have a
|
||||||
|
different user's inventory
|
||||||
</summary>
|
</summary>
|
||||||
</member>
|
</member>
|
||||||
<member name="M:Steamworks.InventoryResult.Serialize">
|
<member name="M:Steamworks.InventoryResult.Serialize">
|
||||||
<summary>
|
<summary>
|
||||||
Serialized result sets contain a short signature which can't be forged or replayed across different game sessions.
|
Serialized result sets contain a short signature which can't be forged or replayed across different game
|
||||||
A result set can be serialized on the local client, transmitted to other players via your game networking, and
|
sessions.
|
||||||
|
A result set can be serialized on the local client, transmitted to other players via your game
|
||||||
|
networking, and
|
||||||
deserialized by the remote players.This is a secure way of preventing hackers from lying about posessing
|
deserialized by the remote players.This is a secure way of preventing hackers from lying about posessing
|
||||||
rare/high-value items. Serializes a result set with signature bytes to an output buffer.The size of a serialized
|
rare/high-value items. Serializes a result set with signature bytes to an output buffer.The size of a
|
||||||
result depends on the number items which are being serialized.When securely transmitting items to other players,
|
serialized
|
||||||
|
result depends on the number items which are being serialized.When securely transmitting items to other
|
||||||
|
players,
|
||||||
it is recommended to use GetItemsByID first to create a minimal result set.
|
it is recommended to use GetItemsByID first to create a minimal result set.
|
||||||
Results have a built-in timestamp which will be considered "expired" after an hour has elapsed.See DeserializeResult
|
Results have a built-in timestamp which will be considered "expired" after an hour has elapsed.See
|
||||||
|
DeserializeResult
|
||||||
for expiration handling.
|
for expiration handling.
|
||||||
</summary>
|
</summary>
|
||||||
</member>
|
</member>
|
||||||
@ -3173,15 +3262,18 @@
|
|||||||
</member>
|
</member>
|
||||||
<member name="M:Steamworks.PartyBeacon.OnReservationCompleted(Steamworks.SteamId)">
|
<member name="M:Steamworks.PartyBeacon.OnReservationCompleted(Steamworks.SteamId)">
|
||||||
<summary>
|
<summary>
|
||||||
When a user follows your beacon, Steam will reserve one of the open party slots for them, and send your game a ReservationNotification callback.
|
When a user follows your beacon, Steam will reserve one of the open party slots for them, and send your
|
||||||
When that user joins your party, call OnReservationCompleted to notify Steam that the user has joined successfully
|
game a ReservationNotification callback.
|
||||||
|
When that user joins your party, call OnReservationCompleted to notify Steam that the user has joined
|
||||||
|
successfully
|
||||||
</summary>
|
</summary>
|
||||||
</member>
|
</member>
|
||||||
<member name="M:Steamworks.PartyBeacon.CancelReservation(Steamworks.SteamId)">
|
<member name="M:Steamworks.PartyBeacon.CancelReservation(Steamworks.SteamId)">
|
||||||
<summary>
|
<summary>
|
||||||
To cancel a reservation (due to timeout or user input), call this.
|
To cancel a reservation (due to timeout or user input), call this.
|
||||||
Steam will open a new reservation slot.
|
Steam will open a new reservation slot.
|
||||||
Note: The user may already be in-flight to your game, so it's possible they will still connect and try to join your party.
|
Note: The user may already be in-flight to your game, so it's possible they will still connect and try
|
||||||
|
to join your party.
|
||||||
</summary>
|
</summary>
|
||||||
</member>
|
</member>
|
||||||
<member name="M:Steamworks.PartyBeacon.Destroy">
|
<member name="M:Steamworks.PartyBeacon.Destroy">
|
||||||
@ -3197,14 +3289,17 @@
|
|||||||
</member>
|
</member>
|
||||||
<member name="F:Steamworks.SteamServerInit.VersionString">
|
<member name="F:Steamworks.SteamServerInit.VersionString">
|
||||||
<summary>
|
<summary>
|
||||||
The version string is usually in the form x.x.x.x, and is used by the master server to detect when the server is out of date.
|
The version string is usually in the form x.x.x.x, and is used by the master server to detect when the
|
||||||
If you go into the dedicated server tab on steamworks you'll be able to server the latest version. If this version number is
|
server is out of date.
|
||||||
|
If you go into the dedicated server tab on steamworks you'll be able to server the latest version. If
|
||||||
|
this version number is
|
||||||
less than that latest version then your server won't show.
|
less than that latest version then your server won't show.
|
||||||
</summary>
|
</summary>
|
||||||
</member>
|
</member>
|
||||||
<member name="F:Steamworks.SteamServerInit.ModDir">
|
<member name="F:Steamworks.SteamServerInit.ModDir">
|
||||||
<summary>
|
<summary>
|
||||||
This should be the same directory game where gets installed into. Just the folder name, not the whole path. I.e. "Rust", "Garrysmod".
|
This should be the same directory game where gets installed into. Just the folder name, not the whole
|
||||||
|
path. I.e. "Rust", "Garrysmod".
|
||||||
</summary>
|
</summary>
|
||||||
</member>
|
</member>
|
||||||
<member name="F:Steamworks.SteamServerInit.GameDescription">
|
<member name="F:Steamworks.SteamServerInit.GameDescription">
|
||||||
@ -3224,8 +3319,10 @@
|
|||||||
</member>
|
</member>
|
||||||
<member name="M:Steamworks.SteamServerInit.WithQueryShareGamePort">
|
<member name="M:Steamworks.SteamServerInit.WithQueryShareGamePort">
|
||||||
<summary>
|
<summary>
|
||||||
If you pass MASTERSERVERUPDATERPORT_USEGAMESOCKETSHARE into usQueryPort, then it causes the game server API to use
|
If you pass MASTERSERVERUPDATERPORT_USEGAMESOCKETSHARE into usQueryPort, then it causes the game server
|
||||||
"GameSocketShare" mode, which means that the game is responsible for sending and receiving UDP packets for the master
|
API to use
|
||||||
|
"GameSocketShare" mode, which means that the game is responsible for sending and receiving UDP packets
|
||||||
|
for the master
|
||||||
server updater.
|
server updater.
|
||||||
|
|
||||||
More info about this here: https://partner.steamgames.com/doc/api/ISteamGameServer#HandleIncomingPacket
|
More info about this here: https://partner.steamgames.com/doc/api/ISteamGameServer#HandleIncomingPacket
|
||||||
|
@ -12,7 +12,7 @@ PluginImporter:
|
|||||||
validateReferences: 1
|
validateReferences: 1
|
||||||
platformData:
|
platformData:
|
||||||
- first:
|
- first:
|
||||||
'': Any
|
: Any
|
||||||
second:
|
second:
|
||||||
enabled: 0
|
enabled: 0
|
||||||
settings:
|
settings:
|
||||||
@ -59,7 +59,7 @@ PluginImporter:
|
|||||||
second:
|
second:
|
||||||
enabled: 1
|
enabled: 1
|
||||||
settings:
|
settings:
|
||||||
CPU: x86_64
|
CPU: AnyCPU
|
||||||
- first:
|
- first:
|
||||||
Standalone: LinuxUniversal
|
Standalone: LinuxUniversal
|
||||||
second:
|
second:
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
fileFormatVersion: 2
|
fileFormatVersion: 2
|
||||||
guid: 0957b521a08374f4aa508231735153bc
|
guid: 8c8cec636f7034e4386a66967a4068ba
|
||||||
|
folderAsset: yes
|
||||||
DefaultImporter:
|
DefaultImporter:
|
||||||
externalObjects: {}
|
externalObjects: {}
|
||||||
userData:
|
userData:
|
461
Assets/Prefabs/Lobby/Friend.prefab
Normal file
461
Assets/Prefabs/Lobby/Friend.prefab
Normal file
@ -0,0 +1,461 @@
|
|||||||
|
%YAML 1.1
|
||||||
|
%TAG !u! tag:unity3d.com,2011:
|
||||||
|
--- !u!1 &4214403233071238501
|
||||||
|
GameObject:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
serializedVersion: 6
|
||||||
|
m_Component:
|
||||||
|
- component: {fileID: 420310214753495322}
|
||||||
|
- component: {fileID: 860360227658967599}
|
||||||
|
- component: {fileID: 4065333453424625746}
|
||||||
|
m_Layer: 5
|
||||||
|
m_Name: Text
|
||||||
|
m_TagString: Untagged
|
||||||
|
m_Icon: {fileID: 0}
|
||||||
|
m_NavMeshLayer: 0
|
||||||
|
m_StaticEditorFlags: 0
|
||||||
|
m_IsActive: 1
|
||||||
|
--- !u!224 &420310214753495322
|
||||||
|
RectTransform:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 4214403233071238501}
|
||||||
|
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
|
||||||
|
m_LocalPosition: {x: 0, y: 0, z: 0}
|
||||||
|
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||||
|
m_ConstrainProportionsScale: 0
|
||||||
|
m_Children: []
|
||||||
|
m_Father: {fileID: 2822828485358111010}
|
||||||
|
m_RootOrder: 0
|
||||||
|
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||||
|
m_AnchorMin: {x: 0, y: 0}
|
||||||
|
m_AnchorMax: {x: 1, y: 1}
|
||||||
|
m_AnchoredPosition: {x: 0, y: 0}
|
||||||
|
m_SizeDelta: {x: 0, y: 0}
|
||||||
|
m_Pivot: {x: 0.5, y: 0.5}
|
||||||
|
--- !u!222 &860360227658967599
|
||||||
|
CanvasRenderer:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 4214403233071238501}
|
||||||
|
m_CullTransparentMesh: 0
|
||||||
|
--- !u!114 &4065333453424625746
|
||||||
|
MonoBehaviour:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 4214403233071238501}
|
||||||
|
m_Enabled: 1
|
||||||
|
m_EditorHideFlags: 0
|
||||||
|
m_Script: {fileID: 11500000, guid: 5f7201a12d95ffc409449d95f23cf332, type: 3}
|
||||||
|
m_Name:
|
||||||
|
m_EditorClassIdentifier:
|
||||||
|
m_Material: {fileID: 0}
|
||||||
|
m_Color: {r: 0.19607843, g: 0.19607843, b: 0.19607843, a: 1}
|
||||||
|
m_RaycastTarget: 1
|
||||||
|
m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0}
|
||||||
|
m_Maskable: 1
|
||||||
|
m_OnCullStateChanged:
|
||||||
|
m_PersistentCalls:
|
||||||
|
m_Calls: []
|
||||||
|
m_FontData:
|
||||||
|
m_Font: {fileID: 10102, guid: 0000000000000000e000000000000000, type: 0}
|
||||||
|
m_FontSize: 14
|
||||||
|
m_FontStyle: 0
|
||||||
|
m_BestFit: 0
|
||||||
|
m_MinSize: 10
|
||||||
|
m_MaxSize: 40
|
||||||
|
m_Alignment: 4
|
||||||
|
m_AlignByGeometry: 0
|
||||||
|
m_RichText: 1
|
||||||
|
m_HorizontalOverflow: 0
|
||||||
|
m_VerticalOverflow: 0
|
||||||
|
m_LineSpacing: 1
|
||||||
|
m_Text: Invite
|
||||||
|
--- !u!1 &4515538683647385522
|
||||||
|
GameObject:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
serializedVersion: 6
|
||||||
|
m_Component:
|
||||||
|
- component: {fileID: 4515538683647385525}
|
||||||
|
- component: {fileID: 4515538683647385527}
|
||||||
|
- component: {fileID: 4515538683647385524}
|
||||||
|
m_Layer: 5
|
||||||
|
m_Name: RawImage
|
||||||
|
m_TagString: Untagged
|
||||||
|
m_Icon: {fileID: 0}
|
||||||
|
m_NavMeshLayer: 0
|
||||||
|
m_StaticEditorFlags: 0
|
||||||
|
m_IsActive: 1
|
||||||
|
--- !u!224 &4515538683647385525
|
||||||
|
RectTransform:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 4515538683647385522}
|
||||||
|
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
|
||||||
|
m_LocalPosition: {x: 0, y: 0, z: 0}
|
||||||
|
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||||
|
m_ConstrainProportionsScale: 0
|
||||||
|
m_Children: []
|
||||||
|
m_Father: {fileID: 4515538684322551740}
|
||||||
|
m_RootOrder: 0
|
||||||
|
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||||
|
m_AnchorMin: {x: 0, y: 0.5}
|
||||||
|
m_AnchorMax: {x: 0, y: 0.5}
|
||||||
|
m_AnchoredPosition: {x: 25, y: 0}
|
||||||
|
m_SizeDelta: {x: 50, y: 50}
|
||||||
|
m_Pivot: {x: 0.5, y: 0.5}
|
||||||
|
--- !u!222 &4515538683647385527
|
||||||
|
CanvasRenderer:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 4515538683647385522}
|
||||||
|
m_CullTransparentMesh: 0
|
||||||
|
--- !u!114 &4515538683647385524
|
||||||
|
MonoBehaviour:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 4515538683647385522}
|
||||||
|
m_Enabled: 1
|
||||||
|
m_EditorHideFlags: 0
|
||||||
|
m_Script: {fileID: 11500000, guid: 1344c3c82d62a2a41a3576d8abb8e3ea, type: 3}
|
||||||
|
m_Name:
|
||||||
|
m_EditorClassIdentifier:
|
||||||
|
m_Material: {fileID: 0}
|
||||||
|
m_Color: {r: 1, g: 1, b: 1, a: 1}
|
||||||
|
m_RaycastTarget: 1
|
||||||
|
m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0}
|
||||||
|
m_Maskable: 1
|
||||||
|
m_OnCullStateChanged:
|
||||||
|
m_PersistentCalls:
|
||||||
|
m_Calls: []
|
||||||
|
m_Texture: {fileID: 0}
|
||||||
|
m_UVRect:
|
||||||
|
serializedVersion: 2
|
||||||
|
x: 0
|
||||||
|
y: 0
|
||||||
|
width: 1
|
||||||
|
height: 1
|
||||||
|
--- !u!1 &4515538684322551741
|
||||||
|
GameObject:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
serializedVersion: 6
|
||||||
|
m_Component:
|
||||||
|
- component: {fileID: 4515538684322551740}
|
||||||
|
- component: {fileID: 4515538684322551742}
|
||||||
|
- component: {fileID: 4515538684322551743}
|
||||||
|
- component: {fileID: 2655444595641622988}
|
||||||
|
m_Layer: 5
|
||||||
|
m_Name: Friend
|
||||||
|
m_TagString: Untagged
|
||||||
|
m_Icon: {fileID: 0}
|
||||||
|
m_NavMeshLayer: 0
|
||||||
|
m_StaticEditorFlags: 0
|
||||||
|
m_IsActive: 1
|
||||||
|
--- !u!224 &4515538684322551740
|
||||||
|
RectTransform:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 4515538684322551741}
|
||||||
|
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
|
||||||
|
m_LocalPosition: {x: 0, y: 0, z: 0}
|
||||||
|
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||||
|
m_ConstrainProportionsScale: 0
|
||||||
|
m_Children:
|
||||||
|
- {fileID: 4515538683647385525}
|
||||||
|
- {fileID: 4515538684548919610}
|
||||||
|
- {fileID: 2822828485358111010}
|
||||||
|
m_Father: {fileID: 0}
|
||||||
|
m_RootOrder: 0
|
||||||
|
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||||
|
m_AnchorMin: {x: 0, y: 0}
|
||||||
|
m_AnchorMax: {x: 0, y: 0}
|
||||||
|
m_AnchoredPosition: {x: 0, y: 0}
|
||||||
|
m_SizeDelta: {x: 180.38406, y: 50}
|
||||||
|
m_Pivot: {x: 0.5, y: 0.5}
|
||||||
|
--- !u!222 &4515538684322551742
|
||||||
|
CanvasRenderer:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 4515538684322551741}
|
||||||
|
m_CullTransparentMesh: 0
|
||||||
|
--- !u!114 &4515538684322551743
|
||||||
|
MonoBehaviour:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 4515538684322551741}
|
||||||
|
m_Enabled: 1
|
||||||
|
m_EditorHideFlags: 0
|
||||||
|
m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3}
|
||||||
|
m_Name:
|
||||||
|
m_EditorClassIdentifier:
|
||||||
|
m_Material: {fileID: 0}
|
||||||
|
m_Color: {r: 0.2735849, g: 0.2735849, b: 0.2735849, a: 1}
|
||||||
|
m_RaycastTarget: 1
|
||||||
|
m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0}
|
||||||
|
m_Maskable: 1
|
||||||
|
m_OnCullStateChanged:
|
||||||
|
m_PersistentCalls:
|
||||||
|
m_Calls: []
|
||||||
|
m_Sprite: {fileID: 0}
|
||||||
|
m_Type: 0
|
||||||
|
m_PreserveAspect: 0
|
||||||
|
m_FillCenter: 1
|
||||||
|
m_FillMethod: 4
|
||||||
|
m_FillAmount: 1
|
||||||
|
m_FillClockwise: 1
|
||||||
|
m_FillOrigin: 0
|
||||||
|
m_UseSpriteMesh: 0
|
||||||
|
m_PixelsPerUnitMultiplier: 1
|
||||||
|
--- !u!114 &2655444595641622988
|
||||||
|
MonoBehaviour:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 4515538684322551741}
|
||||||
|
m_Enabled: 1
|
||||||
|
m_EditorHideFlags: 0
|
||||||
|
m_Script: {fileID: 11500000, guid: 57db693cbe9a46345add801ae22e1e2a, type: 3}
|
||||||
|
m_Name:
|
||||||
|
m_EditorClassIdentifier:
|
||||||
|
--- !u!1 &4515538684548919611
|
||||||
|
GameObject:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
serializedVersion: 6
|
||||||
|
m_Component:
|
||||||
|
- component: {fileID: 4515538684548919610}
|
||||||
|
- component: {fileID: 4515538684548919612}
|
||||||
|
- component: {fileID: 4515538684548919613}
|
||||||
|
m_Layer: 5
|
||||||
|
m_Name: Text
|
||||||
|
m_TagString: Untagged
|
||||||
|
m_Icon: {fileID: 0}
|
||||||
|
m_NavMeshLayer: 0
|
||||||
|
m_StaticEditorFlags: 0
|
||||||
|
m_IsActive: 1
|
||||||
|
--- !u!224 &4515538684548919610
|
||||||
|
RectTransform:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 4515538684548919611}
|
||||||
|
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
|
||||||
|
m_LocalPosition: {x: 0, y: 0, z: 0}
|
||||||
|
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||||
|
m_ConstrainProportionsScale: 0
|
||||||
|
m_Children: []
|
||||||
|
m_Father: {fileID: 4515538684322551740}
|
||||||
|
m_RootOrder: 1
|
||||||
|
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||||
|
m_AnchorMin: {x: 0.5, y: 0.5}
|
||||||
|
m_AnchorMax: {x: 0.5, y: 0.5}
|
||||||
|
m_AnchoredPosition: {x: 25, y: 0}
|
||||||
|
m_SizeDelta: {x: 130.38406, y: 50}
|
||||||
|
m_Pivot: {x: 0.5, y: 0.5}
|
||||||
|
--- !u!222 &4515538684548919612
|
||||||
|
CanvasRenderer:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 4515538684548919611}
|
||||||
|
m_CullTransparentMesh: 0
|
||||||
|
--- !u!114 &4515538684548919613
|
||||||
|
MonoBehaviour:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 4515538684548919611}
|
||||||
|
m_Enabled: 1
|
||||||
|
m_EditorHideFlags: 0
|
||||||
|
m_Script: {fileID: 11500000, guid: 5f7201a12d95ffc409449d95f23cf332, type: 3}
|
||||||
|
m_Name:
|
||||||
|
m_EditorClassIdentifier:
|
||||||
|
m_Material: {fileID: 0}
|
||||||
|
m_Color: {r: 1, g: 1, b: 1, a: 1}
|
||||||
|
m_RaycastTarget: 1
|
||||||
|
m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0}
|
||||||
|
m_Maskable: 1
|
||||||
|
m_OnCullStateChanged:
|
||||||
|
m_PersistentCalls:
|
||||||
|
m_Calls: []
|
||||||
|
m_FontData:
|
||||||
|
m_Font: {fileID: 10102, guid: 0000000000000000e000000000000000, type: 0}
|
||||||
|
m_FontSize: 14
|
||||||
|
m_FontStyle: 0
|
||||||
|
m_BestFit: 0
|
||||||
|
m_MinSize: 10
|
||||||
|
m_MaxSize: 40
|
||||||
|
m_Alignment: 3
|
||||||
|
m_AlignByGeometry: 0
|
||||||
|
m_RichText: 1
|
||||||
|
m_HorizontalOverflow: 0
|
||||||
|
m_VerticalOverflow: 0
|
||||||
|
m_LineSpacing: 1
|
||||||
|
m_Text: New Text
|
||||||
|
--- !u!1 &5420274622274495448
|
||||||
|
GameObject:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
serializedVersion: 6
|
||||||
|
m_Component:
|
||||||
|
- component: {fileID: 2822828485358111010}
|
||||||
|
- component: {fileID: 2725042382176603738}
|
||||||
|
- component: {fileID: 1294573223005139641}
|
||||||
|
- component: {fileID: 7770455586006126737}
|
||||||
|
m_Layer: 5
|
||||||
|
m_Name: Button
|
||||||
|
m_TagString: Untagged
|
||||||
|
m_Icon: {fileID: 0}
|
||||||
|
m_NavMeshLayer: 0
|
||||||
|
m_StaticEditorFlags: 0
|
||||||
|
m_IsActive: 1
|
||||||
|
--- !u!224 &2822828485358111010
|
||||||
|
RectTransform:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 5420274622274495448}
|
||||||
|
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
|
||||||
|
m_LocalPosition: {x: 0, y: 0, z: 0}
|
||||||
|
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||||
|
m_ConstrainProportionsScale: 0
|
||||||
|
m_Children:
|
||||||
|
- {fileID: 420310214753495322}
|
||||||
|
m_Father: {fileID: 4515538684322551740}
|
||||||
|
m_RootOrder: 2
|
||||||
|
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||||
|
m_AnchorMin: {x: 0.5, y: 0.5}
|
||||||
|
m_AnchorMax: {x: 0.5, y: 0.5}
|
||||||
|
m_AnchoredPosition: {x: 54.49, y: 0}
|
||||||
|
m_SizeDelta: {x: 51.02997, y: 30}
|
||||||
|
m_Pivot: {x: 0.5, y: 0.5}
|
||||||
|
--- !u!222 &2725042382176603738
|
||||||
|
CanvasRenderer:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 5420274622274495448}
|
||||||
|
m_CullTransparentMesh: 0
|
||||||
|
--- !u!114 &1294573223005139641
|
||||||
|
MonoBehaviour:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 5420274622274495448}
|
||||||
|
m_Enabled: 1
|
||||||
|
m_EditorHideFlags: 0
|
||||||
|
m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3}
|
||||||
|
m_Name:
|
||||||
|
m_EditorClassIdentifier:
|
||||||
|
m_Material: {fileID: 0}
|
||||||
|
m_Color: {r: 1, g: 1, b: 1, a: 1}
|
||||||
|
m_RaycastTarget: 1
|
||||||
|
m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0}
|
||||||
|
m_Maskable: 1
|
||||||
|
m_OnCullStateChanged:
|
||||||
|
m_PersistentCalls:
|
||||||
|
m_Calls: []
|
||||||
|
m_Sprite: {fileID: 10905, guid: 0000000000000000f000000000000000, type: 0}
|
||||||
|
m_Type: 1
|
||||||
|
m_PreserveAspect: 0
|
||||||
|
m_FillCenter: 1
|
||||||
|
m_FillMethod: 4
|
||||||
|
m_FillAmount: 1
|
||||||
|
m_FillClockwise: 1
|
||||||
|
m_FillOrigin: 0
|
||||||
|
m_UseSpriteMesh: 0
|
||||||
|
m_PixelsPerUnitMultiplier: 1
|
||||||
|
--- !u!114 &7770455586006126737
|
||||||
|
MonoBehaviour:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 5420274622274495448}
|
||||||
|
m_Enabled: 1
|
||||||
|
m_EditorHideFlags: 0
|
||||||
|
m_Script: {fileID: 11500000, guid: 4e29b1a8efbd4b44bb3f3716e73f07ff, type: 3}
|
||||||
|
m_Name:
|
||||||
|
m_EditorClassIdentifier:
|
||||||
|
m_Navigation:
|
||||||
|
m_Mode: 3
|
||||||
|
m_WrapAround: 0
|
||||||
|
m_SelectOnUp: {fileID: 0}
|
||||||
|
m_SelectOnDown: {fileID: 0}
|
||||||
|
m_SelectOnLeft: {fileID: 0}
|
||||||
|
m_SelectOnRight: {fileID: 0}
|
||||||
|
m_Transition: 1
|
||||||
|
m_Colors:
|
||||||
|
m_NormalColor: {r: 1, g: 1, b: 1, a: 1}
|
||||||
|
m_HighlightedColor: {r: 0.9607843, g: 0.9607843, b: 0.9607843, a: 1}
|
||||||
|
m_PressedColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 1}
|
||||||
|
m_SelectedColor: {r: 0.9607843, g: 0.9607843, b: 0.9607843, a: 1}
|
||||||
|
m_DisabledColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 0.5019608}
|
||||||
|
m_ColorMultiplier: 1
|
||||||
|
m_FadeDuration: 0.1
|
||||||
|
m_SpriteState:
|
||||||
|
m_HighlightedSprite: {fileID: 0}
|
||||||
|
m_PressedSprite: {fileID: 0}
|
||||||
|
m_SelectedSprite: {fileID: 0}
|
||||||
|
m_DisabledSprite: {fileID: 0}
|
||||||
|
m_AnimationTriggers:
|
||||||
|
m_NormalTrigger: Normal
|
||||||
|
m_HighlightedTrigger: Highlighted
|
||||||
|
m_PressedTrigger: Pressed
|
||||||
|
m_SelectedTrigger: Selected
|
||||||
|
m_DisabledTrigger: Disabled
|
||||||
|
m_Interactable: 1
|
||||||
|
m_TargetGraphic: {fileID: 1294573223005139641}
|
||||||
|
m_OnClick:
|
||||||
|
m_PersistentCalls:
|
||||||
|
m_Calls:
|
||||||
|
- m_Target: {fileID: 2655444595641622988}
|
||||||
|
m_TargetAssemblyTypeName:
|
||||||
|
m_MethodName: Invite
|
||||||
|
m_Mode: 1
|
||||||
|
m_Arguments:
|
||||||
|
m_ObjectArgument: {fileID: 0}
|
||||||
|
m_ObjectArgumentAssemblyTypeName: UnityEngine.Object, UnityEngine
|
||||||
|
m_IntArgument: 0
|
||||||
|
m_FloatArgument: 0
|
||||||
|
m_StringArgument:
|
||||||
|
m_BoolArgument: 0
|
||||||
|
m_CallState: 2
|
@ -1,6 +1,6 @@
|
|||||||
fileFormatVersion: 2
|
fileFormatVersion: 2
|
||||||
guid: 96a44475794fb6445a6f3c4b9ee13966
|
guid: 2fe0c7c1393a9ac4e9322c657de9c116
|
||||||
DefaultImporter:
|
PrefabImporter:
|
||||||
externalObjects: {}
|
externalObjects: {}
|
||||||
userData:
|
userData:
|
||||||
assetBundleName:
|
assetBundleName:
|
227
Assets/Prefabs/Lobby/LobbyFriend.prefab
Normal file
227
Assets/Prefabs/Lobby/LobbyFriend.prefab
Normal file
@ -0,0 +1,227 @@
|
|||||||
|
%YAML 1.1
|
||||||
|
%TAG !u! tag:unity3d.com,2011:
|
||||||
|
--- !u!1 &4515538683647385522
|
||||||
|
GameObject:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
serializedVersion: 6
|
||||||
|
m_Component:
|
||||||
|
- component: {fileID: 4515538683647385525}
|
||||||
|
- component: {fileID: 4515538683647385527}
|
||||||
|
- component: {fileID: 4515538683647385524}
|
||||||
|
m_Layer: 5
|
||||||
|
m_Name: RawImage
|
||||||
|
m_TagString: Untagged
|
||||||
|
m_Icon: {fileID: 0}
|
||||||
|
m_NavMeshLayer: 0
|
||||||
|
m_StaticEditorFlags: 0
|
||||||
|
m_IsActive: 1
|
||||||
|
--- !u!224 &4515538683647385525
|
||||||
|
RectTransform:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 4515538683647385522}
|
||||||
|
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
|
||||||
|
m_LocalPosition: {x: 0, y: 0, z: 0}
|
||||||
|
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||||
|
m_Children: []
|
||||||
|
m_Father: {fileID: 4515538684322551740}
|
||||||
|
m_RootOrder: 0
|
||||||
|
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||||
|
m_AnchorMin: {x: 0, y: 0.5}
|
||||||
|
m_AnchorMax: {x: 0, y: 0.5}
|
||||||
|
m_AnchoredPosition: {x: 25, y: 0}
|
||||||
|
m_SizeDelta: {x: 50, y: 50}
|
||||||
|
m_Pivot: {x: 0.5, y: 0.5}
|
||||||
|
--- !u!222 &4515538683647385527
|
||||||
|
CanvasRenderer:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 4515538683647385522}
|
||||||
|
m_CullTransparentMesh: 0
|
||||||
|
--- !u!114 &4515538683647385524
|
||||||
|
MonoBehaviour:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 4515538683647385522}
|
||||||
|
m_Enabled: 1
|
||||||
|
m_EditorHideFlags: 0
|
||||||
|
m_Script: {fileID: 11500000, guid: 1344c3c82d62a2a41a3576d8abb8e3ea, type: 3}
|
||||||
|
m_Name:
|
||||||
|
m_EditorClassIdentifier:
|
||||||
|
m_Material: {fileID: 0}
|
||||||
|
m_Color: {r: 1, g: 1, b: 1, a: 1}
|
||||||
|
m_RaycastTarget: 1
|
||||||
|
m_Maskable: 1
|
||||||
|
m_OnCullStateChanged:
|
||||||
|
m_PersistentCalls:
|
||||||
|
m_Calls: []
|
||||||
|
m_Texture: {fileID: 0}
|
||||||
|
m_UVRect:
|
||||||
|
serializedVersion: 2
|
||||||
|
x: 0
|
||||||
|
y: 0
|
||||||
|
width: 1
|
||||||
|
height: 1
|
||||||
|
--- !u!1 &4515538684322551741
|
||||||
|
GameObject:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
serializedVersion: 6
|
||||||
|
m_Component:
|
||||||
|
- component: {fileID: 4515538684322551740}
|
||||||
|
- component: {fileID: 4515538684322551742}
|
||||||
|
- component: {fileID: 4515538684322551743}
|
||||||
|
m_Layer: 5
|
||||||
|
m_Name: Friend
|
||||||
|
m_TagString: Untagged
|
||||||
|
m_Icon: {fileID: 0}
|
||||||
|
m_NavMeshLayer: 0
|
||||||
|
m_StaticEditorFlags: 0
|
||||||
|
m_IsActive: 1
|
||||||
|
--- !u!224 &4515538684322551740
|
||||||
|
RectTransform:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 4515538684322551741}
|
||||||
|
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
|
||||||
|
m_LocalPosition: {x: 0, y: 0, z: 0}
|
||||||
|
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||||
|
m_Children:
|
||||||
|
- {fileID: 4515538683647385525}
|
||||||
|
- {fileID: 4515538684548919610}
|
||||||
|
m_Father: {fileID: 0}
|
||||||
|
m_RootOrder: 0
|
||||||
|
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||||
|
m_AnchorMin: {x: 0, y: 0}
|
||||||
|
m_AnchorMax: {x: 0, y: 0}
|
||||||
|
m_AnchoredPosition: {x: 0, y: 0}
|
||||||
|
m_SizeDelta: {x: 180.38406, y: 50}
|
||||||
|
m_Pivot: {x: 0.5, y: 0.5}
|
||||||
|
--- !u!222 &4515538684322551742
|
||||||
|
CanvasRenderer:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 4515538684322551741}
|
||||||
|
m_CullTransparentMesh: 0
|
||||||
|
--- !u!114 &4515538684322551743
|
||||||
|
MonoBehaviour:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 4515538684322551741}
|
||||||
|
m_Enabled: 1
|
||||||
|
m_EditorHideFlags: 0
|
||||||
|
m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3}
|
||||||
|
m_Name:
|
||||||
|
m_EditorClassIdentifier:
|
||||||
|
m_Material: {fileID: 0}
|
||||||
|
m_Color: {r: 0.2735849, g: 0.2735849, b: 0.2735849, a: 1}
|
||||||
|
m_RaycastTarget: 1
|
||||||
|
m_Maskable: 1
|
||||||
|
m_OnCullStateChanged:
|
||||||
|
m_PersistentCalls:
|
||||||
|
m_Calls: []
|
||||||
|
m_Sprite: {fileID: 0}
|
||||||
|
m_Type: 0
|
||||||
|
m_PreserveAspect: 0
|
||||||
|
m_FillCenter: 1
|
||||||
|
m_FillMethod: 4
|
||||||
|
m_FillAmount: 1
|
||||||
|
m_FillClockwise: 1
|
||||||
|
m_FillOrigin: 0
|
||||||
|
m_UseSpriteMesh: 0
|
||||||
|
m_PixelsPerUnitMultiplier: 1
|
||||||
|
--- !u!1 &4515538684548919611
|
||||||
|
GameObject:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
serializedVersion: 6
|
||||||
|
m_Component:
|
||||||
|
- component: {fileID: 4515538684548919610}
|
||||||
|
- component: {fileID: 4515538684548919612}
|
||||||
|
- component: {fileID: 4515538684548919613}
|
||||||
|
m_Layer: 5
|
||||||
|
m_Name: Text
|
||||||
|
m_TagString: Untagged
|
||||||
|
m_Icon: {fileID: 0}
|
||||||
|
m_NavMeshLayer: 0
|
||||||
|
m_StaticEditorFlags: 0
|
||||||
|
m_IsActive: 1
|
||||||
|
--- !u!224 &4515538684548919610
|
||||||
|
RectTransform:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 4515538684548919611}
|
||||||
|
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
|
||||||
|
m_LocalPosition: {x: 0, y: 0, z: 0}
|
||||||
|
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||||
|
m_Children: []
|
||||||
|
m_Father: {fileID: 4515538684322551740}
|
||||||
|
m_RootOrder: 1
|
||||||
|
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||||
|
m_AnchorMin: {x: 0.5, y: 0.5}
|
||||||
|
m_AnchorMax: {x: 0.5, y: 0.5}
|
||||||
|
m_AnchoredPosition: {x: 25, y: 0}
|
||||||
|
m_SizeDelta: {x: 130.38406, y: 50}
|
||||||
|
m_Pivot: {x: 0.5, y: 0.5}
|
||||||
|
--- !u!222 &4515538684548919612
|
||||||
|
CanvasRenderer:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 4515538684548919611}
|
||||||
|
m_CullTransparentMesh: 0
|
||||||
|
--- !u!114 &4515538684548919613
|
||||||
|
MonoBehaviour:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 4515538684548919611}
|
||||||
|
m_Enabled: 1
|
||||||
|
m_EditorHideFlags: 0
|
||||||
|
m_Script: {fileID: 11500000, guid: 5f7201a12d95ffc409449d95f23cf332, type: 3}
|
||||||
|
m_Name:
|
||||||
|
m_EditorClassIdentifier:
|
||||||
|
m_Material: {fileID: 0}
|
||||||
|
m_Color: {r: 1, g: 1, b: 1, a: 1}
|
||||||
|
m_RaycastTarget: 1
|
||||||
|
m_Maskable: 1
|
||||||
|
m_OnCullStateChanged:
|
||||||
|
m_PersistentCalls:
|
||||||
|
m_Calls: []
|
||||||
|
m_FontData:
|
||||||
|
m_Font: {fileID: 10102, guid: 0000000000000000e000000000000000, type: 0}
|
||||||
|
m_FontSize: 14
|
||||||
|
m_FontStyle: 0
|
||||||
|
m_BestFit: 0
|
||||||
|
m_MinSize: 10
|
||||||
|
m_MaxSize: 40
|
||||||
|
m_Alignment: 3
|
||||||
|
m_AlignByGeometry: 0
|
||||||
|
m_RichText: 1
|
||||||
|
m_HorizontalOverflow: 0
|
||||||
|
m_VerticalOverflow: 0
|
||||||
|
m_LineSpacing: 1
|
||||||
|
m_Text: New Text
|
7
Assets/Prefabs/Lobby/LobbyFriend.prefab.meta
Normal file
7
Assets/Prefabs/Lobby/LobbyFriend.prefab.meta
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
fileFormatVersion: 2
|
||||||
|
guid: 0568386c4d673bc4b86e9c4fb6d78b8d
|
||||||
|
PrefabImporter:
|
||||||
|
externalObjects: {}
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
2817
Assets/Scenes/Experimentation/MultiplayerScenes/LobbyTesting.unity
Normal file
2817
Assets/Scenes/Experimentation/MultiplayerScenes/LobbyTesting.unity
Normal file
File diff suppressed because it is too large
Load Diff
@ -1,5 +1,5 @@
|
|||||||
fileFormatVersion: 2
|
fileFormatVersion: 2
|
||||||
guid: 246f31a0e00fea74a93125fec6d80da8
|
guid: 02c544c4276ebff45aa3b14a7f9a24be
|
||||||
DefaultImporter:
|
DefaultImporter:
|
||||||
externalObjects: {}
|
externalObjects: {}
|
||||||
userData:
|
userData:
|
@ -0,0 +1,64 @@
|
|||||||
|
%YAML 1.1
|
||||||
|
%TAG !u! tag:unity3d.com,2011:
|
||||||
|
--- !u!850595691 &4890085278179872738
|
||||||
|
LightingSettings:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_Name: LobbyTestingSettings
|
||||||
|
serializedVersion: 4
|
||||||
|
m_GIWorkflowMode: 1
|
||||||
|
m_EnableBakedLightmaps: 1
|
||||||
|
m_EnableRealtimeLightmaps: 0
|
||||||
|
m_RealtimeEnvironmentLighting: 1
|
||||||
|
m_BounceScale: 1
|
||||||
|
m_AlbedoBoost: 1
|
||||||
|
m_IndirectOutputScale: 1
|
||||||
|
m_UsingShadowmask: 1
|
||||||
|
m_BakeBackend: 1
|
||||||
|
m_LightmapMaxSize: 1024
|
||||||
|
m_BakeResolution: 40
|
||||||
|
m_Padding: 2
|
||||||
|
m_LightmapCompression: 3
|
||||||
|
m_AO: 0
|
||||||
|
m_AOMaxDistance: 1
|
||||||
|
m_CompAOExponent: 1
|
||||||
|
m_CompAOExponentDirect: 0
|
||||||
|
m_ExtractAO: 0
|
||||||
|
m_MixedBakeMode: 2
|
||||||
|
m_LightmapsBakeMode: 1
|
||||||
|
m_FilterMode: 1
|
||||||
|
m_LightmapParameters: {fileID: 15204, guid: 0000000000000000f000000000000000, type: 0}
|
||||||
|
m_ExportTrainingData: 0
|
||||||
|
m_TrainingDataDestination: TrainingData
|
||||||
|
m_RealtimeResolution: 2
|
||||||
|
m_ForceWhiteAlbedo: 0
|
||||||
|
m_ForceUpdates: 0
|
||||||
|
m_FinalGather: 0
|
||||||
|
m_FinalGatherRayCount: 256
|
||||||
|
m_FinalGatherFiltering: 1
|
||||||
|
m_PVRCulling: 1
|
||||||
|
m_PVRSampling: 1
|
||||||
|
m_PVRDirectSampleCount: 32
|
||||||
|
m_PVRSampleCount: 500
|
||||||
|
m_PVREnvironmentSampleCount: 500
|
||||||
|
m_PVREnvironmentReferencePointCount: 2048
|
||||||
|
m_LightProbeSampleCountMultiplier: 4
|
||||||
|
m_PVRBounces: 2
|
||||||
|
m_PVRMinBounces: 2
|
||||||
|
m_PVREnvironmentMIS: 0
|
||||||
|
m_PVRFilteringMode: 2
|
||||||
|
m_PVRDenoiserTypeDirect: 0
|
||||||
|
m_PVRDenoiserTypeIndirect: 0
|
||||||
|
m_PVRDenoiserTypeAO: 0
|
||||||
|
m_PVRFilterTypeDirect: 0
|
||||||
|
m_PVRFilterTypeIndirect: 0
|
||||||
|
m_PVRFilterTypeAO: 0
|
||||||
|
m_PVRFilteringGaussRadiusDirect: 1
|
||||||
|
m_PVRFilteringGaussRadiusIndirect: 5
|
||||||
|
m_PVRFilteringGaussRadiusAO: 2
|
||||||
|
m_PVRFilteringAtrousPositionSigmaDirect: 0.5
|
||||||
|
m_PVRFilteringAtrousPositionSigmaIndirect: 2
|
||||||
|
m_PVRFilteringAtrousPositionSigmaAO: 1
|
||||||
|
m_PVRTiledBaking: 0
|
@ -0,0 +1,8 @@
|
|||||||
|
fileFormatVersion: 2
|
||||||
|
guid: bf4cb08b84523014ba7d58b84641dafa
|
||||||
|
NativeFormatImporter:
|
||||||
|
externalObjects: {}
|
||||||
|
mainObjectFileID: 4890085278179872738
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
@ -1,17 +1,23 @@
|
|||||||
using System.Collections;
|
|
||||||
using System.Collections.Generic;
|
|
||||||
using UnityEngine;
|
using UnityEngine;
|
||||||
|
|
||||||
public class CharacterControllerForce : MonoBehaviour
|
public class CharacterControllerForce : MonoBehaviour
|
||||||
{
|
{
|
||||||
float mass = 3f; // defines the character mass
|
|
||||||
Vector3 impact = Vector3.zero;
|
|
||||||
private CharacterController character;
|
private CharacterController character;
|
||||||
|
private Vector3 impact = Vector3.zero;
|
||||||
|
private readonly float mass = 3f; // defines the character mass
|
||||||
|
|
||||||
void Start()
|
private void Start()
|
||||||
{
|
{
|
||||||
|
character = gameObject.GetComponent<CharacterController>();
|
||||||
|
}
|
||||||
|
|
||||||
character = this.gameObject.GetComponent<CharacterController>();
|
private void Update()
|
||||||
|
{
|
||||||
|
// apply the impact force:
|
||||||
|
if (impact.magnitude > 0.2)
|
||||||
|
character.Move(impact * Time.deltaTime);
|
||||||
|
// consumes the impact energy each cycle:
|
||||||
|
impact = Vector3.Lerp(impact, Vector3.zero, 5 * Time.deltaTime);
|
||||||
}
|
}
|
||||||
|
|
||||||
// call this function to add an impact force:
|
// call this function to add an impact force:
|
||||||
@ -21,13 +27,4 @@ public class CharacterControllerForce : MonoBehaviour
|
|||||||
if (dir.y < 0) dir.y = -dir.y; // reflect down force on the ground
|
if (dir.y < 0) dir.y = -dir.y; // reflect down force on the ground
|
||||||
impact += dir.normalized * force / mass;
|
impact += dir.normalized * force / mass;
|
||||||
}
|
}
|
||||||
|
|
||||||
void Update()
|
|
||||||
{
|
|
||||||
// apply the impact force:
|
|
||||||
if (impact.magnitude > 0.2)
|
|
||||||
character.Move(impact * Time.deltaTime);
|
|
||||||
// consumes the impact energy each cycle:
|
|
||||||
impact = Vector3.Lerp(impact, Vector3.zero, 5 * Time.deltaTime);
|
|
||||||
}
|
|
||||||
}
|
}
|
@ -1,12 +1,18 @@
|
|||||||
using System.Collections;
|
|
||||||
using System.Collections.Generic;
|
|
||||||
using UnityEngine;
|
using UnityEngine;
|
||||||
|
|
||||||
public class DGemItem : MonoBehaviour
|
public class DGemItem : MonoBehaviour
|
||||||
{
|
{
|
||||||
[SerializeField]
|
[SerializeField] private float decSpeed = 5f;
|
||||||
private float decSpeed = 5f;
|
|
||||||
|
|
||||||
|
// Start is called before the first frame update
|
||||||
|
private void Start()
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
// Update is called once per frame
|
||||||
|
private void Update()
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
private void OnTriggerEnter(Collider collision)
|
private void OnTriggerEnter(Collider collision)
|
||||||
@ -14,20 +20,7 @@ public class DGemItem : MonoBehaviour
|
|||||||
if (collision.gameObject.CompareTag("Player"))
|
if (collision.gameObject.CompareTag("Player"))
|
||||||
{
|
{
|
||||||
collision.gameObject.GetComponent<PlayerMovementController>().SetSpeed(decSpeed);
|
collision.gameObject.GetComponent<PlayerMovementController>().SetSpeed(decSpeed);
|
||||||
Destroy(this.gameObject);
|
Destroy(gameObject);
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Start is called before the first frame update
|
|
||||||
void Start()
|
|
||||||
{
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
// Update is called once per frame
|
|
||||||
void Update()
|
|
||||||
{
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
}
|
@ -1,42 +1,33 @@
|
|||||||
using System.Collections;
|
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using UnityEngine;
|
using UnityEngine;
|
||||||
using UnityEngine.VFX;
|
using UnityEngine.VFX;
|
||||||
|
|
||||||
public class VectorFieldHandler : MonoBehaviour
|
public class VectorFieldHandler : MonoBehaviour
|
||||||
{
|
{
|
||||||
[SerializeField]
|
[SerializeField] private float avoidanceDist;
|
||||||
private float avoidanceDist;
|
|
||||||
[SerializeField]
|
[SerializeField] private List<Vector3> avoidances;
|
||||||
private List<Vector3> avoidances;
|
|
||||||
[SerializeField]
|
[SerializeField] private Vector3 size;
|
||||||
private Vector3 size;
|
|
||||||
|
[SerializeField] private VisualEffect effect;
|
||||||
|
|
||||||
private Texture3D vField;
|
private Texture3D vField;
|
||||||
[SerializeField]
|
|
||||||
private VisualEffect effect;
|
|
||||||
|
|
||||||
// Start is called before the first frame update
|
// Start is called before the first frame update
|
||||||
void Start()
|
private void Start()
|
||||||
{
|
{
|
||||||
vField = new Texture3D((int)size.x, (int)size.y, (int)size.z, TextureFormat.RFloat, 0);
|
vField = new Texture3D((int)size.x, (int)size.y, (int)size.z, TextureFormat.RFloat, 0);
|
||||||
for(int x = 0;x<size.x;x++)
|
for (var x = 0; x < size.x; x++)
|
||||||
{
|
for (var y = 0; y < size.y; y++)
|
||||||
for(int y = 0; y < size.y; y++)
|
for (var z = 0; z < size.z; z++)
|
||||||
{
|
|
||||||
for(int z = 0; z<size.z; z++)
|
|
||||||
{
|
|
||||||
vField.SetPixel(x, y, z, new Color(1, 0, 0, 0));
|
vField.SetPixel(x, y, z, new Color(1, 0, 0, 0));
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
//vField.SetPixel(0, 0, 0, new Color(1, 0, 0, 0));
|
//vField.SetPixel(0, 0, 0, new Color(1, 0, 0, 0));
|
||||||
effect.SetTexture("VectorField", vField);
|
effect.SetTexture("VectorField", vField);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Update is called once per frame
|
// Update is called once per frame
|
||||||
void Update()
|
private void Update()
|
||||||
{
|
{
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -1,37 +1,27 @@
|
|||||||
using System.Collections;
|
|
||||||
using System.Collections.Generic;
|
|
||||||
using UnityEngine;
|
using UnityEngine;
|
||||||
|
|
||||||
[ExecuteAlways]
|
[ExecuteAlways]
|
||||||
[RequireComponent(typeof(LineRenderer))]
|
[RequireComponent(typeof(LineRenderer))]
|
||||||
public class DynamicLine : MonoBehaviour
|
public class DynamicLine : MonoBehaviour
|
||||||
{
|
{
|
||||||
[SerializeField]
|
[SerializeField] private float length = 5f;
|
||||||
private float length = 5f;
|
|
||||||
[SerializeField]
|
|
||||||
private int count = 2;
|
|
||||||
|
|
||||||
private float pLength;
|
[SerializeField] private int count = 2;
|
||||||
private int pCount;
|
|
||||||
|
|
||||||
private LineRenderer lineRenderer;
|
private LineRenderer lineRenderer;
|
||||||
// Start is called before the first frame update
|
private int pCount;
|
||||||
void Start()
|
|
||||||
{
|
|
||||||
lineRenderer= GetComponent<LineRenderer>();
|
|
||||||
|
|
||||||
|
private float pLength;
|
||||||
|
|
||||||
|
// Start is called before the first frame update
|
||||||
|
private void Start()
|
||||||
|
{
|
||||||
|
lineRenderer = GetComponent<LineRenderer>();
|
||||||
}
|
}
|
||||||
|
|
||||||
// Update is called once per frame
|
// Update is called once per frame
|
||||||
void FixedUpdate()
|
private void FixedUpdate()
|
||||||
{
|
{
|
||||||
if (pLength != length||pCount!=count)
|
if (pLength != length || pCount != count) lineRenderer.positionCount = count;
|
||||||
{
|
|
||||||
lineRenderer.positionCount = count;
|
|
||||||
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -1,94 +1,74 @@
|
|||||||
using System.Collections;
|
using System.Collections;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using UnityEditor.Rendering;
|
|
||||||
using UnityEngine;
|
using UnityEngine;
|
||||||
using UnityEngine.Events;
|
|
||||||
|
|
||||||
public class SkinlessMonsterAnimator : MonoBehaviour
|
public class SkinlessMonsterAnimator : MonoBehaviour
|
||||||
{
|
{
|
||||||
[SerializeField]
|
[SerializeField] private Animator animator;
|
||||||
private Animator animator;
|
|
||||||
private float speed = 0f;
|
|
||||||
|
|
||||||
[SerializeField]
|
[SerializeField] [Tooltip("This is the object with the skin dissolve material")]
|
||||||
[Tooltip("This is the object with the skin dissolve material")]
|
|
||||||
private GameObject modelObject;
|
private GameObject modelObject;
|
||||||
[SerializeField]
|
|
||||||
private List<GameObject> objectsThatFallOnDeath= new List<GameObject>();
|
[SerializeField] private List<GameObject> objectsThatFallOnDeath = new();
|
||||||
|
|
||||||
|
[SerializeField] private float deathSpeed = 5f;
|
||||||
|
|
||||||
|
[SerializeField] private float fastDeathduration = 1f;
|
||||||
|
|
||||||
|
[SerializeField] private float deathDuration = 5f;
|
||||||
|
|
||||||
|
private float curDeathSpeed = 5f;
|
||||||
|
|
||||||
private Material dissolveMaterial;
|
private Material dissolveMaterial;
|
||||||
private bool isAlive = true;
|
private bool isAlive = true;
|
||||||
[SerializeField]
|
|
||||||
private float deathSpeed = 5f;
|
|
||||||
private float curDeathSpeed = 5f;
|
|
||||||
|
|
||||||
private bool isRunning = false;
|
|
||||||
public bool IsRunning { get { return isRunning; } }
|
|
||||||
[SerializeField]
|
|
||||||
private float fastDeathduration = 1f;
|
|
||||||
[SerializeField]
|
|
||||||
private float deathDuration = 5f;
|
|
||||||
|
|
||||||
|
private float speed;
|
||||||
|
public bool IsRunning { get; private set; }
|
||||||
|
|
||||||
|
|
||||||
// Start is called before the first frame update
|
// Start is called before the first frame update
|
||||||
void Start()
|
private void Start()
|
||||||
{
|
{
|
||||||
dissolveMaterial = modelObject.GetComponent<SkinnedMeshRenderer>().materials[0];
|
dissolveMaterial = modelObject.GetComponent<SkinnedMeshRenderer>().materials[0];
|
||||||
curDeathSpeed = deathSpeed;
|
curDeathSpeed = deathSpeed;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Update is called once per frame
|
// Update is called once per frame
|
||||||
void Update()
|
private void Update()
|
||||||
{
|
{
|
||||||
|
|
||||||
if (isAlive)
|
if (isAlive)
|
||||||
{
|
{
|
||||||
animator.SetFloat("Speed", speed);
|
animator.SetFloat("Speed", speed);
|
||||||
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
var quantity = dissolveMaterial.GetFloat("_DissolveQuantity");
|
||||||
float quantity = dissolveMaterial.GetFloat("_DissolveQuantity");
|
quantity = Mathf.Lerp(quantity, -2, Time.deltaTime * curDeathSpeed);
|
||||||
quantity = Mathf.Lerp(quantity, -2, Time.deltaTime *curDeathSpeed);
|
|
||||||
dissolveMaterial.SetFloat("_DissolveQuantity", quantity);
|
dissolveMaterial.SetFloat("_DissolveQuantity", quantity);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public void StartMoving()
|
public void StartMoving()
|
||||||
{
|
{
|
||||||
if (isAlive)
|
if (isAlive)
|
||||||
{
|
{
|
||||||
isRunning = true;
|
IsRunning = true;
|
||||||
speed = 1;
|
speed = 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public void StopMoving()
|
public void StopMoving()
|
||||||
{
|
{
|
||||||
if (isAlive)
|
if (isAlive)
|
||||||
{
|
{
|
||||||
speed = 0;
|
speed = 0;
|
||||||
isRunning = false;
|
IsRunning = false;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
|
||||||
public void Attack()
|
public void Attack()
|
||||||
{
|
{
|
||||||
if (isAlive)
|
if (isAlive) animator.SetTrigger("Attack");
|
||||||
{
|
|
||||||
animator.SetTrigger("Attack");
|
|
||||||
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -98,23 +78,24 @@ public class SkinlessMonsterAnimator : MonoBehaviour
|
|||||||
/// <param name="attackType"></param>
|
/// <param name="attackType"></param>
|
||||||
public void SetAttackType(int attackType)
|
public void SetAttackType(int attackType)
|
||||||
{
|
{
|
||||||
|
|
||||||
animator.SetInteger("AttackIndex", attackType);
|
animator.SetInteger("AttackIndex", attackType);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void InLight()
|
public void InLight()
|
||||||
{
|
{
|
||||||
if(isAlive)
|
if (isAlive)
|
||||||
animator.SetBool("InLight", true);
|
animator.SetBool("InLight", true);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void NotInLight()
|
public void NotInLight()
|
||||||
{
|
{
|
||||||
if(isAlive)
|
if (isAlive)
|
||||||
animator.SetBool("InLight", false);
|
animator.SetBool("InLight", false);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void AttackScream()
|
public void AttackScream()
|
||||||
{
|
{
|
||||||
if(isAlive)
|
if (isAlive)
|
||||||
animator.SetTrigger("AttackScream");
|
animator.SetTrigger("AttackScream");
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -125,20 +106,19 @@ public class SkinlessMonsterAnimator : MonoBehaviour
|
|||||||
|
|
||||||
|
|
||||||
isAlive = false;
|
isAlive = false;
|
||||||
foreach(GameObject obj in this.objectsThatFallOnDeath)
|
foreach (var obj in objectsThatFallOnDeath)
|
||||||
{
|
{
|
||||||
obj.AddComponent<Rigidbody>();
|
obj.AddComponent<Rigidbody>();
|
||||||
if (obj.GetComponent<Collider>() != null)
|
if (obj.GetComponent<Collider>() != null) obj.GetComponent<Collider>().enabled = false;
|
||||||
{
|
|
||||||
obj.GetComponent<Collider>().enabled = false;
|
|
||||||
}
|
}
|
||||||
}
|
|
||||||
float dur = this.deathDuration;
|
var dur = deathDuration;
|
||||||
if (fast)
|
if (fast)
|
||||||
{
|
{
|
||||||
dur = this.fastDeathduration;
|
dur = fastDeathduration;
|
||||||
curDeathSpeed = deathSpeed * (this.deathDuration / this.fastDeathduration);
|
curDeathSpeed = deathSpeed * (deathDuration / fastDeathduration);
|
||||||
}
|
}
|
||||||
|
|
||||||
StartCoroutine(destroyAfterSeconds(dur));
|
StartCoroutine(destroyAfterSeconds(dur));
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -146,7 +126,6 @@ public class SkinlessMonsterAnimator : MonoBehaviour
|
|||||||
private IEnumerator destroyAfterSeconds(float duration)
|
private IEnumerator destroyAfterSeconds(float duration)
|
||||||
{
|
{
|
||||||
yield return new WaitForSeconds(duration);
|
yield return new WaitForSeconds(duration);
|
||||||
Destroy(this.gameObject);
|
Destroy(gameObject);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
@ -1,321 +1,79 @@
|
|||||||
using System.Collections;
|
|
||||||
using System.Collections.Generic;
|
|
||||||
using UnityEngine;
|
using UnityEngine;
|
||||||
using UnityEngine.AI;
|
using UnityEngine.AI;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
public class SkinlessMonsterComponent : MonoBehaviour
|
public class SkinlessMonsterComponent : MonoBehaviour
|
||||||
{
|
{
|
||||||
[SerializeField]
|
[SerializeField] private NavMeshAgent agent;
|
||||||
private NavMeshAgent agent;
|
|
||||||
[SerializeField]
|
|
||||||
private SkinlessMonsterAnimator animator;
|
|
||||||
private bool inDamageRange = false;
|
|
||||||
private bool inDamageMargin = false;
|
|
||||||
private bool atTarget = false;
|
|
||||||
[SerializeField]
|
|
||||||
private float atTargetDistance = 2;
|
|
||||||
private TargetInformation target;
|
|
||||||
|
|
||||||
[SerializeField]
|
[SerializeField] private SkinlessMonsterAnimator animator;
|
||||||
private float health = 2f;
|
|
||||||
|
[SerializeField] private float atTargetDistance = 2;
|
||||||
|
|
||||||
|
[SerializeField] private float health = 2f;
|
||||||
|
|
||||||
|
[SerializeField] [Tooltip("This is the angle of visibility the enemy has")]
|
||||||
|
private float visibilityConeLimit = 90f;
|
||||||
|
|
||||||
|
[SerializeField] private float bulletSoundRange = 15f;
|
||||||
|
|
||||||
|
[SerializeField] private float newTargetCooldown = 5f;
|
||||||
|
//private bool prePauseStoppedState = false;
|
||||||
|
|
||||||
|
[SerializeField] private BoxCollider leftHandDamage;
|
||||||
|
|
||||||
|
[SerializeField] private BoxCollider rightHandDamage;
|
||||||
|
|
||||||
|
private bool atTarget;
|
||||||
|
private float distanceToPlayer;
|
||||||
|
private FlareRegister flareRegister;
|
||||||
|
private bool inDamageMargin;
|
||||||
|
private bool inDamageRange;
|
||||||
|
|
||||||
|
|
||||||
private bool isAlive = true;
|
private bool isAlive = true;
|
||||||
|
|
||||||
|
private InGameManager manager;
|
||||||
|
|
||||||
|
|
||||||
private Vector3 oppositeVector;
|
private Vector3 oppositeVector;
|
||||||
|
|
||||||
private PlayerComponent player;
|
private PlayerComponent player;
|
||||||
private float distanceToPlayer;
|
private TargetInformation target;
|
||||||
private FlareRegister flareRegister;
|
|
||||||
[SerializeField]
|
|
||||||
[Tooltip("This is the angle of visibility the enemy has")]
|
|
||||||
private float visibilityConeLimit = 90f;
|
|
||||||
[SerializeField]
|
|
||||||
private float bulletSoundRange = 15f;
|
|
||||||
|
|
||||||
private GameObject targetObject;
|
private GameObject targetObject;
|
||||||
[SerializeField]
|
private float timeSinceTarget;
|
||||||
private float newTargetCooldown = 5f;
|
|
||||||
private float timeSinceTarget = 0f;
|
|
||||||
|
|
||||||
private InGameManager manager;
|
|
||||||
//private bool prePauseStoppedState = false;
|
|
||||||
|
|
||||||
[SerializeField]
|
|
||||||
private BoxCollider leftHandDamage;
|
|
||||||
[SerializeField]
|
|
||||||
private BoxCollider rightHandDamage;
|
|
||||||
|
|
||||||
private void Awake()
|
private void Awake()
|
||||||
{
|
{
|
||||||
//Find active player rn.
|
//Find active player rn.
|
||||||
PlayerComponent[] players = GameObject.FindObjectsOfType<PlayerComponent>();
|
var players = FindObjectsOfType<PlayerComponent>();
|
||||||
foreach (PlayerComponent p in players)
|
foreach (var p in players)
|
||||||
{
|
|
||||||
if (p.isActiveAndEnabled)
|
if (p.isActiveAndEnabled)
|
||||||
{
|
|
||||||
player = p;
|
player = p;
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
manager = GameObject.FindObjectOfType<InGameManager>();
|
manager = FindObjectOfType<InGameManager>();
|
||||||
}
|
}
|
||||||
|
|
||||||
private void Start()
|
private void Start()
|
||||||
{
|
{
|
||||||
flareRegister = GameObject.FindObjectOfType<FlareRegister>();
|
flareRegister = FindObjectOfType<FlareRegister>();
|
||||||
if (targetObject == null)
|
if (targetObject == null)
|
||||||
targetObject = new GameObject();
|
targetObject = new GameObject();
|
||||||
targetObject.name = "Enemy Target";
|
targetObject.name = "Enemy Target";
|
||||||
|
|
||||||
if(player == null)
|
if (player == null) player = FindObjectOfType<PlayerComponent>();
|
||||||
{
|
|
||||||
player = GameObject.FindObjectOfType<PlayerComponent>();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
void HandleTargetOperations()
|
|
||||||
{
|
|
||||||
//Update booleans for movement
|
|
||||||
float distToTarget = Vector3.Distance(target.target.transform.position, agent.transform.position);
|
|
||||||
atTarget = atTargetDistance >= distToTarget;
|
|
||||||
if (target.hasDamageRange)
|
|
||||||
{
|
|
||||||
inDamageRange = target.damageRange <= distToTarget;
|
|
||||||
inDamageMargin = target.damageMargin + target.damageRange <= distToTarget;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
inDamageRange = false;
|
|
||||||
inDamageMargin = false;
|
|
||||||
}
|
|
||||||
//Perform actions.
|
|
||||||
if (target.runTowards)
|
|
||||||
{
|
|
||||||
if (inDamageRange)
|
|
||||||
{
|
|
||||||
//Damage is being dealt
|
|
||||||
animator.InLight();
|
|
||||||
//Deal Damage
|
|
||||||
health -= Time.deltaTime;
|
|
||||||
if (health < 0 && this.isAlive)
|
|
||||||
{
|
|
||||||
this.Kill();
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
else if (inDamageMargin)
|
|
||||||
{
|
|
||||||
//Effective stop
|
|
||||||
agent.SetDestination(transform.position);
|
|
||||||
animator.StopMoving();
|
|
||||||
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
if (atTarget)
|
|
||||||
{
|
|
||||||
//Effective stop
|
|
||||||
agent.SetDestination(transform.position);
|
|
||||||
animator.StopMoving();
|
|
||||||
if (target.isHostile)
|
|
||||||
{
|
|
||||||
|
|
||||||
animator.Attack();
|
|
||||||
animator.SetAttackType(Random.Range(0, 0));
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
agent.SetDestination(target.target.transform.position);
|
|
||||||
animator.StartMoving();
|
|
||||||
animator.NotInLight();
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
//Run away logic
|
|
||||||
if (atTarget || distToTarget < 3)
|
|
||||||
{
|
|
||||||
animator.StopMoving();
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
Ray r = new Ray();
|
|
||||||
r.origin = transform.position;
|
|
||||||
r.direction = oppositeVector;
|
|
||||||
RaycastHit hit;
|
|
||||||
if (Physics.Raycast(r, out hit))
|
|
||||||
{
|
|
||||||
|
|
||||||
animator.StartMoving();
|
|
||||||
agent.SetDestination(hit.point);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
|
|
||||||
agent.SetDestination(transform.position + oppositeVector * 100);
|
|
||||||
agent.isStopped = false;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
if (atTarget&&target.isHostile)
|
|
||||||
{
|
|
||||||
SlowLookAt(target.target.transform.position-transform.position);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
void SlowLookAt(Vector3 targetVector,float animatedRotationSpeed=1f)
|
|
||||||
{
|
|
||||||
Vector3 relativePos = targetVector;
|
|
||||||
Quaternion toRotation = Quaternion.LookRotation(relativePos);
|
|
||||||
|
|
||||||
transform.rotation = Quaternion.Lerp(transform.rotation, toRotation, animatedRotationSpeed * Time.deltaTime);
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
void CheckForAOERanges()
|
|
||||||
{
|
|
||||||
foreach(BulletComponent bullet in flareRegister.bullets)
|
|
||||||
{
|
|
||||||
float dist = Vector3.Distance(bullet.transform.position, transform.position);
|
|
||||||
if (dist <= bullet.DamageRange)
|
|
||||||
{
|
|
||||||
this.health = 0;
|
|
||||||
this.Kill(true);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
foreach(FlareBeacon beacon in flareRegister.beacons)
|
|
||||||
{
|
|
||||||
float dist = Vector3.Distance(beacon.transform.position, transform.position);
|
|
||||||
if (dist <= beacon.Range)
|
|
||||||
{
|
|
||||||
this.health = 0f;
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if (this.health <= 0)
|
|
||||||
{
|
|
||||||
this.Kill();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public bool isPlayerVisible(bool withAngle)
|
|
||||||
{
|
|
||||||
Ray r = new Ray();
|
|
||||||
r.origin = transform.position;
|
|
||||||
r.direction = player.transform.position - transform.position;
|
|
||||||
Vector3 toPosition = (player.transform.position - transform.position).normalized;
|
|
||||||
float angleToPosition = Vector3.Angle(transform.forward, toPosition);
|
|
||||||
|
|
||||||
|
|
||||||
RaycastHit hit;
|
|
||||||
if(Physics.Raycast(r, out hit))
|
|
||||||
{
|
|
||||||
|
|
||||||
GameObject hitObject = hit.transform.gameObject;
|
|
||||||
|
|
||||||
if (hitObject.GetComponent<PlayerComponent>() != null)
|
|
||||||
{
|
|
||||||
//hit player
|
|
||||||
return angleToPosition <= this.visibilityConeLimit||!withAngle;
|
|
||||||
|
|
||||||
}else if (hitObject.GetComponentInParent<PlayerComponent>() != null)
|
|
||||||
{
|
|
||||||
//also hit player
|
|
||||||
return angleToPosition <= this.visibilityConeLimit||!withAngle;
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
void SetLiveTargeting()
|
|
||||||
{
|
|
||||||
if (!isAlive)
|
|
||||||
{
|
|
||||||
//this.targetObject.transform.position = transform.position;
|
|
||||||
this.Stop();
|
|
||||||
}
|
|
||||||
|
|
||||||
distanceToPlayer = Vector3.Distance(this.transform.position, player.transform.position);
|
|
||||||
//print("Dist Comparison "+distanceToPlayer.ToString()+" Noise:"+player.NoiseManager.NoiseDistance);
|
|
||||||
bool isPlayerVisible = this.isPlayerVisible(true);
|
|
||||||
//check if player is heard or player line of sight
|
|
||||||
if (distanceToPlayer <= player.NoiseManager.NoiseDistance||isPlayerVisible)
|
|
||||||
{
|
|
||||||
//check that nothing in between
|
|
||||||
if (this.isPlayerVisible(false))
|
|
||||||
{
|
|
||||||
this.Target(player.gameObject, true);
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
if (this.timeSinceTarget < this.newTargetCooldown)
|
|
||||||
{
|
|
||||||
//no further targeting
|
|
||||||
//Stop();
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
BulletComponent closestBullet = null;
|
|
||||||
float closestDistance = Mathf.Infinity;
|
|
||||||
foreach(BulletComponent bullet in this.flareRegister.bullets)
|
|
||||||
{
|
|
||||||
float bDist = Vector3.Distance(bullet.transform.position, transform.position);
|
|
||||||
if (closestBullet==null||(bDist< bulletSoundRange&&bDist<closestDistance))
|
|
||||||
{
|
|
||||||
closestBullet = bullet;
|
|
||||||
closestDistance = bDist;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if (closestBullet != null&&closestBullet.DamageRange==0)
|
|
||||||
{
|
|
||||||
|
|
||||||
targetObject.transform.position= closestBullet.transform.position;
|
|
||||||
this.Target(targetObject,false);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
|
|
||||||
targetObject.transform.position = transform.position;
|
|
||||||
this.Target(targetObject,false);
|
|
||||||
this.Stop();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private void Update()
|
private void Update()
|
||||||
{
|
{
|
||||||
if (!player.IsAlive)
|
if (!player.IsAlive) Stop();
|
||||||
{
|
|
||||||
Stop();
|
|
||||||
}
|
|
||||||
|
|
||||||
if (target != null)
|
if (target != null) HandleTargetOperations();
|
||||||
{
|
|
||||||
HandleTargetOperations();
|
|
||||||
}
|
|
||||||
CheckForAOERanges();
|
CheckForAOERanges();
|
||||||
if(isAlive&&player.IsAlive)
|
if (isAlive && player.IsAlive)
|
||||||
SetLiveTargeting();
|
SetLiveTargeting();
|
||||||
timeSinceTarget += Time.deltaTime;
|
timeSinceTarget += Time.deltaTime;
|
||||||
if (this.isAlive)
|
if (isAlive)
|
||||||
{
|
{
|
||||||
leftHandDamage.enabled = true;
|
leftHandDamage.enabled = true;
|
||||||
rightHandDamage.enabled = true;
|
rightHandDamage.enabled = true;
|
||||||
@ -345,6 +103,197 @@ public class SkinlessMonsterComponent : MonoBehaviour
|
|||||||
- stop() and wait for player to leave AOE (enforced by navigation).
|
- stop() and wait for player to leave AOE (enforced by navigation).
|
||||||
*/
|
*/
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void OnTriggerEnter(Collider other)
|
||||||
|
{
|
||||||
|
if (other.gameObject.GetComponent<BulletComponent>() != null)
|
||||||
|
health -= other.gameObject.GetComponent<BulletComponent>().DamageMagnitude;
|
||||||
|
}
|
||||||
|
|
||||||
|
private void HandleTargetOperations()
|
||||||
|
{
|
||||||
|
//Update booleans for movement
|
||||||
|
var distToTarget = Vector3.Distance(target.target.transform.position, agent.transform.position);
|
||||||
|
atTarget = atTargetDistance >= distToTarget;
|
||||||
|
if (target.hasDamageRange)
|
||||||
|
{
|
||||||
|
inDamageRange = target.damageRange <= distToTarget;
|
||||||
|
inDamageMargin = target.damageMargin + target.damageRange <= distToTarget;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
inDamageRange = false;
|
||||||
|
inDamageMargin = false;
|
||||||
|
}
|
||||||
|
|
||||||
|
//Perform actions.
|
||||||
|
if (target.runTowards)
|
||||||
|
{
|
||||||
|
if (inDamageRange)
|
||||||
|
{
|
||||||
|
//Damage is being dealt
|
||||||
|
animator.InLight();
|
||||||
|
//Deal Damage
|
||||||
|
health -= Time.deltaTime;
|
||||||
|
if (health < 0 && isAlive) Kill();
|
||||||
|
}
|
||||||
|
else if (inDamageMargin)
|
||||||
|
{
|
||||||
|
//Effective stop
|
||||||
|
agent.SetDestination(transform.position);
|
||||||
|
animator.StopMoving();
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
if (atTarget)
|
||||||
|
{
|
||||||
|
//Effective stop
|
||||||
|
agent.SetDestination(transform.position);
|
||||||
|
animator.StopMoving();
|
||||||
|
if (target.isHostile)
|
||||||
|
{
|
||||||
|
animator.Attack();
|
||||||
|
animator.SetAttackType(Random.Range(0, 0));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
agent.SetDestination(target.target.transform.position);
|
||||||
|
animator.StartMoving();
|
||||||
|
animator.NotInLight();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
//Run away logic
|
||||||
|
if (atTarget || distToTarget < 3)
|
||||||
|
{
|
||||||
|
animator.StopMoving();
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
var r = new Ray();
|
||||||
|
r.origin = transform.position;
|
||||||
|
r.direction = oppositeVector;
|
||||||
|
RaycastHit hit;
|
||||||
|
if (Physics.Raycast(r, out hit))
|
||||||
|
{
|
||||||
|
animator.StartMoving();
|
||||||
|
agent.SetDestination(hit.point);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
agent.SetDestination(transform.position + oppositeVector * 100);
|
||||||
|
agent.isStopped = false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (atTarget && target.isHostile) SlowLookAt(target.target.transform.position - transform.position);
|
||||||
|
}
|
||||||
|
|
||||||
|
private void SlowLookAt(Vector3 targetVector, float animatedRotationSpeed = 1f)
|
||||||
|
{
|
||||||
|
var relativePos = targetVector;
|
||||||
|
var toRotation = Quaternion.LookRotation(relativePos);
|
||||||
|
|
||||||
|
transform.rotation = Quaternion.Lerp(transform.rotation, toRotation, animatedRotationSpeed * Time.deltaTime);
|
||||||
|
}
|
||||||
|
|
||||||
|
private void CheckForAOERanges()
|
||||||
|
{
|
||||||
|
foreach (var bullet in flareRegister.bullets)
|
||||||
|
{
|
||||||
|
var dist = Vector3.Distance(bullet.transform.position, transform.position);
|
||||||
|
if (dist <= bullet.DamageRange)
|
||||||
|
{
|
||||||
|
health = 0;
|
||||||
|
Kill(true);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
foreach (var beacon in flareRegister.beacons)
|
||||||
|
{
|
||||||
|
var dist = Vector3.Distance(beacon.transform.position, transform.position);
|
||||||
|
if (dist <= beacon.Range) health = 0f;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (health <= 0) Kill();
|
||||||
|
}
|
||||||
|
|
||||||
|
public bool isPlayerVisible(bool withAngle)
|
||||||
|
{
|
||||||
|
var r = new Ray();
|
||||||
|
r.origin = transform.position;
|
||||||
|
r.direction = player.transform.position - transform.position;
|
||||||
|
var toPosition = (player.transform.position - transform.position).normalized;
|
||||||
|
var angleToPosition = Vector3.Angle(transform.forward, toPosition);
|
||||||
|
|
||||||
|
|
||||||
|
RaycastHit hit;
|
||||||
|
if (Physics.Raycast(r, out hit))
|
||||||
|
{
|
||||||
|
var hitObject = hit.transform.gameObject;
|
||||||
|
|
||||||
|
if (hitObject.GetComponent<PlayerComponent>() != null)
|
||||||
|
//hit player
|
||||||
|
return angleToPosition <= visibilityConeLimit || !withAngle;
|
||||||
|
if (hitObject.GetComponentInParent<PlayerComponent>() != null)
|
||||||
|
//also hit player
|
||||||
|
return angleToPosition <= visibilityConeLimit || !withAngle;
|
||||||
|
}
|
||||||
|
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
private void SetLiveTargeting()
|
||||||
|
{
|
||||||
|
if (!isAlive)
|
||||||
|
//this.targetObject.transform.position = transform.position;
|
||||||
|
Stop();
|
||||||
|
|
||||||
|
distanceToPlayer = Vector3.Distance(transform.position, player.transform.position);
|
||||||
|
//print("Dist Comparison "+distanceToPlayer.ToString()+" Noise:"+player.NoiseManager.NoiseDistance);
|
||||||
|
var isPlayerVisible = this.isPlayerVisible(true);
|
||||||
|
//check if player is heard or player line of sight
|
||||||
|
if (distanceToPlayer <= player.NoiseManager.NoiseDistance || isPlayerVisible)
|
||||||
|
{
|
||||||
|
//check that nothing in between
|
||||||
|
if (this.isPlayerVisible(false)) Target(player.gameObject, true);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
if (timeSinceTarget < newTargetCooldown)
|
||||||
|
//no further targeting
|
||||||
|
//Stop();
|
||||||
|
return;
|
||||||
|
|
||||||
|
BulletComponent closestBullet = null;
|
||||||
|
var closestDistance = Mathf.Infinity;
|
||||||
|
foreach (var bullet in flareRegister.bullets)
|
||||||
|
{
|
||||||
|
var bDist = Vector3.Distance(bullet.transform.position, transform.position);
|
||||||
|
if (closestBullet == null || (bDist < bulletSoundRange && bDist < closestDistance))
|
||||||
|
{
|
||||||
|
closestBullet = bullet;
|
||||||
|
closestDistance = bDist;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (closestBullet != null && closestBullet.DamageRange == 0)
|
||||||
|
{
|
||||||
|
targetObject.transform.position = closestBullet.transform.position;
|
||||||
|
Target(targetObject);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
targetObject.transform.position = transform.position;
|
||||||
|
Target(targetObject);
|
||||||
|
Stop();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
/*
|
/*
|
||||||
STANDARD BEHAVIOR:
|
STANDARD BEHAVIOR:
|
||||||
- OnSeeing/Hearing Player:
|
- OnSeeing/Hearing Player:
|
||||||
@ -360,9 +309,9 @@ public class SkinlessMonsterComponent : MonoBehaviour
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
//Runs towards target. If its meant to be hostile, it will melee attack once in range.
|
//Runs towards target. If its meant to be hostile, it will melee attack once in range.
|
||||||
public void Target(GameObject obj,bool hostile=false)
|
public void Target(GameObject obj, bool hostile = false)
|
||||||
{
|
{
|
||||||
if(target == null || target.target!= obj)
|
if (target == null || target.target != obj)
|
||||||
{
|
{
|
||||||
//target = new TargetInformation(obj,hostile,false,runTowards:true);
|
//target = new TargetInformation(obj,hostile,false,runTowards:true);
|
||||||
target = new TargetInformation();
|
target = new TargetInformation();
|
||||||
@ -371,13 +320,13 @@ public class SkinlessMonsterComponent : MonoBehaviour
|
|||||||
target.hasDamageRange = false;
|
target.hasDamageRange = false;
|
||||||
target.runTowards = true;
|
target.runTowards = true;
|
||||||
timeSinceTarget = 0;
|
timeSinceTarget = 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
}
|
|
||||||
}
|
|
||||||
//Runs towards flare such that it stops randomly within margin before range.
|
//Runs towards flare such that it stops randomly within margin before range.
|
||||||
public void TargetFlare(GameObject obj,float range,float margin)
|
public void TargetFlare(GameObject obj, float range, float margin)
|
||||||
{
|
{
|
||||||
if(target == null || target.target != obj)
|
if (target == null || target.target != obj)
|
||||||
{
|
{
|
||||||
//target = new TargetInformation(obj, false, true, range, margin,runTowards:true);
|
//target = new TargetInformation(obj, false, true, range, margin,runTowards:true);
|
||||||
target = new TargetInformation();
|
target = new TargetInformation();
|
||||||
@ -390,6 +339,7 @@ public class SkinlessMonsterComponent : MonoBehaviour
|
|||||||
timeSinceTarget = 0;
|
timeSinceTarget = 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Runs away from object. A minimum range is specified where it no longer takes damage, and a minimum margin is
|
/// Runs away from object. A minimum range is specified where it no longer takes damage, and a minimum margin is
|
||||||
/// speicifed where it can stop running.
|
/// speicifed where it can stop running.
|
||||||
@ -397,8 +347,9 @@ public class SkinlessMonsterComponent : MonoBehaviour
|
|||||||
/// <param name="obj"></param>
|
/// <param name="obj"></param>
|
||||||
/// <param name="minRange"></param>
|
/// <param name="minRange"></param>
|
||||||
/// <param name="minMargin"></param>
|
/// <param name="minMargin"></param>
|
||||||
public void RunAwayFrom(GameObject obj,float minRange,float minMargin) {
|
public void RunAwayFrom(GameObject obj, float minRange, float minMargin)
|
||||||
if(target== null ||target.target != obj)
|
{
|
||||||
|
if (target == null || target.target != obj)
|
||||||
{
|
{
|
||||||
//target = new TargetInformation(obj, false, true, minRange, minMargin, false);
|
//target = new TargetInformation(obj, false, true, minRange, minMargin, false);
|
||||||
target = new TargetInformation();
|
target = new TargetInformation();
|
||||||
@ -416,44 +367,30 @@ public class SkinlessMonsterComponent : MonoBehaviour
|
|||||||
public void Stop()
|
public void Stop()
|
||||||
{
|
{
|
||||||
target = new TargetInformation();
|
target = new TargetInformation();
|
||||||
target.target = this.gameObject;
|
target.target = gameObject;
|
||||||
target.isHostile = false;
|
target.isHostile = false;
|
||||||
target.hasDamageRange = false;
|
target.hasDamageRange = false;
|
||||||
target.runTowards = true;
|
target.runTowards = true;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public void Kill(bool fast=false)
|
public void Kill(bool fast = false)
|
||||||
{
|
{
|
||||||
if (this.isAlive)
|
if (isAlive)
|
||||||
{
|
{
|
||||||
this.animator.Kill(fast);
|
animator.Kill(fast);
|
||||||
this.isAlive = false;
|
isAlive = false;
|
||||||
agent.isStopped = true;
|
agent.isStopped = true;
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
private void OnTriggerEnter(Collider other)
|
|
||||||
{
|
|
||||||
if (other.gameObject.GetComponent<BulletComponent>() != null)
|
|
||||||
{
|
|
||||||
|
|
||||||
this.health -= other.gameObject.GetComponent<BulletComponent>().DamageMagnitude;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
class TargetInformation
|
|
||||||
{
|
|
||||||
|
|
||||||
public GameObject target;
|
internal class TargetInformation
|
||||||
public bool isHostile;
|
{
|
||||||
public bool hasDamageRange;
|
|
||||||
public float damageRange;
|
|
||||||
public float damageMargin;
|
public float damageMargin;
|
||||||
|
public float damageRange;
|
||||||
|
public bool hasDamageRange;
|
||||||
|
public bool isHostile;
|
||||||
public bool runTowards;
|
public bool runTowards;
|
||||||
|
|
||||||
|
public GameObject target;
|
||||||
}
|
}
|
@ -1,38 +1,22 @@
|
|||||||
using System.Collections;
|
|
||||||
using System.Collections.Generic;
|
|
||||||
using UnityEngine;
|
using UnityEngine;
|
||||||
|
|
||||||
public class TestSkinnlessMonster : MonoBehaviour
|
public class TestSkinnlessMonster : MonoBehaviour
|
||||||
{
|
{
|
||||||
[SerializeField]
|
[SerializeField] private SkinlessMonsterComponent monster;
|
||||||
private SkinlessMonsterComponent monster;
|
|
||||||
[SerializeField]
|
|
||||||
private Camera cam;
|
|
||||||
// Start is called before the first frame update
|
|
||||||
void Start()
|
|
||||||
{
|
|
||||||
|
|
||||||
|
[SerializeField] private Camera cam;
|
||||||
|
|
||||||
|
// Start is called before the first frame update
|
||||||
|
private void Start()
|
||||||
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
// Update is called once per frame
|
// Update is called once per frame
|
||||||
void Update()
|
private void Update()
|
||||||
{
|
{
|
||||||
if (Input.GetKeyDown(KeyCode.Alpha1))
|
if (Input.GetKeyDown(KeyCode.Alpha1)) monster.Target(cam.gameObject, true);
|
||||||
{
|
if (Input.GetKeyDown(KeyCode.Alpha2)) monster.TargetFlare(cam.gameObject, 1, 1);
|
||||||
monster.Target(cam.gameObject, true);
|
if (Input.GetKeyDown(KeyCode.Alpha3)) monster.RunAwayFrom(cam.gameObject, 1, 1);
|
||||||
}
|
if (Input.GetKeyDown(KeyCode.Alpha0)) monster.Stop();
|
||||||
if (Input.GetKeyDown(KeyCode.Alpha2))
|
|
||||||
{
|
|
||||||
monster.TargetFlare(cam.gameObject, 1, 1);
|
|
||||||
}
|
|
||||||
if (Input.GetKeyDown(KeyCode.Alpha3))
|
|
||||||
{
|
|
||||||
|
|
||||||
monster.RunAwayFrom(cam.gameObject, 1, 1);
|
|
||||||
}
|
|
||||||
if (Input.GetKeyDown(KeyCode.Alpha0))
|
|
||||||
{
|
|
||||||
monster.Stop();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -1,27 +1,22 @@
|
|||||||
using System.Collections;
|
|
||||||
using System.Collections.Generic;
|
|
||||||
using UnityEngine;
|
using UnityEngine;
|
||||||
|
|
||||||
public class DummyComponent : MonoBehaviour
|
public class DummyComponent : MonoBehaviour
|
||||||
{
|
{
|
||||||
private Animator anim;
|
private Animator anim;
|
||||||
|
|
||||||
// Start is called before the first frame update
|
// Start is called before the first frame update
|
||||||
void Start()
|
private void Start()
|
||||||
{
|
{
|
||||||
anim = this.GetComponentInParent<Animator>();
|
anim = GetComponentInParent<Animator>();
|
||||||
}
|
}
|
||||||
|
|
||||||
// Update is called once per frame
|
// Update is called once per frame
|
||||||
void Update()
|
private void Update()
|
||||||
{
|
{
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private void OnCollisionEnter(Collision collision)
|
private void OnCollisionEnter(Collision collision)
|
||||||
{
|
{
|
||||||
if(collision.gameObject.GetComponent<BulletComponent>() != null)
|
if (collision.gameObject.GetComponent<BulletComponent>() != null) anim.Play("DummyFall");
|
||||||
{
|
|
||||||
anim.Play("DummyFall");
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -1,26 +1,22 @@
|
|||||||
using System.Collections;
|
|
||||||
using System.Collections.Generic;
|
|
||||||
using UnityEngine;
|
using UnityEngine;
|
||||||
|
|
||||||
public class MonsterComponent : MonoBehaviour
|
public class MonsterComponent : MonoBehaviour
|
||||||
{
|
{
|
||||||
|
[SerializeField] private float attackDamage = 1f;
|
||||||
|
|
||||||
[SerializeField]
|
[SerializeField] private bool shakeCameraOnHit = true;
|
||||||
private float attackDamage = 1f;
|
|
||||||
public float AttackDamage { get { return this.attackDamage; } }
|
public float AttackDamage => attackDamage;
|
||||||
|
|
||||||
|
public bool ShakeCameraOnHit => shakeCameraOnHit;
|
||||||
|
|
||||||
[SerializeField]
|
|
||||||
private bool shakeCameraOnHit = true;
|
|
||||||
public bool ShakeCameraOnHit { get { return this.shakeCameraOnHit; } }
|
|
||||||
// Start is called before the first frame update
|
// Start is called before the first frame update
|
||||||
void Start()
|
private void Start()
|
||||||
{
|
{
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Update is called once per frame
|
// Update is called once per frame
|
||||||
void Update()
|
private void Update()
|
||||||
{
|
{
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -1,38 +1,32 @@
|
|||||||
using UnityEngine;
|
using UnityEngine;
|
||||||
using System;
|
|
||||||
using System.Collections;
|
|
||||||
|
|
||||||
[RequireComponent(typeof(Animator))]
|
[RequireComponent(typeof(Animator))]
|
||||||
|
|
||||||
public class IKControl_Robot : MonoBehaviour
|
public class IKControl_Robot : MonoBehaviour
|
||||||
{
|
{
|
||||||
|
public bool ikActive;
|
||||||
|
public Transform rightHandObj;
|
||||||
|
public Transform leftHandObj;
|
||||||
|
public Transform lookObj;
|
||||||
|
public Transform stepOnObj;
|
||||||
|
public Transform stepOffObj;
|
||||||
|
|
||||||
protected Animator animator;
|
protected Animator animator;
|
||||||
|
|
||||||
public bool ikActive = false;
|
|
||||||
public Transform rightHandObj = null;
|
|
||||||
public Transform leftHandObj = null;
|
|
||||||
public Transform lookObj = null;
|
|
||||||
public Transform stepOnObj = null;
|
|
||||||
public Transform stepOffObj = null;
|
|
||||||
|
|
||||||
|
private void Start()
|
||||||
void Start()
|
|
||||||
{
|
{
|
||||||
animator = GetComponent<Animator>();
|
animator = GetComponent<Animator>();
|
||||||
transform.Rotate(0, 90, 0);
|
transform.Rotate(0, 90, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
//a callback for calculating IK
|
//a callback for calculating IK
|
||||||
void OnAnimatorIK()
|
private void OnAnimatorIK()
|
||||||
{
|
{
|
||||||
if (animator)
|
if (animator)
|
||||||
{
|
{
|
||||||
|
|
||||||
//if the IK is active, set the position and rotation directly to the goal.
|
//if the IK is active, set the position and rotation directly to the goal.
|
||||||
if (ikActive)
|
if (ikActive)
|
||||||
{
|
{
|
||||||
|
|
||||||
// Set the look target position, if one has been assigned
|
// Set the look target position, if one has been assigned
|
||||||
if (lookObj != null)
|
if (lookObj != null)
|
||||||
{
|
{
|
||||||
@ -48,6 +42,7 @@ public class IKControl_Robot : MonoBehaviour
|
|||||||
animator.SetIKPosition(AvatarIKGoal.RightHand, rightHandObj.position);
|
animator.SetIKPosition(AvatarIKGoal.RightHand, rightHandObj.position);
|
||||||
animator.SetIKRotation(AvatarIKGoal.RightHand, rightHandObj.rotation);
|
animator.SetIKRotation(AvatarIKGoal.RightHand, rightHandObj.rotation);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (leftHandObj != null)
|
if (leftHandObj != null)
|
||||||
{
|
{
|
||||||
animator.SetIKPositionWeight(AvatarIKGoal.LeftHand, 1);
|
animator.SetIKPositionWeight(AvatarIKGoal.LeftHand, 1);
|
||||||
@ -55,22 +50,22 @@ public class IKControl_Robot : MonoBehaviour
|
|||||||
animator.SetIKPosition(AvatarIKGoal.LeftHand, leftHandObj.position);
|
animator.SetIKPosition(AvatarIKGoal.LeftHand, leftHandObj.position);
|
||||||
animator.SetIKRotation(AvatarIKGoal.LeftHand, leftHandObj.rotation);
|
animator.SetIKRotation(AvatarIKGoal.LeftHand, leftHandObj.rotation);
|
||||||
}
|
}
|
||||||
if(stepOnObj != null)
|
|
||||||
|
if (stepOnObj != null)
|
||||||
{
|
{
|
||||||
animator.SetIKPositionWeight(AvatarIKGoal.LeftFoot, 1);
|
animator.SetIKPositionWeight(AvatarIKGoal.LeftFoot, 1);
|
||||||
animator.SetIKRotationWeight(AvatarIKGoal.LeftFoot, 1);
|
animator.SetIKRotationWeight(AvatarIKGoal.LeftFoot, 1);
|
||||||
animator.SetIKPosition(AvatarIKGoal.LeftFoot,stepOnObj.position);
|
animator.SetIKPosition(AvatarIKGoal.LeftFoot, stepOnObj.position);
|
||||||
animator.SetIKRotation(AvatarIKGoal.LeftFoot,stepOnObj.rotation);
|
animator.SetIKRotation(AvatarIKGoal.LeftFoot, stepOnObj.rotation);
|
||||||
|
|
||||||
}
|
}
|
||||||
if(stepOffObj!= null) {
|
|
||||||
|
if (stepOffObj != null)
|
||||||
|
{
|
||||||
animator.SetIKPositionWeight(AvatarIKGoal.RightFoot, 1);
|
animator.SetIKPositionWeight(AvatarIKGoal.RightFoot, 1);
|
||||||
animator.SetIKRotationWeight(AvatarIKGoal.RightFoot, 1);
|
animator.SetIKRotationWeight(AvatarIKGoal.RightFoot, 1);
|
||||||
animator.SetIKPosition(AvatarIKGoal.RightFoot, stepOffObj.position);
|
animator.SetIKPosition(AvatarIKGoal.RightFoot, stepOffObj.position);
|
||||||
animator.SetIKRotation(AvatarIKGoal.RightFoot, stepOffObj.rotation);
|
animator.SetIKRotation(AvatarIKGoal.RightFoot, stepOffObj.rotation);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
//if the IK is not active, set the position and rotation of the hand and head back to the original position
|
//if the IK is not active, set the position and rotation of the hand and head back to the original position
|
||||||
@ -87,8 +82,6 @@ public class IKControl_Robot : MonoBehaviour
|
|||||||
|
|
||||||
animator.SetIKPositionWeight(AvatarIKGoal.RightFoot, 0);
|
animator.SetIKPositionWeight(AvatarIKGoal.RightFoot, 0);
|
||||||
animator.SetIKRotationWeight(AvatarIKGoal.RightFoot, 0);
|
animator.SetIKRotationWeight(AvatarIKGoal.RightFoot, 0);
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,24 +1,24 @@
|
|||||||
using System.Collections;
|
using System.Collections;
|
||||||
using System.Collections.Generic;
|
|
||||||
using UnityEngine;
|
using UnityEngine;
|
||||||
using UnityEngine.VFX;
|
using UnityEngine.VFX;
|
||||||
|
|
||||||
public class RobotMouthAnimator : MonoBehaviour
|
public class RobotMouthAnimator : MonoBehaviour
|
||||||
{
|
{
|
||||||
|
[SerializeField] private VisualEffect fireEffect;
|
||||||
|
|
||||||
|
[SerializeField] private Light fireLight;
|
||||||
|
|
||||||
private Animator anim;
|
private Animator anim;
|
||||||
[SerializeField]
|
|
||||||
private VisualEffect fireEffect;
|
|
||||||
[SerializeField]
|
|
||||||
private Light fireLight;
|
|
||||||
// Start is called before the first frame update
|
// Start is called before the first frame update
|
||||||
void Start()
|
private void Start()
|
||||||
{
|
{
|
||||||
anim = GetComponent<Animator>();
|
anim = GetComponent<Animator>();
|
||||||
fireLight.gameObject.SetActive(false);
|
fireLight.gameObject.SetActive(false);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Update is called once per frame
|
// Update is called once per frame
|
||||||
void Update()
|
private void Update()
|
||||||
{
|
{
|
||||||
if (Input.GetKeyDown(KeyCode.Return))
|
if (Input.GetKeyDown(KeyCode.Return))
|
||||||
{
|
{
|
||||||
@ -26,21 +26,19 @@ public class RobotMouthAnimator : MonoBehaviour
|
|||||||
if (anim.GetBool("FlapsOpen"))
|
if (anim.GetBool("FlapsOpen"))
|
||||||
{
|
{
|
||||||
StartCoroutine(WaitToFire());
|
StartCoroutine(WaitToFire());
|
||||||
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
fireEffect.Stop();
|
fireEffect.Stop();
|
||||||
fireLight.gameObject.SetActive(false);
|
fireLight.gameObject.SetActive(false);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
}
|
|
||||||
}
|
|
||||||
private IEnumerator WaitToFire()
|
private IEnumerator WaitToFire()
|
||||||
{
|
{
|
||||||
yield return new WaitForSeconds(1.5f);
|
yield return new WaitForSeconds(1.5f);
|
||||||
fireEffect.Play();
|
fireEffect.Play();
|
||||||
fireLight.gameObject.SetActive(true);
|
fireLight.gameObject.SetActive(true);
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -1,74 +1,62 @@
|
|||||||
using System.Collections;
|
|
||||||
using System.Collections.Generic;
|
|
||||||
using UnityEngine;
|
using UnityEngine;
|
||||||
using UnityEngine.VFX;
|
using UnityEngine.VFX;
|
||||||
|
|
||||||
[ExecuteAlways]
|
[ExecuteAlways]
|
||||||
public class SwarmAnimator : MonoBehaviour
|
public class SwarmAnimator : MonoBehaviour
|
||||||
{
|
{
|
||||||
[SerializeField]
|
[SerializeField] private VisualEffect vfx;
|
||||||
private VisualEffect vfx;
|
|
||||||
|
|
||||||
private Vector3 currentPosition;
|
[SerializeField] private Rigidbody rb;
|
||||||
private Vector3 previousPosition;
|
|
||||||
[SerializeField]
|
|
||||||
private Rigidbody rb;
|
|
||||||
//[SerializeField]
|
//[SerializeField]
|
||||||
//private string parameterName = "DeltaVector";
|
//private string parameterName = "DeltaVector";
|
||||||
|
|
||||||
[SerializeField]
|
[SerializeField] private Vector3 avoidancePosDefault;
|
||||||
private Vector3 avoidancePosDefault;
|
|
||||||
|
|
||||||
[SerializeField]
|
[SerializeField] private float explodeDuration = 1.0f;
|
||||||
private float explodeDuration = 1.0f;
|
|
||||||
private float dur = 0f;
|
private Vector3 currentPosition;
|
||||||
private bool isExploding = false;
|
private float dur;
|
||||||
|
private bool isExploding;
|
||||||
|
private Vector3 previousPosition;
|
||||||
|
|
||||||
// Start is called before the first frame update
|
// Start is called before the first frame update
|
||||||
void Start()
|
private void Start()
|
||||||
{
|
{
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Update is called once per frame
|
// Update is called once per frame
|
||||||
void Update()
|
private void Update()
|
||||||
{
|
{
|
||||||
previousPosition = currentPosition;
|
previousPosition = currentPosition;
|
||||||
currentPosition = transform.position;
|
currentPosition = transform.position;
|
||||||
Vector3 velocity = (currentPosition - previousPosition) ;
|
var velocity = currentPosition - previousPosition;
|
||||||
vfx.SetVector3("DeltaVector", velocity);
|
vfx.SetVector3("DeltaVector", velocity);
|
||||||
|
|
||||||
if (Input.GetKeyDown(KeyCode.Space))
|
if (Input.GetKeyDown(KeyCode.Space)) Explode();
|
||||||
{
|
|
||||||
Explode();
|
|
||||||
}
|
|
||||||
if (isExploding)
|
if (isExploding)
|
||||||
{
|
{
|
||||||
if(dur> explodeDuration)
|
if (dur > explodeDuration) StopExplode();
|
||||||
{
|
|
||||||
StopExplode();
|
|
||||||
}
|
|
||||||
dur += Time.deltaTime;
|
dur += Time.deltaTime;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void Explode()
|
private void FixedUpdate()
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
private void Explode()
|
||||||
{
|
{
|
||||||
vfx.SetVector3("Avoid", transform.position);
|
vfx.SetVector3("Avoid", transform.position);
|
||||||
this.isExploding = true;
|
isExploding = true;
|
||||||
dur = 0;
|
dur = 0;
|
||||||
|
|
||||||
//Wait a sec then stop.
|
//Wait a sec then stop.
|
||||||
}
|
}
|
||||||
void StopExplode()
|
|
||||||
|
private void StopExplode()
|
||||||
{
|
{
|
||||||
vfx.SetVector3("Avoid", avoidancePosDefault);
|
vfx.SetVector3("Avoid", avoidancePosDefault);
|
||||||
this.isExploding = false;
|
isExploding = false;
|
||||||
vfx.Stop();
|
vfx.Stop();
|
||||||
}
|
}
|
||||||
private void FixedUpdate()
|
|
||||||
{
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
}
|
@ -1,40 +1,36 @@
|
|||||||
using System.Collections;
|
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using UnityEngine;
|
using UnityEngine;
|
||||||
|
|
||||||
public class EmissiveLightMatching : MonoBehaviour
|
public class EmissiveLightMatching : MonoBehaviour
|
||||||
{
|
{
|
||||||
[SerializeField]
|
[SerializeField] private List<int> indexes;
|
||||||
private List<int> indexes;
|
|
||||||
private List<Color> colors= new List<Color>();
|
[SerializeField] private Light reference;
|
||||||
[SerializeField]
|
|
||||||
private Light reference;
|
private readonly List<Color> colors = new();
|
||||||
private float initIntensity;
|
private float initIntensity;
|
||||||
|
|
||||||
private void Awake()
|
private void Awake()
|
||||||
{
|
{
|
||||||
initIntensity = reference.intensity;
|
initIntensity = reference.intensity;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Start is called before the first frame update
|
// Start is called before the first frame update
|
||||||
void Start()
|
private void Start()
|
||||||
{
|
{
|
||||||
|
foreach (var index in indexes)
|
||||||
foreach(int index in indexes) {
|
colors.Add(gameObject.GetComponent<MeshRenderer>().materials[index].GetColor("_EmissiveColor"));
|
||||||
colors.Add(this.gameObject.GetComponent<MeshRenderer>().materials[index].GetColor("_EmissiveColor"));
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Update is called once per frame
|
// Update is called once per frame
|
||||||
void Update()
|
private void Update()
|
||||||
{
|
{
|
||||||
int x = 0;
|
var x = 0;
|
||||||
foreach(int i in indexes)
|
foreach (var i in indexes)
|
||||||
{
|
{
|
||||||
|
gameObject.GetComponent<MeshRenderer>().materials[i].SetColor("_EmissiveColor",
|
||||||
this.gameObject.GetComponent<MeshRenderer>().materials[i].SetColor("_EmissiveColor", colors[x] * ((10*reference.intensity / initIntensity)));
|
colors[x] * (10 * reference.intensity / initIntensity));
|
||||||
x++;
|
x++;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -1,39 +1,40 @@
|
|||||||
using System.Collections;
|
|
||||||
using System.Collections.Generic;
|
|
||||||
using UnityEngine;
|
using UnityEngine;
|
||||||
|
|
||||||
public class TestAnimationParameters : MonoBehaviour
|
public class TestAnimationParameters : MonoBehaviour
|
||||||
{
|
{
|
||||||
|
[SerializeField] private float speed;
|
||||||
|
|
||||||
|
[SerializeField] private int attackIndex;
|
||||||
|
|
||||||
|
[SerializeField] private int attack;
|
||||||
|
|
||||||
|
[SerializeField] private bool inlight;
|
||||||
|
|
||||||
|
[SerializeField] private int attackScream;
|
||||||
|
|
||||||
private Animator animator;
|
private Animator animator;
|
||||||
[SerializeField]
|
|
||||||
private float speed = 0;
|
|
||||||
[SerializeField]
|
|
||||||
private int attackIndex = 0;
|
|
||||||
[SerializeField]
|
|
||||||
private int attack = 0;
|
|
||||||
private int pattack = -1;
|
private int pattack = -1;
|
||||||
[SerializeField]
|
|
||||||
private bool inlight = false;
|
|
||||||
[SerializeField]
|
|
||||||
private int attackScream = 0;
|
|
||||||
private int pAttackScream = -1;
|
private int pAttackScream = -1;
|
||||||
|
|
||||||
|
|
||||||
// Start is called before the first frame update
|
// Start is called before the first frame update
|
||||||
void Start()
|
private void Start()
|
||||||
{
|
{
|
||||||
animator= GetComponent<Animator>();
|
animator = GetComponent<Animator>();
|
||||||
}
|
}
|
||||||
|
|
||||||
// Update is called once per frame
|
// Update is called once per frame
|
||||||
void Update()
|
private void Update()
|
||||||
{
|
{
|
||||||
animator.SetFloat("Speed", speed);
|
animator.SetFloat("Speed", speed);
|
||||||
animator.SetInteger("AttackIndex", attackIndex);
|
animator.SetInteger("AttackIndex", attackIndex);
|
||||||
if (Input.GetKeyDown(KeyCode.Tab)){
|
if (Input.GetKeyDown(KeyCode.Tab))
|
||||||
|
{
|
||||||
animator.SetTrigger("Attack");
|
animator.SetTrigger("Attack");
|
||||||
pattack = attack;
|
pattack = attack;
|
||||||
};
|
}
|
||||||
|
|
||||||
|
;
|
||||||
animator.SetBool("InLight", inlight);
|
animator.SetBool("InLight", inlight);
|
||||||
if (Input.GetKeyDown(KeyCode.Space))
|
if (Input.GetKeyDown(KeyCode.Space))
|
||||||
{
|
{
|
||||||
|
@ -2,115 +2,32 @@ using System.Collections;
|
|||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using UnityEngine;
|
using UnityEngine;
|
||||||
using UnityEngine.Rendering;
|
using UnityEngine.Rendering;
|
||||||
using UnityEngine.UI;
|
|
||||||
using UnityEngine.SceneManagement;
|
using UnityEngine.SceneManagement;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
public class InGameManager : MonoBehaviour
|
public class InGameManager : MonoBehaviour
|
||||||
{
|
{
|
||||||
|
[SerializeField] private Volume gameVolume;
|
||||||
|
|
||||||
[SerializeField]
|
[SerializeField] private Volume pausedVolume;
|
||||||
private Volume gameVolume;
|
|
||||||
[SerializeField]
|
|
||||||
private Volume pausedVolume;
|
|
||||||
|
|
||||||
[SerializeField]
|
[SerializeField] private bool isPaused;
|
||||||
private bool isPaused = false;
|
|
||||||
private bool isTransitioning = false;
|
|
||||||
|
|
||||||
// [SerializeField]
|
// [SerializeField]
|
||||||
//private float pauseTransitionDuration = 1f;
|
//private float pauseTransitionDuration = 1f;
|
||||||
|
|
||||||
[SerializeField]
|
[SerializeField] private Canvas gameCanvas;
|
||||||
private Canvas gameCanvas;
|
|
||||||
[SerializeField]
|
|
||||||
private Canvas pausedCanvas;
|
|
||||||
[SerializeField]
|
|
||||||
private List<AudioSource> sounds = new List<AudioSource>();
|
|
||||||
private List<float> initSoundVolumes = new List<float>();
|
|
||||||
|
|
||||||
public bool IsPaused { get { return this.isPaused; } }
|
[SerializeField] private Canvas pausedCanvas;
|
||||||
|
|
||||||
public void TogglePause()
|
[SerializeField] private List<AudioSource> sounds = new();
|
||||||
{
|
|
||||||
if (!isTransitioning)
|
|
||||||
{
|
|
||||||
isPaused = !isPaused;
|
|
||||||
Cursor.visible = isPaused;
|
|
||||||
if (!isPaused)
|
|
||||||
{
|
|
||||||
Cursor.lockState = CursorLockMode.Locked;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
Cursor.lockState = CursorLockMode.None;
|
|
||||||
}
|
|
||||||
StartCoroutine(pauseTransition());
|
|
||||||
|
|
||||||
}
|
private readonly List<float> initSoundVolumes = new();
|
||||||
|
private bool isTransitioning;
|
||||||
|
|
||||||
}
|
public bool IsPaused => isPaused;
|
||||||
public void UnPause()
|
|
||||||
{
|
|
||||||
if (!isTransitioning)
|
|
||||||
{
|
|
||||||
isPaused = false;
|
|
||||||
Cursor.lockState = CursorLockMode.Locked;
|
|
||||||
Cursor.visible = isPaused;
|
|
||||||
StartCoroutine(pauseTransition());
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
public void Pause()
|
|
||||||
{
|
|
||||||
if (!isTransitioning)
|
|
||||||
{
|
|
||||||
isPaused = true;
|
|
||||||
Cursor.lockState = CursorLockMode.None;
|
|
||||||
Cursor.visible = isPaused;
|
|
||||||
StartCoroutine(pauseTransition());
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
IEnumerator pauseTransition()
|
|
||||||
{
|
|
||||||
if (pausedCanvas.gameObject.activeInHierarchy && !isPaused)
|
|
||||||
{
|
|
||||||
pausedCanvas.gameObject.SetActive(false);
|
|
||||||
}
|
|
||||||
if (gameCanvas.gameObject.activeInHierarchy && isPaused)
|
|
||||||
{
|
|
||||||
gameCanvas.gameObject.SetActive(false);
|
|
||||||
}
|
|
||||||
|
|
||||||
this.isTransitioning = true;
|
|
||||||
yield return new WaitForSeconds(0);
|
|
||||||
this.isTransitioning = false;
|
|
||||||
print("Unpause canvas?" + isPaused+","+pausedCanvas.gameObject.activeInHierarchy);
|
|
||||||
if (!pausedCanvas.gameObject.activeInHierarchy && isPaused)
|
|
||||||
{
|
|
||||||
pausedCanvas.gameObject.SetActive(true);
|
|
||||||
|
|
||||||
}
|
|
||||||
if (!gameCanvas.gameObject.activeInHierarchy && !isPaused)
|
|
||||||
{
|
|
||||||
gameCanvas.gameObject.SetActive(true);
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
public void SetVolume(float volume)
|
|
||||||
{
|
|
||||||
for (int i = 0;i<sounds.Count;i++)
|
|
||||||
{
|
|
||||||
sounds[i].volume = initSoundVolumes[i]*volume;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
// Start is called before the first frame update
|
// Start is called before the first frame update
|
||||||
void Start()
|
private void Start()
|
||||||
{
|
{
|
||||||
isPaused = false;
|
isPaused = false;
|
||||||
Cursor.lockState = CursorLockMode.Locked;
|
Cursor.lockState = CursorLockMode.Locked;
|
||||||
@ -120,23 +37,15 @@ public class InGameManager : MonoBehaviour
|
|||||||
gameCanvas.gameObject.SetActive(true);
|
gameCanvas.gameObject.SetActive(true);
|
||||||
pausedCanvas.gameObject.SetActive(false);
|
pausedCanvas.gameObject.SetActive(false);
|
||||||
|
|
||||||
foreach (AudioSource source in sounds)
|
foreach (var source in sounds) initSoundVolumes.Add(source.volume);
|
||||||
{
|
|
||||||
initSoundVolumes.Add(source.volume);
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Update is called once per frame
|
// Update is called once per frame
|
||||||
void Update()
|
private void Update()
|
||||||
{
|
{
|
||||||
if (Input.GetButtonDown("Pause"))
|
if (Input.GetButtonDown("Pause")) TogglePause();
|
||||||
{
|
|
||||||
this.TogglePause();
|
|
||||||
|
|
||||||
}
|
if (isTransitioning || true)
|
||||||
|
|
||||||
if (isTransitioning||true)
|
|
||||||
{
|
{
|
||||||
if (isPaused)
|
if (isPaused)
|
||||||
{
|
{
|
||||||
@ -149,7 +58,6 @@ public class InGameManager : MonoBehaviour
|
|||||||
//pausedVolume.weight = pausedVolume.weight > 0.9 ? 1 : pausedVolume.weight;
|
//pausedVolume.weight = pausedVolume.weight > 0.9 ? 1 : pausedVolume.weight;
|
||||||
gameVolume.weight = 0;
|
gameVolume.weight = 0;
|
||||||
pausedVolume.weight = 1;
|
pausedVolume.weight = 1;
|
||||||
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@ -161,6 +69,61 @@ public class InGameManager : MonoBehaviour
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void TogglePause()
|
||||||
|
{
|
||||||
|
if (!isTransitioning)
|
||||||
|
{
|
||||||
|
isPaused = !isPaused;
|
||||||
|
Cursor.visible = isPaused;
|
||||||
|
if (!isPaused)
|
||||||
|
Cursor.lockState = CursorLockMode.Locked;
|
||||||
|
else
|
||||||
|
Cursor.lockState = CursorLockMode.None;
|
||||||
|
StartCoroutine(pauseTransition());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public void UnPause()
|
||||||
|
{
|
||||||
|
if (!isTransitioning)
|
||||||
|
{
|
||||||
|
isPaused = false;
|
||||||
|
Cursor.lockState = CursorLockMode.Locked;
|
||||||
|
Cursor.visible = isPaused;
|
||||||
|
StartCoroutine(pauseTransition());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public void Pause()
|
||||||
|
{
|
||||||
|
if (!isTransitioning)
|
||||||
|
{
|
||||||
|
isPaused = true;
|
||||||
|
Cursor.lockState = CursorLockMode.None;
|
||||||
|
Cursor.visible = isPaused;
|
||||||
|
StartCoroutine(pauseTransition());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private IEnumerator pauseTransition()
|
||||||
|
{
|
||||||
|
if (pausedCanvas.gameObject.activeInHierarchy && !isPaused) pausedCanvas.gameObject.SetActive(false);
|
||||||
|
if (gameCanvas.gameObject.activeInHierarchy && isPaused) gameCanvas.gameObject.SetActive(false);
|
||||||
|
|
||||||
|
isTransitioning = true;
|
||||||
|
yield return new WaitForSeconds(0);
|
||||||
|
isTransitioning = false;
|
||||||
|
print("Unpause canvas?" + isPaused + "," + pausedCanvas.gameObject.activeInHierarchy);
|
||||||
|
if (!pausedCanvas.gameObject.activeInHierarchy && isPaused) pausedCanvas.gameObject.SetActive(true);
|
||||||
|
if (!gameCanvas.gameObject.activeInHierarchy && !isPaused) gameCanvas.gameObject.SetActive(true);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public void SetVolume(float volume)
|
||||||
|
{
|
||||||
|
for (var i = 0; i < sounds.Count; i++) sounds[i].volume = initSoundVolumes[i] * volume;
|
||||||
|
}
|
||||||
|
|
||||||
public void ExitToMenu()
|
public void ExitToMenu()
|
||||||
{
|
{
|
||||||
SceneManager.LoadScene(0);
|
SceneManager.LoadScene(0);
|
||||||
|
@ -1,52 +1,52 @@
|
|||||||
using System.Collections;
|
|
||||||
using System.Collections.Generic;
|
|
||||||
using UnityEngine;
|
using UnityEngine;
|
||||||
using UnityEngine.UI;
|
using UnityEngine.UI;
|
||||||
|
|
||||||
public class InGameMenuManager : MonoBehaviour
|
public class InGameMenuManager : MonoBehaviour
|
||||||
{
|
{
|
||||||
[SerializeField]
|
[SerializeField] private Button settingsButton;
|
||||||
private Button settingsButton;
|
|
||||||
[SerializeField]
|
[SerializeField] private Button returnToMenuButton;
|
||||||
private Button returnToMenuButton;
|
|
||||||
private Animator menuAnimator;
|
[SerializeField] private Scrollbar sensitivitySlider;
|
||||||
[SerializeField]
|
|
||||||
private Scrollbar sensitivitySlider;
|
[SerializeField] private Scrollbar volumeSlider;
|
||||||
[SerializeField]
|
|
||||||
private Scrollbar volumeSlider;
|
|
||||||
private PlayerComponent player;
|
|
||||||
private InGameManager gameManager;
|
private InGameManager gameManager;
|
||||||
|
private Animator menuAnimator;
|
||||||
|
private PlayerComponent player;
|
||||||
|
|
||||||
// Start is called before the first frame update
|
// Start is called before the first frame update
|
||||||
void Start()
|
private void Start()
|
||||||
{
|
{
|
||||||
menuAnimator= GetComponent<Animator>();
|
menuAnimator = GetComponent<Animator>();
|
||||||
settingsButton.onClick.AddListener(SettingsClicked);
|
settingsButton.onClick.AddListener(SettingsClicked);
|
||||||
returnToMenuButton.onClick.AddListener(SettingsUnClicked);
|
returnToMenuButton.onClick.AddListener(SettingsUnClicked);
|
||||||
player = GameObject.FindObjectOfType(typeof(PlayerComponent)) as PlayerComponent;
|
player = FindObjectOfType(typeof(PlayerComponent)) as PlayerComponent;
|
||||||
gameManager = GameObject.FindObjectOfType<InGameManager>();
|
gameManager = FindObjectOfType<InGameManager>();
|
||||||
}
|
|
||||||
void SettingsClicked()
|
|
||||||
{
|
|
||||||
menuAnimator.SetBool("SettingsOpen", true);
|
|
||||||
}
|
|
||||||
void SettingsUnClicked()
|
|
||||||
{
|
|
||||||
|
|
||||||
menuAnimator.SetBool("SettingsOpen", false);
|
|
||||||
}
|
|
||||||
public void UpdateSensitivity()
|
|
||||||
{
|
|
||||||
this.player.SetSensitivity(sensitivitySlider.value*4f);
|
|
||||||
}
|
|
||||||
public void UpdateVolume()
|
|
||||||
{
|
|
||||||
gameManager.SetVolume(volumeSlider.value*2);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Update is called once per frame
|
// Update is called once per frame
|
||||||
void Update()
|
private void Update()
|
||||||
{
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
private void SettingsClicked()
|
||||||
|
{
|
||||||
|
menuAnimator.SetBool("SettingsOpen", true);
|
||||||
|
}
|
||||||
|
|
||||||
|
private void SettingsUnClicked()
|
||||||
|
{
|
||||||
|
menuAnimator.SetBool("SettingsOpen", false);
|
||||||
|
}
|
||||||
|
|
||||||
|
public void UpdateSensitivity()
|
||||||
|
{
|
||||||
|
player.SetSensitivity(sensitivitySlider.value * 4f);
|
||||||
|
}
|
||||||
|
|
||||||
|
public void UpdateVolume()
|
||||||
|
{
|
||||||
|
gameManager.SetVolume(volumeSlider.value * 2);
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -1,5 +1,3 @@
|
|||||||
using System.Collections;
|
|
||||||
using System.Collections.Generic;
|
|
||||||
using UnityEngine;
|
using UnityEngine;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
@ -8,47 +6,34 @@ using UnityEngine;
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
public class Optimizer : MonoBehaviour
|
public class Optimizer : MonoBehaviour
|
||||||
{
|
{
|
||||||
[SerializeField]
|
[SerializeField] public string Tag;
|
||||||
public string Tag;
|
|
||||||
[SerializeField]
|
[SerializeField] private GameObject[] references;
|
||||||
private GameObject[] references;
|
|
||||||
[SerializeField]
|
[SerializeField] private bool beginDisabled = true;
|
||||||
private bool beginDisabled = true;
|
|
||||||
private void Start()
|
private void Start()
|
||||||
{
|
{
|
||||||
if (beginDisabled)
|
if (beginDisabled) Disable();
|
||||||
{
|
|
||||||
Disable();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
public void Enable()
|
|
||||||
{
|
|
||||||
foreach (GameObject go in references)
|
|
||||||
{
|
|
||||||
go.SetActive(true);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
public void Disable()
|
|
||||||
{
|
|
||||||
foreach (GameObject go in references)
|
|
||||||
{
|
|
||||||
go.SetActive(false);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private void OnTriggerEnter(Collider other)
|
private void OnTriggerEnter(Collider other)
|
||||||
{
|
{
|
||||||
if (other.CompareTag(Tag))
|
if (other.CompareTag(Tag)) Enable();
|
||||||
{
|
|
||||||
Enable();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private void OnTriggerExit(Collider other)
|
private void OnTriggerExit(Collider other)
|
||||||
{
|
{
|
||||||
if (other.CompareTag(Tag))
|
if (other.CompareTag(Tag)) Disable();
|
||||||
{
|
|
||||||
Disable();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void Enable()
|
||||||
|
{
|
||||||
|
foreach (var go in references) go.SetActive(true);
|
||||||
|
}
|
||||||
|
|
||||||
|
public void Disable()
|
||||||
|
{
|
||||||
|
foreach (var go in references) go.SetActive(false);
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -1,12 +1,18 @@
|
|||||||
using System.Collections;
|
|
||||||
using System.Collections.Generic;
|
|
||||||
using UnityEngine;
|
using UnityEngine;
|
||||||
|
|
||||||
public class GemItem : MonoBehaviour
|
public class GemItem : MonoBehaviour
|
||||||
{
|
{
|
||||||
[SerializeField]
|
[SerializeField] private float instantSpeed = 98f;
|
||||||
private float instantSpeed = 98f;
|
|
||||||
|
|
||||||
|
// Start is called before the first frame update
|
||||||
|
private void Start()
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
// Update is called once per frame
|
||||||
|
private void Update()
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
private void OnTriggerEnter(Collider collision)
|
private void OnTriggerEnter(Collider collision)
|
||||||
@ -14,20 +20,7 @@ public class GemItem : MonoBehaviour
|
|||||||
if (collision.gameObject.CompareTag("Player"))
|
if (collision.gameObject.CompareTag("Player"))
|
||||||
{
|
{
|
||||||
collision.gameObject.GetComponent<PlayerMovementController>().SetSpeed(instantSpeed);
|
collision.gameObject.GetComponent<PlayerMovementController>().SetSpeed(instantSpeed);
|
||||||
Destroy(this.gameObject);
|
Destroy(gameObject);
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Start is called before the first frame update
|
|
||||||
void Start()
|
|
||||||
{
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
// Update is called once per frame
|
|
||||||
void Update()
|
|
||||||
{
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
}
|
@ -1,24 +1,20 @@
|
|||||||
using System.Collections;
|
|
||||||
using System.Collections.Generic;
|
|
||||||
using UnityEngine;
|
using UnityEngine;
|
||||||
|
|
||||||
public class RotatingHologram : MonoBehaviour
|
public class RotatingHologram : MonoBehaviour
|
||||||
{
|
{
|
||||||
[SerializeField]
|
[SerializeField] private Vector3 globalRotation = Vector3.zero;
|
||||||
private Vector3 globalRotation= Vector3.zero;
|
|
||||||
[SerializeField]
|
[SerializeField] private Vector3 localRotation = Vector3.zero;
|
||||||
private Vector3 localRotation = Vector3.zero;
|
|
||||||
|
|
||||||
// Start is called before the first frame update
|
// Start is called before the first frame update
|
||||||
void Start()
|
private void Start()
|
||||||
{
|
{
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Update is called once per frame
|
// Update is called once per frame
|
||||||
void Update()
|
private void Update()
|
||||||
{
|
{
|
||||||
this.transform.eulerAngles += globalRotation * Time.deltaTime;
|
transform.eulerAngles += globalRotation * Time.deltaTime;
|
||||||
this.transform.Rotate(localRotation* Time.deltaTime);
|
transform.Rotate(localRotation * Time.deltaTime);
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -1,18 +1,14 @@
|
|||||||
using System.Collections;
|
|
||||||
using System.Collections.Generic;
|
|
||||||
using UnityEngine;
|
using UnityEngine;
|
||||||
|
|
||||||
public class Insertable : MonoBehaviour
|
public class Insertable : MonoBehaviour
|
||||||
{
|
{
|
||||||
// Start is called before the first frame update
|
// Start is called before the first frame update
|
||||||
void Start()
|
private void Start()
|
||||||
{
|
{
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Update is called once per frame
|
// Update is called once per frame
|
||||||
void Update()
|
private void Update()
|
||||||
{
|
{
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -1,20 +1,14 @@
|
|||||||
using System.Collections;
|
|
||||||
using System.Collections.Generic;
|
|
||||||
using UnityEngine;
|
using UnityEngine;
|
||||||
|
|
||||||
public class Interactable : MonoBehaviour
|
public class Interactable : MonoBehaviour
|
||||||
{
|
{
|
||||||
|
|
||||||
|
|
||||||
// Start is called before the first frame update
|
// Start is called before the first frame update
|
||||||
void Start()
|
private void Start()
|
||||||
{
|
{
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Update is called once per frame
|
// Update is called once per frame
|
||||||
void Update()
|
private void Update()
|
||||||
{
|
{
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -1,57 +1,44 @@
|
|||||||
using System.Collections;
|
|
||||||
using System.Collections.Generic;
|
|
||||||
using UnityEngine;
|
using UnityEngine;
|
||||||
|
|
||||||
public class ItemSelector : MonoBehaviour
|
public class ItemSelector : MonoBehaviour
|
||||||
{
|
{
|
||||||
[SerializeField]
|
|
||||||
private Camera cam;
|
|
||||||
private InteractableItem selected;
|
|
||||||
|
|
||||||
[SerializeField]
|
|
||||||
private LayerMask mask;
|
|
||||||
public static ItemSelector instance;
|
public static ItemSelector instance;
|
||||||
[SerializeField]
|
|
||||||
private float range = 1;
|
|
||||||
|
|
||||||
public InteractableItem Selected { get { return selected; } }
|
[SerializeField] private Camera cam;
|
||||||
|
|
||||||
|
[SerializeField] private LayerMask mask;
|
||||||
|
|
||||||
|
[SerializeField] private float range = 1;
|
||||||
|
|
||||||
|
public InteractableItem Selected { get; private set; }
|
||||||
|
|
||||||
// Start is called before the first frame update
|
// Start is called before the first frame update
|
||||||
void Start()
|
private void Start()
|
||||||
{
|
{
|
||||||
instance = this;
|
instance = this;
|
||||||
}
|
}
|
||||||
|
|
||||||
void FixedUpdate()
|
// Update is called once per frame
|
||||||
|
private void Update()
|
||||||
{
|
{
|
||||||
Ray ray = cam.ScreenPointToRay(Input.mousePosition);
|
|
||||||
RaycastHit hit;
|
|
||||||
|
|
||||||
if (Physics.Raycast(ray, out hit,range,layerMask:mask))
|
|
||||||
{
|
|
||||||
if(selected!= null||hit.transform.gameObject==null)
|
|
||||||
{
|
|
||||||
selected.Disable();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
selected = hit.transform.gameObject.GetComponent<InteractableItem>();
|
private void FixedUpdate()
|
||||||
selected.Enable();
|
{
|
||||||
print(selected);
|
var ray = cam.ScreenPointToRay(Input.mousePosition);
|
||||||
|
RaycastHit hit;
|
||||||
|
|
||||||
|
if (Physics.Raycast(ray, out hit, range, mask))
|
||||||
|
{
|
||||||
|
if (Selected != null || hit.transform.gameObject == null) Selected.Disable();
|
||||||
|
|
||||||
|
Selected = hit.transform.gameObject.GetComponent<InteractableItem>();
|
||||||
|
Selected.Enable();
|
||||||
|
print(Selected);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if (selected != null)
|
if (Selected != null) Selected.Disable();
|
||||||
{
|
|
||||||
selected.Disable();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
// Update is called once per frame
|
|
||||||
void Update()
|
|
||||||
{
|
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -1,4 +1,3 @@
|
|||||||
using System.Collections;
|
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using UnityEngine;
|
using UnityEngine;
|
||||||
|
|
||||||
@ -6,17 +5,19 @@ using UnityEngine;
|
|||||||
/// Inventory:
|
/// Inventory:
|
||||||
/// <list type="bullet">Inventory Name: The name of the inventory.</list>
|
/// <list type="bullet">Inventory Name: The name of the inventory.</list>
|
||||||
/// <list type="bullet">Inventory Size: The amount of size the inventory has.</list>
|
/// <list type="bullet">Inventory Size: The amount of size the inventory has.</list>
|
||||||
/// <list type="bullet">Invetory Items: List of all items in the inventory. No items in the world are "destroyed"
|
/// <list type="bullet">
|
||||||
/// instead all items in inventory are disabled, but can be looked up by their item name.</list>
|
/// Invetory Items: List of all items in the inventory. No items in the world are "destroyed"
|
||||||
|
/// instead all items in inventory are disabled, but can be looked up by their item name.
|
||||||
|
/// </list>
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public class Inventory : MonoBehaviour
|
public class Inventory : MonoBehaviour
|
||||||
{
|
{
|
||||||
[SerializeField]
|
[SerializeField] private string inventoryName;
|
||||||
private string inventoryName;
|
|
||||||
[SerializeField]
|
[SerializeField] private int inventorySize;
|
||||||
private int inventorySize;
|
|
||||||
[SerializeField]
|
[SerializeField] private List<string> inventoryItems;
|
||||||
private List<string> inventoryItems;
|
|
||||||
private int inventoryReserved;
|
private int inventoryReserved;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
@ -26,38 +27,33 @@ public class Inventory : MonoBehaviour
|
|||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
public bool AddItem(CarryableItem item)
|
public bool AddItem(CarryableItem item)
|
||||||
{
|
{
|
||||||
if(item.ItemSize+inventoryReserved > inventorySize)
|
if (item.ItemSize + inventoryReserved > inventorySize) return false;
|
||||||
{
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
inventoryItems.Add(item.ItemName);
|
inventoryItems.Add(item.ItemName);
|
||||||
inventoryReserved += item.ItemSize;
|
inventoryReserved += item.ItemSize;
|
||||||
//item.gameObject.SetActive(false);
|
//item.gameObject.SetActive(false);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
private bool FindItemOfName(string name, out CarryableItem item)
|
private bool FindItemOfName(string name, out CarryableItem item)
|
||||||
{
|
{
|
||||||
//NOTE: May not work. May need to move instead of disable objects.
|
//NOTE: May not work. May need to move instead of disable objects.
|
||||||
CarryableItem[] items = Resources.FindObjectsOfTypeAll<CarryableItem>();
|
var items = Resources.FindObjectsOfTypeAll<CarryableItem>();
|
||||||
|
|
||||||
foreach (CarryableItem item2 in items)
|
foreach (var item2 in items)
|
||||||
{
|
|
||||||
if (item2.ItemName == name)
|
if (item2.ItemName == name)
|
||||||
{
|
{
|
||||||
|
|
||||||
item = item2;
|
item = item2;
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
}
|
|
||||||
item = null;
|
item = null;
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public bool RemoveItem(string name)
|
public bool RemoveItem(string name)
|
||||||
{
|
{
|
||||||
|
|
||||||
CarryableItem itemFound;
|
CarryableItem itemFound;
|
||||||
if (FindItemOfName(name,out itemFound))
|
if (FindItemOfName(name, out itemFound))
|
||||||
{
|
{
|
||||||
itemFound.gameObject.SetActive(true);
|
itemFound.gameObject.SetActive(true);
|
||||||
inventoryItems.Remove(itemFound.ItemName);
|
inventoryItems.Remove(itemFound.ItemName);
|
||||||
@ -67,8 +63,5 @@ public class Inventory : MonoBehaviour
|
|||||||
|
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
@ -1,8 +1,8 @@
|
|||||||
using System.Collections;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using UnityEngine;
|
using UnityEngine;
|
||||||
|
|
||||||
[System.Serializable]
|
[Serializable]
|
||||||
public class TempInventoryBuilderItem
|
public class TempInventoryBuilderItem
|
||||||
{
|
{
|
||||||
public string name;
|
public string name;
|
||||||
@ -11,57 +11,44 @@ public class TempInventoryBuilderItem
|
|||||||
|
|
||||||
public class TempInventory : MonoBehaviour
|
public class TempInventory : MonoBehaviour
|
||||||
{
|
{
|
||||||
|
[SerializeField] private List<TempInventoryBuilderItem> initialInvent = new();
|
||||||
|
|
||||||
private Dictionary<string,int> inventory = new Dictionary<string,int>();
|
private readonly Dictionary<string, int> inventory = new();
|
||||||
[SerializeField]
|
|
||||||
private List<TempInventoryBuilderItem> initialInvent = new List<TempInventoryBuilderItem>();
|
// Start is called before the first frame update
|
||||||
|
private void Start()
|
||||||
|
{
|
||||||
|
foreach (var item in initialInvent) inventory[item.name] = item.quantity;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Update is called once per frame
|
||||||
|
private void Update()
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
public int GetQuantityOf(string name)
|
public int GetQuantityOf(string name)
|
||||||
{
|
{
|
||||||
if (inventory.ContainsKey(name))
|
if (inventory.ContainsKey(name)) return inventory[name];
|
||||||
{
|
|
||||||
return inventory[name];
|
|
||||||
}
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
public bool Add(string name,int quantity=1)
|
|
||||||
|
public bool Add(string name, int quantity = 1)
|
||||||
{
|
{
|
||||||
if (inventory.ContainsKey(name))
|
if (inventory.ContainsKey(name))
|
||||||
{
|
|
||||||
inventory[name] += quantity;
|
inventory[name] += quantity;
|
||||||
}
|
|
||||||
else
|
else
|
||||||
{
|
|
||||||
inventory.Add(name, quantity);
|
inventory.Add(name, quantity);
|
||||||
}
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
public bool Remove(string name,int quantity=1)
|
public bool Remove(string name, int quantity = 1)
|
||||||
{
|
{
|
||||||
if (inventory.ContainsKey(name))
|
if (inventory.ContainsKey(name))
|
||||||
{
|
{
|
||||||
inventory[name] = Mathf.Max(inventory[name] - quantity, 0);
|
inventory[name] = Mathf.Max(inventory[name] - quantity, 0);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
else
|
|
||||||
{
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
// Start is called before the first frame update
|
|
||||||
void Start()
|
|
||||||
{
|
|
||||||
foreach(TempInventoryBuilderItem item in initialInvent)
|
|
||||||
{
|
|
||||||
inventory[item.name] = item.quantity;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// Update is called once per frame
|
|
||||||
void Update()
|
|
||||||
{
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
}
|
@ -1,16 +1,13 @@
|
|||||||
using System.Collections;
|
|
||||||
using System.Collections.Generic;
|
|
||||||
using UnityEngine;
|
using UnityEngine;
|
||||||
|
|
||||||
[RequireComponent(typeof(Collider))]
|
[RequireComponent(typeof(Collider))]
|
||||||
[RequireComponent(typeof(Rigidbody))]
|
[RequireComponent(typeof(Rigidbody))]
|
||||||
public abstract class CarryableItem : MonoBehaviour
|
public abstract class CarryableItem : MonoBehaviour
|
||||||
{
|
{
|
||||||
[SerializeField]
|
[SerializeField] private string itemName;
|
||||||
private string itemName;
|
|
||||||
public string ItemName { get { return this.itemName; } }
|
|
||||||
[SerializeField]
|
|
||||||
private int itemSize = 1;
|
|
||||||
public int ItemSize { get { return this.itemSize; } }
|
|
||||||
|
|
||||||
|
[SerializeField] private int itemSize = 1;
|
||||||
|
|
||||||
|
public string ItemName => itemName;
|
||||||
|
public int ItemSize => itemSize;
|
||||||
}
|
}
|
@ -1,77 +1,66 @@
|
|||||||
using System.Collections;
|
|
||||||
using System.Collections.Generic;
|
|
||||||
using UnityEngine;
|
using UnityEngine;
|
||||||
|
|
||||||
public class DoorInteractable : HeavyItemReceiver
|
public class DoorInteractable : HeavyItemReceiver
|
||||||
{
|
{
|
||||||
[SerializeField]
|
[SerializeField] private Transform powerCoreCenter;
|
||||||
private Transform powerCoreCenter;
|
|
||||||
|
[SerializeField] private float minAttractDist = 5;
|
||||||
|
|
||||||
|
[SerializeField] private string nameSearched = "Power Core";
|
||||||
|
|
||||||
|
[SerializeField] private Animator[] anims;
|
||||||
|
|
||||||
private HeavyInteractableItem insertedCore;
|
private HeavyInteractableItem insertedCore;
|
||||||
private Vector3 priorLocalPos;
|
private Vector3 priorLocalPos;
|
||||||
private Vector3 priorLocalRot;
|
private Vector3 priorLocalRot;
|
||||||
private Vector3 priorScale;
|
private Vector3 priorScale;
|
||||||
|
|
||||||
[SerializeField]
|
public bool Powered => insertedCore != null;
|
||||||
private float minAttractDist = 5;
|
|
||||||
[SerializeField]
|
|
||||||
private string nameSearched = "Power Core";
|
|
||||||
|
|
||||||
public bool Powered { get { return this.insertedCore!= null; } }
|
|
||||||
[SerializeField]
|
|
||||||
private Animator[] anims;
|
|
||||||
// Start is called before the first frame update
|
// Start is called before the first frame update
|
||||||
void Start()
|
private void Start()
|
||||||
{
|
{
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Update is called once per frame
|
// Update is called once per frame
|
||||||
void Update()
|
private void Update()
|
||||||
{
|
{
|
||||||
foreach(Animator anim in anims)
|
foreach (var anim in anims) anim.SetBool("IsPowered", Powered);
|
||||||
{
|
|
||||||
anim.SetBool("IsPowered", Powered);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
|
||||||
public override bool Interact()
|
public override bool Interact()
|
||||||
{
|
{
|
||||||
//print("INTERACTED!");
|
//print("INTERACTED!");
|
||||||
if(this.insertedCore== null)
|
if (insertedCore == null)
|
||||||
{
|
{
|
||||||
HeavyInteractableItem[] worldHeavyItems = GameObject.FindObjectsOfType<HeavyInteractableItem>();
|
var worldHeavyItems = FindObjectsOfType<HeavyInteractableItem>();
|
||||||
//print("Found:" + worldHeavyItems.Length);
|
//print("Found:" + worldHeavyItems.Length);
|
||||||
for(int i = 0; i < worldHeavyItems.Length; i++)
|
for (var i = 0; i < worldHeavyItems.Length; i++)
|
||||||
{
|
{
|
||||||
HeavyInteractableItem item = worldHeavyItems[i];
|
var item = worldHeavyItems[i];
|
||||||
|
|
||||||
if (!item.ItemName.Contains(nameSearched))
|
if (!item.ItemName.Contains(nameSearched)) continue;
|
||||||
{
|
var dist = Vector3.Distance(item.transform.position, powerCoreCenter.transform.position);
|
||||||
continue;
|
|
||||||
}
|
|
||||||
float dist = Vector3.Distance(item.transform.position, powerCoreCenter.transform.position);
|
|
||||||
//print("DIST:" + dist);
|
//print("DIST:" + dist);
|
||||||
if (dist <= minAttractDist)
|
if (dist <= minAttractDist)
|
||||||
{
|
{
|
||||||
Inventory _i = PlayerInteractionHandler.instance.Inventory;
|
var _i = PlayerInteractionHandler.instance.Inventory;
|
||||||
this.Interact(ref _i, ref item);
|
Interact(ref _i, ref item);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
public override bool Interact(ref Inventory inventory,ref HeavyInteractableItem heavyInvent)
|
|
||||||
|
public override bool Interact(ref Inventory inventory, ref HeavyInteractableItem heavyInvent)
|
||||||
{
|
{
|
||||||
//print("INTERACTED 2");
|
//print("INTERACTED 2");
|
||||||
// print(heavyInvent);
|
// print(heavyInvent);
|
||||||
|
|
||||||
if (heavyInvent!=null&&heavyInvent.ItemName.Contains(nameSearched))
|
if (heavyInvent != null && heavyInvent.ItemName.Contains(nameSearched))
|
||||||
{
|
{
|
||||||
//print("DOOR OPEN!");
|
//print("DOOR OPEN!");
|
||||||
heavyInvent.GetComponent<Rigidbody>().isKinematic = true;
|
heavyInvent.GetComponent<Rigidbody>().isKinematic = true;
|
||||||
@ -92,7 +81,8 @@ public class DoorInteractable : HeavyItemReceiver
|
|||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
else if(insertedCore!=null&&heavyInvent==null)
|
|
||||||
|
if (insertedCore != null && heavyInvent == null)
|
||||||
{
|
{
|
||||||
heavyInvent = insertedCore;
|
heavyInvent = insertedCore;
|
||||||
|
|
||||||
@ -100,9 +90,7 @@ public class DoorInteractable : HeavyItemReceiver
|
|||||||
//get ref of player perhaps
|
//get ref of player perhaps
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
else
|
|
||||||
{
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
|
||||||
}
|
}
|
@ -1,70 +1,69 @@
|
|||||||
using System.Collections;
|
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using UnityEngine;
|
using UnityEngine;
|
||||||
using UnityEngine.AI;
|
using UnityEngine.AI;
|
||||||
|
|
||||||
public class FlareBeacon : MonoBehaviour
|
public class FlareBeacon : MonoBehaviour
|
||||||
{
|
{
|
||||||
[SerializeField]
|
[SerializeField] private float range = 1;
|
||||||
private float range = 1;
|
|
||||||
public float Range { get { return range; }}
|
|
||||||
[SerializeField]
|
|
||||||
private float duration = 5f;
|
|
||||||
|
|
||||||
private List<GameObject> inRange= new List<GameObject>();
|
[SerializeField] private float duration = 5f;
|
||||||
[SerializeField]
|
|
||||||
private NavMeshObstacle obstacle;
|
[SerializeField] private NavMeshObstacle obstacle;
|
||||||
|
|
||||||
|
private readonly List<GameObject> inRange = new();
|
||||||
|
|
||||||
private FlareRegister register;
|
private FlareRegister register;
|
||||||
void OnDrawGizmosSelected()
|
|
||||||
|
public float Range => range;
|
||||||
|
|
||||||
|
// Start is called before the first frame update
|
||||||
|
private void Start()
|
||||||
|
{
|
||||||
|
register = FlareRegister.instance;
|
||||||
|
register.beacons.Add(this);
|
||||||
|
transform.localEulerAngles = new Vector3(-89.98f, 0, 0);
|
||||||
|
var r = new Ray();
|
||||||
|
r.direction = -transform.forward;
|
||||||
|
r.origin = transform.position;
|
||||||
|
RaycastHit hit;
|
||||||
|
var rays = Physics.RaycastAll(r);
|
||||||
|
foreach (var _hit in rays)
|
||||||
|
{
|
||||||
|
if (_hit.transform.gameObject.GetComponent<FlareBeacon>() != null) continue;
|
||||||
|
transform.position = _hit.point;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (Physics.Raycast(r, out hit))
|
||||||
|
{
|
||||||
|
// transform.position = hit.point;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (obstacle != null)
|
||||||
|
obstacle.radius = range / 10;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Update is called once per frame
|
||||||
|
private void Update()
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
private void OnDrawGizmosSelected()
|
||||||
{
|
{
|
||||||
// Draw a yellow sphere at the transform's position
|
// Draw a yellow sphere at the transform's position
|
||||||
Gizmos.color = Color.yellow;
|
Gizmos.color = Color.yellow;
|
||||||
|
|
||||||
Gizmos.DrawWireSphere(transform.position, range);
|
Gizmos.DrawWireSphere(transform.position, range);
|
||||||
}
|
}
|
||||||
// Start is called before the first frame update
|
|
||||||
void Start()
|
|
||||||
{
|
|
||||||
register = FlareRegister.instance;
|
|
||||||
register.beacons.Add(this);
|
|
||||||
transform.localEulerAngles = new Vector3(-89.98f, 0, 0);
|
|
||||||
Ray r = new Ray();
|
|
||||||
r.direction = -transform.forward;
|
|
||||||
r.origin = transform.position;
|
|
||||||
RaycastHit hit;
|
|
||||||
RaycastHit[] rays = Physics.RaycastAll(r);
|
|
||||||
foreach(RaycastHit _hit in rays)
|
|
||||||
{
|
|
||||||
if (_hit.transform.gameObject.GetComponent<FlareBeacon>() != null)
|
|
||||||
{
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
transform.position = _hit.point;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
if(Physics.Raycast(r,out hit)){
|
|
||||||
// transform.position = hit.point;
|
|
||||||
}
|
|
||||||
|
|
||||||
if(obstacle!=null)
|
|
||||||
obstacle.radius = this.range / 10;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Update is called once per frame
|
|
||||||
void Update()
|
|
||||||
{
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
private void OnTriggerEnter(Collider other)
|
private void OnTriggerEnter(Collider other)
|
||||||
{
|
{
|
||||||
inRange.Add(other.gameObject);
|
inRange.Add(other.gameObject);
|
||||||
}
|
}
|
||||||
|
|
||||||
private void OnTriggerExit(Collider other)
|
private void OnTriggerExit(Collider other)
|
||||||
{
|
{
|
||||||
inRange.Remove(other.gameObject);
|
inRange.Remove(other.gameObject);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
@ -1,27 +1,21 @@
|
|||||||
using System.Collections;
|
|
||||||
using System.Collections.Generic;
|
|
||||||
using UnityEngine;
|
|
||||||
|
|
||||||
public class GenericInteractable : InteractableItem
|
public class GenericInteractable : InteractableItem
|
||||||
{
|
{
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
private void Awake()
|
private void Awake()
|
||||||
{
|
{
|
||||||
BaseAwake();
|
BaseAwake();
|
||||||
}
|
}
|
||||||
|
|
||||||
private void Start()
|
private void Start()
|
||||||
{
|
{
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public override bool Interact()
|
public override bool Interact()
|
||||||
{
|
{
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
public override bool Interact(ref Inventory inventory, ref HeavyInteractableItem heavyInvent)
|
public override bool Interact(ref Inventory inventory, ref HeavyInteractableItem heavyInvent)
|
||||||
{
|
{
|
||||||
return this.Interact();
|
return Interact();
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
@ -1,42 +1,18 @@
|
|||||||
using System.Collections;
|
|
||||||
using System.Collections.Generic;
|
|
||||||
using UnityEngine;
|
using UnityEngine;
|
||||||
|
|
||||||
public class HeavyInteractableItem : InteractableItem
|
public class HeavyInteractableItem : InteractableItem
|
||||||
{
|
{
|
||||||
private Vector3 init_rot;
|
private Vector3 init_rot;
|
||||||
|
|
||||||
// Start is called before the first frame update
|
// Start is called before the first frame update
|
||||||
void Start()
|
private void Start()
|
||||||
{
|
{
|
||||||
init_rot = transform.eulerAngles;
|
init_rot = transform.eulerAngles;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Update is called once per frame
|
// Update is called once per frame
|
||||||
void Update()
|
private void Update()
|
||||||
{
|
{
|
||||||
|
|
||||||
}
|
|
||||||
public void DisableAll()
|
|
||||||
{
|
|
||||||
this.GetComponent<Collider>().enabled = false;
|
|
||||||
|
|
||||||
}
|
|
||||||
public override bool Interact()
|
|
||||||
{
|
|
||||||
//Todo
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
public override bool Interact(ref Inventory inventory,ref HeavyInteractableItem heavyInvent)
|
|
||||||
{
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
public void EnableAll()
|
|
||||||
{
|
|
||||||
this.GetComponent<Collider>().enabled = true;
|
|
||||||
this.transform.eulerAngles = new Vector3(init_rot.x,transform.eulerAngles.y,init_rot.z);
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private void FixedUpdate()
|
private void FixedUpdate()
|
||||||
@ -44,4 +20,27 @@ public class HeavyInteractableItem : InteractableItem
|
|||||||
BaseFixedUpdate();
|
BaseFixedUpdate();
|
||||||
//print("Alpha Target:"+ base.target_alpha);
|
//print("Alpha Target:"+ base.target_alpha);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void DisableAll()
|
||||||
|
{
|
||||||
|
GetComponent<Collider>().enabled = false;
|
||||||
|
}
|
||||||
|
|
||||||
|
public override bool Interact()
|
||||||
|
{
|
||||||
|
//Todo
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
public override bool Interact(ref Inventory inventory, ref HeavyInteractableItem heavyInvent)
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public void EnableAll()
|
||||||
|
{
|
||||||
|
GetComponent<Collider>().enabled = true;
|
||||||
|
transform.eulerAngles = new Vector3(init_rot.x, transform.eulerAngles.y, init_rot.z);
|
||||||
|
}
|
||||||
}
|
}
|
@ -1,13 +1,9 @@
|
|||||||
using System.Collections;
|
|
||||||
using System.Collections.Generic;
|
|
||||||
using UnityEngine;
|
using UnityEngine;
|
||||||
|
|
||||||
public abstract class HeavyItemReceiver : InteractableItem
|
public abstract class HeavyItemReceiver : InteractableItem
|
||||||
{
|
{
|
||||||
protected HeavyInteractableItem item;
|
[SerializeField] [Tooltip("Specify the keyword search in the name of the item!")]
|
||||||
[SerializeField]
|
|
||||||
[Tooltip("Specify the keyword search in the name of the item!")]
|
|
||||||
protected string searchString;
|
protected string searchString;
|
||||||
|
|
||||||
|
protected HeavyInteractableItem item;
|
||||||
}
|
}
|
@ -1,32 +1,37 @@
|
|||||||
using System.Collections;
|
|
||||||
using System.Collections.Generic;
|
|
||||||
using UnityEngine;
|
|
||||||
using TMPro;
|
using TMPro;
|
||||||
|
using UnityEngine;
|
||||||
using UnityEngine.UI;
|
using UnityEngine.UI;
|
||||||
|
|
||||||
|
|
||||||
[RequireComponent(typeof(Collider))]
|
[RequireComponent(typeof(Collider))]
|
||||||
[RequireComponent(typeof(Rigidbody))]
|
[RequireComponent(typeof(Rigidbody))]
|
||||||
public abstract class InteractableItem : CarryableItem
|
public abstract class InteractableItem : CarryableItem
|
||||||
{
|
{
|
||||||
|
[SerializeField] private Canvas interactionCanvas;
|
||||||
|
|
||||||
|
[SerializeField] protected bool canPickup;
|
||||||
|
|
||||||
[SerializeField]
|
|
||||||
private Canvas interactionCanvas;
|
|
||||||
private TMP_Text[] interaction_texts;
|
|
||||||
private Image[] interaction_images;
|
private Image[] interaction_images;
|
||||||
protected float target_alpha = 0;
|
private TMP_Text[] interaction_texts;
|
||||||
[SerializeField]
|
protected bool isEnabled;
|
||||||
protected bool canPickup = false;
|
protected float target_alpha;
|
||||||
protected bool isEnabled = false;
|
|
||||||
|
|
||||||
public bool CanPickup { get { return canPickup; } }
|
public bool CanPickup => canPickup;
|
||||||
public bool IsEnabled { get { return isEnabled; } }
|
public bool IsEnabled => isEnabled;
|
||||||
|
|
||||||
|
private void Awake()
|
||||||
|
{
|
||||||
|
BaseAwake();
|
||||||
|
}
|
||||||
|
|
||||||
|
private void FixedUpdate()
|
||||||
|
{
|
||||||
|
BaseFixedUpdate();
|
||||||
|
}
|
||||||
|
|
||||||
public void Enable()
|
public void Enable()
|
||||||
{
|
{
|
||||||
//print("Enabled!");
|
//print("Enabled!");
|
||||||
interactionCanvas.transform.LookAt((GameObject.FindGameObjectWithTag("MainCamera").transform.position));
|
interactionCanvas.transform.LookAt(GameObject.FindGameObjectWithTag("MainCamera").transform.position);
|
||||||
interactionCanvas.transform.Rotate(0, 180, 0);
|
interactionCanvas.transform.Rotate(0, 180, 0);
|
||||||
target_alpha = 1;
|
target_alpha = 1;
|
||||||
isEnabled = true;
|
isEnabled = true;
|
||||||
@ -38,40 +43,26 @@ public abstract class InteractableItem : CarryableItem
|
|||||||
target_alpha = 0;
|
target_alpha = 0;
|
||||||
isEnabled = true;
|
isEnabled = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
public abstract bool Interact();
|
public abstract bool Interact();
|
||||||
public abstract bool Interact(ref Inventory inventory,ref HeavyInteractableItem heavyInvent);
|
public abstract bool Interact(ref Inventory inventory, ref HeavyInteractableItem heavyInvent);
|
||||||
|
|
||||||
protected void BaseAwake()
|
protected void BaseAwake()
|
||||||
{
|
{
|
||||||
interaction_texts = interactionCanvas.GetComponentsInChildren<TMP_Text>();
|
interaction_texts = interactionCanvas.GetComponentsInChildren<TMP_Text>();
|
||||||
interaction_images = interactionCanvas.GetComponentsInChildren<Image>();
|
interaction_images = interactionCanvas.GetComponentsInChildren<Image>();
|
||||||
foreach (TMP_Text text in interaction_texts)
|
foreach (var text in interaction_texts) text.color = new Color(text.color.r, text.color.g, text.color.b, 0);
|
||||||
{
|
foreach (var image in interaction_images)
|
||||||
text.color = new Color(text.color.r, text.color.g, text.color.b, 0);
|
|
||||||
}
|
|
||||||
foreach (Image image in interaction_images)
|
|
||||||
{
|
|
||||||
image.color = new Color(image.color.r, image.color.g, image.color.b, 0);
|
image.color = new Color(image.color.r, image.color.g, image.color.b, 0);
|
||||||
}
|
}
|
||||||
}
|
|
||||||
protected void BaseFixedUpdate()
|
protected void BaseFixedUpdate()
|
||||||
{
|
{
|
||||||
foreach (TMP_Text text in interaction_texts)
|
foreach (var text in interaction_texts)
|
||||||
{
|
text.color = Color.Lerp(new Color(text.color.r, text.color.g, text.color.b, text.color.a),
|
||||||
text.color = Color.Lerp(new Color(text.color.r, text.color.g, text.color.b, text.color.a), new Color(text.color.r, text.color.g, text.color.b, target_alpha), 10 * Time.deltaTime);
|
new Color(text.color.r, text.color.g, text.color.b, target_alpha), 10 * Time.deltaTime);
|
||||||
}
|
foreach (var image in interaction_images)
|
||||||
foreach (Image image in interaction_images)
|
image.color = Color.Lerp(new Color(image.color.r, image.color.g, image.color.b, image.color.a),
|
||||||
{
|
new Color(image.color.r, image.color.g, image.color.b, target_alpha), 10 * Time.deltaTime);
|
||||||
image.color = Color.Lerp(new Color(image.color.r, image.color.g, image.color.b, image.color.a), new Color(image.color.r, image.color.g, image.color.b, target_alpha), 10 * Time.deltaTime);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
private void Awake()
|
|
||||||
{
|
|
||||||
BaseAwake();
|
|
||||||
}
|
|
||||||
private void FixedUpdate()
|
|
||||||
{
|
|
||||||
BaseFixedUpdate();
|
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -1,29 +1,29 @@
|
|||||||
using System.Collections;
|
using System;
|
||||||
using System.Collections.Generic;
|
|
||||||
using UnityEngine;
|
using UnityEngine;
|
||||||
|
|
||||||
public class KeyItem : InteractableItem
|
public class KeyItem : InteractableItem
|
||||||
{
|
{
|
||||||
[SerializeField]
|
[SerializeField] private string keyName;
|
||||||
private string keyName;
|
|
||||||
public string KeyName { get { return keyName; } }
|
public string KeyName => keyName;
|
||||||
|
|
||||||
|
|
||||||
private void Awake()
|
private void Awake()
|
||||||
{
|
{
|
||||||
BaseAwake();
|
BaseAwake();
|
||||||
}
|
}
|
||||||
|
|
||||||
private void Start()
|
private void Start()
|
||||||
{
|
{
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public override bool Interact()
|
public override bool Interact()
|
||||||
{
|
{
|
||||||
throw new System.NotImplementedException();
|
throw new NotImplementedException();
|
||||||
}
|
|
||||||
public override bool Interact(ref Inventory inventory,ref HeavyInteractableItem heavyInvent)
|
|
||||||
{
|
|
||||||
return this.Interact();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public override bool Interact(ref Inventory inventory, ref HeavyInteractableItem heavyInvent)
|
||||||
|
{
|
||||||
|
return Interact();
|
||||||
|
}
|
||||||
}
|
}
|
@ -1,42 +1,40 @@
|
|||||||
using System.Collections;
|
|
||||||
using System.Collections.Generic;
|
|
||||||
using UnityEngine;
|
using UnityEngine;
|
||||||
|
|
||||||
public class BulletComponent : MonoBehaviour
|
public class BulletComponent : MonoBehaviour
|
||||||
{
|
{
|
||||||
[SerializeField]
|
[SerializeField] private float duration = 5f;
|
||||||
private float duration = 5f;
|
|
||||||
private float existed = 0f;
|
[SerializeField] private string type = "flare";
|
||||||
[SerializeField]
|
|
||||||
private string type = "flare";
|
[SerializeField] private float damageRange = 20f;
|
||||||
|
|
||||||
|
[SerializeField] private float damageMagnitude = 1f;
|
||||||
|
|
||||||
|
private float existed;
|
||||||
private FlareRegister register;
|
private FlareRegister register;
|
||||||
[SerializeField]
|
public float DamageMagnitude => damageMagnitude;
|
||||||
private float damageRange = 20f;
|
public float DamageRange => damageRange;
|
||||||
[SerializeField]
|
|
||||||
private float damageMagnitude = 1f;
|
|
||||||
public float DamageMagnitude { get { return this.damageMagnitude; } }
|
|
||||||
public float DamageRange { get { return damageRange; } }
|
|
||||||
|
|
||||||
// Start is called before the first frame update
|
// Start is called before the first frame update
|
||||||
void Start()
|
private void Start()
|
||||||
{
|
{
|
||||||
register = FlareRegister.instance;
|
register = FlareRegister.instance;
|
||||||
register.bullets.Add(this);
|
register.bullets.Add(this);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Update is called once per frame
|
// Update is called once per frame
|
||||||
void Update()
|
private void Update()
|
||||||
{
|
{
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private void FixedUpdate()
|
private void FixedUpdate()
|
||||||
{
|
{
|
||||||
if(existed >= duration)
|
if (existed >= duration)
|
||||||
{
|
{
|
||||||
register.bullets.Remove(this);
|
register.bullets.Remove(this);
|
||||||
Destroy(this.gameObject);
|
Destroy(gameObject);
|
||||||
}
|
}
|
||||||
existed += Time.fixedDeltaTime;
|
|
||||||
|
|
||||||
|
existed += Time.fixedDeltaTime;
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -1,28 +1,27 @@
|
|||||||
using System.Collections;
|
|
||||||
using System.Collections.Generic;
|
|
||||||
using UnityEngine;
|
using UnityEngine;
|
||||||
|
|
||||||
public class PistolAnimationAimAssist : MonoBehaviour
|
public class PistolAnimationAimAssist : MonoBehaviour
|
||||||
{
|
{
|
||||||
public Transform leftShoulder;
|
public Transform leftShoulder;
|
||||||
public Transform rightShoulder;
|
public Transform rightShoulder;
|
||||||
[SerializeField]
|
|
||||||
private bool isEnabled = false;
|
|
||||||
|
|
||||||
Vector3 lTarget;
|
[SerializeField] private bool isEnabled;
|
||||||
Vector3 rTarget;
|
|
||||||
private Animator anim;
|
private Animator anim;
|
||||||
|
|
||||||
|
private Vector3 lTarget;
|
||||||
|
private Vector3 rTarget;
|
||||||
|
|
||||||
// Start is called before the first frame update
|
// Start is called before the first frame update
|
||||||
void Start()
|
private void Start()
|
||||||
{
|
{
|
||||||
lTarget = new Vector3(72.9f, 122.2f, -129.9f);
|
lTarget = new Vector3(72.9f, 122.2f, -129.9f);
|
||||||
rTarget = new Vector3(82f, 11f, -88f);
|
rTarget = new Vector3(82f, 11f, -88f);
|
||||||
anim =GetComponent<Animator>();
|
anim = GetComponent<Animator>();
|
||||||
}
|
}
|
||||||
|
|
||||||
// Update is called once per frame
|
// Update is called once per frame
|
||||||
void Update()
|
private void Update()
|
||||||
{
|
{
|
||||||
if (isEnabled)
|
if (isEnabled)
|
||||||
{
|
{
|
||||||
@ -33,10 +32,12 @@ public class PistolAnimationAimAssist : MonoBehaviour
|
|||||||
anim.StartPlayback();
|
anim.StartPlayback();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public void Enable()
|
public void Enable()
|
||||||
{
|
{
|
||||||
isEnabled = true;
|
isEnabled = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void Disable()
|
public void Disable()
|
||||||
{
|
{
|
||||||
isEnabled = false;
|
isEnabled = false;
|
||||||
|
@ -1,127 +1,124 @@
|
|||||||
using System.Collections;
|
|
||||||
using System.Collections.Generic;
|
|
||||||
using Unity.Burst.CompilerServices;
|
|
||||||
using UnityEngine;
|
using UnityEngine;
|
||||||
using UnityEngine.VFX;
|
using UnityEngine.VFX;
|
||||||
|
|
||||||
public class PistolComponent : MonoBehaviour
|
public class PistolComponent : MonoBehaviour
|
||||||
{
|
{
|
||||||
|
public enum AimMode
|
||||||
|
{
|
||||||
|
GUN,
|
||||||
|
MODIFIED,
|
||||||
|
CAMERA
|
||||||
|
}
|
||||||
|
|
||||||
public enum AimMode {GUN,MODIFIED,CAMERA};
|
|
||||||
public AimMode aimMode = AimMode.CAMERA;
|
public AimMode aimMode = AimMode.CAMERA;
|
||||||
[SerializeField]
|
|
||||||
private Light targetingLight;
|
[SerializeField] private Light targetingLight;
|
||||||
|
|
||||||
|
[SerializeField] private GameObject targetObjectPrefab;
|
||||||
|
|
||||||
|
[SerializeField] public GameObject projectilePrefab;
|
||||||
|
|
||||||
|
[SerializeField] public string projectileName;
|
||||||
|
|
||||||
|
[SerializeField] private Transform bulletSpawnPoint;
|
||||||
|
|
||||||
|
[SerializeField] private float firePower = 20f;
|
||||||
|
|
||||||
|
[SerializeField] private float maxProjectileDuration = 5f;
|
||||||
|
|
||||||
|
[SerializeField] private float maxTargetObjDistance = 15f;
|
||||||
|
|
||||||
|
[SerializeField] private VisualEffect shootEffect;
|
||||||
|
|
||||||
|
[SerializeField] private Light shootLight;
|
||||||
|
|
||||||
|
[SerializeField] private float shootLightDuration = 0.1f;
|
||||||
|
|
||||||
|
[SerializeField] private LayerMask ignoreLayers;
|
||||||
|
|
||||||
|
private bool hasCloseTarget;
|
||||||
|
|
||||||
|
|
||||||
private bool IsEnabled = false;
|
private bool IsEnabled;
|
||||||
|
|
||||||
GameObject targetObject;
|
private GameObject targetObject;
|
||||||
|
private float timeSinceLightDuration;
|
||||||
[SerializeField]
|
public bool IsLightOn => targetingLight.gameObject.activeSelf;
|
||||||
GameObject targetObjectPrefab;
|
|
||||||
[SerializeField]
|
|
||||||
public GameObject projectilePrefab;
|
|
||||||
[SerializeField]
|
|
||||||
public string projectileName;
|
|
||||||
[SerializeField]
|
|
||||||
private Transform bulletSpawnPoint;
|
|
||||||
[SerializeField]
|
|
||||||
private float firePower = 20f;
|
|
||||||
[SerializeField]
|
|
||||||
private float maxProjectileDuration = 5f;
|
|
||||||
[SerializeField]
|
|
||||||
private float maxTargetObjDistance = 15f;
|
|
||||||
[SerializeField]
|
|
||||||
private VisualEffect shootEffect;
|
|
||||||
[SerializeField]
|
|
||||||
private Light shootLight;
|
|
||||||
[SerializeField]
|
|
||||||
private float shootLightDuration = 0.1f;
|
|
||||||
private float timeSinceLightDuration = 0f;
|
|
||||||
|
|
||||||
private bool hasCloseTarget = false;
|
|
||||||
[SerializeField]
|
|
||||||
private LayerMask ignoreLayers;
|
|
||||||
|
|
||||||
//private Dictionary<int,float> projectiles = new Dictionary<int, float>();
|
//private Dictionary<int,float> projectiles = new Dictionary<int, float>();
|
||||||
|
|
||||||
// Start is called before the first frame update
|
// Start is called before the first frame update
|
||||||
void Start()
|
private void Start()
|
||||||
{
|
{
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Update is called once per frame
|
// Update is called once per frame
|
||||||
void Update()
|
private void Update()
|
||||||
{
|
{
|
||||||
timeSinceLightDuration += Time.deltaTime;
|
timeSinceLightDuration += Time.deltaTime;
|
||||||
}
|
}
|
||||||
private float CalculateDrop(Vector3 origin,Vector3 destination,Vector3 force)
|
|
||||||
{
|
|
||||||
// Calculate the initial velocity required to reach the destination.
|
|
||||||
Vector3 displacement = destination - origin;
|
|
||||||
float time = Mathf.Sqrt(2f * displacement.magnitude / Physics.gravity.magnitude);
|
|
||||||
Vector3 velocity = (displacement - 0.5f * Physics.gravity * time * time) / time + force;
|
|
||||||
|
|
||||||
// Calculate the height the object will reach during its flight.
|
|
||||||
float maxHeight = origin.y + velocity.y * time - 0.5f * Physics.gravity.y * time * time;
|
|
||||||
|
|
||||||
// Calculate the distance the object will drop during its flight.
|
|
||||||
float dropDistance = maxHeight - destination.y;
|
|
||||||
|
|
||||||
return dropDistance;
|
|
||||||
}
|
|
||||||
private void FixedUpdate()
|
private void FixedUpdate()
|
||||||
{
|
{
|
||||||
if (shootLight.gameObject.activeSelf&&timeSinceLightDuration>shootLightDuration)
|
if (shootLight.gameObject.activeSelf && timeSinceLightDuration > shootLightDuration)
|
||||||
{
|
|
||||||
shootLight.gameObject.SetActive(false);
|
shootLight.gameObject.SetActive(false);
|
||||||
}
|
if (aimMode == AimMode.CAMERA) targetObject.gameObject.transform.position = PlayerAim.active.targetPosition;
|
||||||
if (aimMode==AimMode.CAMERA)
|
if (IsEnabled && aimMode != AimMode.CAMERA)
|
||||||
{
|
{
|
||||||
targetObject.gameObject.transform.position = PlayerAim.active.targetPosition;
|
var ray = new Ray(transform.position, transform.up);
|
||||||
}
|
|
||||||
if (this.IsEnabled&&aimMode!=AimMode.CAMERA)
|
|
||||||
{
|
|
||||||
Ray ray = new Ray(transform.position, transform.up);
|
|
||||||
RaycastHit hit;
|
RaycastHit hit;
|
||||||
if (Physics.Raycast(ray, out hit, 50,ignoreLayers))
|
if (Physics.Raycast(ray, out hit, 50, ignoreLayers))
|
||||||
{
|
{
|
||||||
|
var hitDist = Vector3.Distance(hit.point, transform.position);
|
||||||
float hitDist = Vector3.Distance(hit.point, transform.position);
|
|
||||||
if (hitDist < maxTargetObjDistance)
|
if (hitDist < maxTargetObjDistance)
|
||||||
{
|
{
|
||||||
targetObject.gameObject.transform.position = hit.point;
|
targetObject.gameObject.transform.position = hit.point;
|
||||||
|
|
||||||
targetObject.gameObject.GetComponent<MeshRenderer>().materials[0].SetColor("_EmissiveColor", new Color(255, 0,0));
|
targetObject.gameObject.GetComponent<MeshRenderer>().materials[0]
|
||||||
|
.SetColor("_EmissiveColor", new Color(255, 0, 0));
|
||||||
//Track if we have a close target
|
//Track if we have a close target
|
||||||
hasCloseTarget = true;
|
hasCloseTarget = true;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
targetObject.gameObject.transform.position = transform.position + (ray.direction * maxTargetObjDistance);
|
targetObject.gameObject.transform.position =
|
||||||
|
transform.position + ray.direction * maxTargetObjDistance;
|
||||||
|
|
||||||
targetObject.gameObject.GetComponent<MeshRenderer>().materials[0].SetColor("_EmissiveColor", new Color(255, 255,255));
|
targetObject.gameObject.GetComponent<MeshRenderer>().materials[0]
|
||||||
|
.SetColor("_EmissiveColor", new Color(255, 255, 255));
|
||||||
//Track if we have a close target
|
//Track if we have a close target
|
||||||
hasCloseTarget = false;
|
hasCloseTarget = false;
|
||||||
}
|
}
|
||||||
//float drop = CalculateDrop(this.bulletSpawnPoint.position, hit.point, this.transform.up * this.firePower);
|
//float drop = CalculateDrop(this.bulletSpawnPoint.position, hit.point, this.transform.up * this.firePower);
|
||||||
//print(drop);
|
//print(drop);
|
||||||
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
targetObject.gameObject.transform.position = transform.position + (ray.direction * maxTargetObjDistance);
|
targetObject.gameObject.transform.position = transform.position + ray.direction * maxTargetObjDistance;
|
||||||
|
|
||||||
targetObject.gameObject.GetComponent<MeshRenderer>().materials[0].SetColor("_EmissiveColor", new Color(255,255,255));
|
targetObject.gameObject.GetComponent<MeshRenderer>().materials[0]
|
||||||
|
.SetColor("_EmissiveColor", new Color(255, 255, 255));
|
||||||
hasCloseTarget = false;
|
hasCloseTarget = false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private float CalculateDrop(Vector3 origin, Vector3 destination, Vector3 force)
|
||||||
|
{
|
||||||
|
// Calculate the initial velocity required to reach the destination.
|
||||||
|
var displacement = destination - origin;
|
||||||
|
var time = Mathf.Sqrt(2f * displacement.magnitude / Physics.gravity.magnitude);
|
||||||
|
var velocity = (displacement - 0.5f * Physics.gravity * time * time) / time + force;
|
||||||
|
|
||||||
|
// Calculate the height the object will reach during its flight.
|
||||||
|
var maxHeight = origin.y + velocity.y * time - 0.5f * Physics.gravity.y * time * time;
|
||||||
|
|
||||||
|
// Calculate the distance the object will drop during its flight.
|
||||||
|
var dropDistance = maxHeight - destination.y;
|
||||||
|
|
||||||
|
return dropDistance;
|
||||||
|
}
|
||||||
|
|
||||||
public void Fire()
|
public void Fire()
|
||||||
{
|
{
|
||||||
Fire(!hasCloseTarget);
|
Fire(!hasCloseTarget);
|
||||||
@ -131,71 +128,62 @@ public class PistolComponent : MonoBehaviour
|
|||||||
{
|
{
|
||||||
shootLightDuration = 0;
|
shootLightDuration = 0;
|
||||||
shootLight.gameObject.SetActive(true);
|
shootLight.gameObject.SetActive(true);
|
||||||
GameObject projectile = Instantiate(projectilePrefab, this.bulletSpawnPoint);
|
var projectile = Instantiate(projectilePrefab, bulletSpawnPoint);
|
||||||
projectile.transform.localPosition = Vector3.zero;
|
projectile.transform.localPosition = Vector3.zero;
|
||||||
projectile.transform.localEulerAngles = Vector3.zero;
|
projectile.transform.localEulerAngles = Vector3.zero;
|
||||||
projectile.transform.localScale = Vector3.one;
|
projectile.transform.localScale = Vector3.one;
|
||||||
Rigidbody pRigid = projectile.GetComponent<Rigidbody>();
|
var pRigid = projectile.GetComponent<Rigidbody>();
|
||||||
|
|
||||||
/*Modified targeting system
|
/*Modified targeting system
|
||||||
1. Since aim direction is vector from camera to ball (where player thinks its gonna go), raycast forward there, till hit. If no hit,
|
1. Since aim direction is vector from camera to ball (where player thinks its gonna go), raycast forward there, till hit. If no hit,
|
||||||
then set target distance to ~50.
|
then set target distance to ~50.
|
||||||
2. Modify launch vector apply modified force
|
2. Modify launch vector apply modified force
|
||||||
*/
|
*/
|
||||||
Vector3 launchVector = pRigid.transform.up * this.firePower;
|
var launchVector = pRigid.transform.up * firePower;
|
||||||
|
|
||||||
if(offsetWithTargetBall||aimMode==AimMode.MODIFIED)
|
if (offsetWithTargetBall || aimMode == AimMode.MODIFIED)
|
||||||
{
|
{
|
||||||
Vector3 ballCamVector = targetObject.transform.position - this.GetComponentInParent<PlayerMovementController>().cam.transform.position;
|
var ballCamVector = targetObject.transform.position -
|
||||||
Ray r = new Ray();
|
GetComponentInParent<PlayerMovementController>().cam.transform.position;
|
||||||
|
var r = new Ray();
|
||||||
r.origin = targetObject.transform.position;
|
r.origin = targetObject.transform.position;
|
||||||
r.direction = ballCamVector.normalized;
|
r.direction = ballCamVector.normalized;
|
||||||
RaycastHit hit;
|
RaycastHit hit;
|
||||||
if (Physics.Raycast(r,out hit,ignoreLayers))
|
if (Physics.Raycast(r, out hit, ignoreLayers))
|
||||||
{
|
{
|
||||||
launchVector = (hit.point - pRigid.transform.position).normalized;
|
launchVector = (hit.point - pRigid.transform.position).normalized;
|
||||||
launchVector *= this.firePower;
|
launchVector *= firePower;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if(aimMode==AimMode.CAMERA)
|
else if (aimMode == AimMode.CAMERA)
|
||||||
{
|
{
|
||||||
Vector3 target = PlayerAim.active.targetPosition;
|
var target = PlayerAim.active.targetPosition;
|
||||||
|
|
||||||
Vector3 lv = target - pRigid.transform.position;
|
var lv = target - pRigid.transform.position;
|
||||||
launchVector = lv.normalized;
|
launchVector = lv.normalized;
|
||||||
launchVector*= this.firePower;
|
launchVector *= firePower;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
pRigid.AddForce(launchVector, ForceMode.Impulse);
|
pRigid.AddForce(launchVector, ForceMode.Impulse);
|
||||||
projectile.transform.parent = null;
|
projectile.transform.parent = null;
|
||||||
shootEffect.Play();
|
shootEffect.Play();
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public void Enable()
|
public void Enable()
|
||||||
{
|
{
|
||||||
IsEnabled = true;
|
IsEnabled = true;
|
||||||
if (targetObject == null)
|
if (targetObject == null) targetObject = Instantiate(targetObjectPrefab);
|
||||||
{
|
}
|
||||||
targetObject = Instantiate(targetObjectPrefab);
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
|
||||||
public void Disable()
|
public void Disable()
|
||||||
{
|
{
|
||||||
IsEnabled = false;
|
IsEnabled = false;
|
||||||
if (targetObject != null)
|
if (targetObject != null) Destroy(targetObject);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public void LightToggle()
|
||||||
{
|
{
|
||||||
Destroy(targetObject);
|
targetingLight.gameObject.SetActive(!targetingLight.gameObject.activeSelf);
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
public void LightToggle() {
|
|
||||||
this.targetingLight.gameObject.SetActive(!this.targetingLight.gameObject.activeSelf);
|
|
||||||
}
|
|
||||||
public bool IsLightOn { get { return this.targetingLight.gameObject.activeSelf; } }
|
|
||||||
|
|
||||||
}
|
}
|
@ -1,24 +1,21 @@
|
|||||||
using System.Collections;
|
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using UnityEngine;
|
using UnityEngine;
|
||||||
|
|
||||||
public class FlareRegister : MonoBehaviour
|
public class FlareRegister : MonoBehaviour
|
||||||
{
|
{
|
||||||
public List<BulletComponent> bullets= new List<BulletComponent>();
|
|
||||||
|
|
||||||
public List<FlareBeacon> beacons= new List<FlareBeacon>();
|
|
||||||
|
|
||||||
public static FlareRegister instance;
|
public static FlareRegister instance;
|
||||||
|
public List<BulletComponent> bullets = new();
|
||||||
|
|
||||||
|
public List<FlareBeacon> beacons = new();
|
||||||
|
|
||||||
// Start is called before the first frame update
|
// Start is called before the first frame update
|
||||||
void Start()
|
private void Start()
|
||||||
{
|
{
|
||||||
instance = this;
|
instance = this;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Update is called once per frame
|
// Update is called once per frame
|
||||||
void Update()
|
private void Update()
|
||||||
{
|
{
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -1,10 +1,10 @@
|
|||||||
using System.Collections;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
|
using TMPro;
|
||||||
using UnityEngine;
|
using UnityEngine;
|
||||||
using UnityEngine.UI;
|
using UnityEngine.UI;
|
||||||
using TMPro;
|
|
||||||
|
|
||||||
[System.Serializable]
|
[Serializable]
|
||||||
public class ItemImageRef
|
public class ItemImageRef
|
||||||
{
|
{
|
||||||
public string name;
|
public string name;
|
||||||
@ -14,116 +14,100 @@ public class ItemImageRef
|
|||||||
|
|
||||||
public class SpecialItemCycler : MonoBehaviour
|
public class SpecialItemCycler : MonoBehaviour
|
||||||
{
|
{
|
||||||
[SerializeField]
|
[SerializeField] private List<ItemImageRef> spawnableItems = new();
|
||||||
private List<ItemImageRef> spawnableItems =new List<ItemImageRef>();
|
|
||||||
[SerializeField]
|
[SerializeField] private List<ItemImageRef> shootableItems = new();
|
||||||
private List<ItemImageRef> shootableItems = new List<ItemImageRef>();
|
|
||||||
|
[SerializeField] private PlayerInteractionHandler interactionHandler;
|
||||||
|
|
||||||
|
[SerializeField] private PistolComponent pistol;
|
||||||
|
|
||||||
[SerializeField]
|
|
||||||
private PlayerInteractionHandler interactionHandler;
|
|
||||||
[SerializeField]
|
|
||||||
private PistolComponent pistol;
|
|
||||||
private int spawnableIndex = 0;
|
|
||||||
private int shootableIndex = 0;
|
|
||||||
[SerializeField]
|
[SerializeField]
|
||||||
//private Inventory invent;
|
//private Inventory invent;
|
||||||
private TempInventory invent;
|
private TempInventory invent;
|
||||||
[SerializeField]
|
|
||||||
private Image selectedImage;
|
[SerializeField] private Image selectedImage;
|
||||||
[SerializeField]
|
|
||||||
private TMP_Text selectedQuantityText;
|
[SerializeField] private TMP_Text selectedQuantityText;
|
||||||
|
|
||||||
|
private int shootableIndex;
|
||||||
|
private int spawnableIndex;
|
||||||
private Color sqtInitColor;
|
private Color sqtInitColor;
|
||||||
|
|
||||||
|
|
||||||
// Start is called before the first frame update
|
// Start is called before the first frame update
|
||||||
void Start()
|
private void Start()
|
||||||
{
|
{
|
||||||
sqtInitColor = selectedQuantityText.color;
|
sqtInitColor = selectedQuantityText.color;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Update is called once per frame
|
// Update is called once per frame
|
||||||
void Update()
|
private void Update()
|
||||||
{
|
{
|
||||||
if (interactionHandler.GunEnabled)
|
if (interactionHandler.GunEnabled)
|
||||||
{
|
{
|
||||||
pistol.projectilePrefab = shootableItems[shootableIndex % shootableItems.Count].item;
|
pistol.projectilePrefab = shootableItems[shootableIndex % shootableItems.Count].item;
|
||||||
pistol.projectileName = shootableItems[shootableIndex % shootableItems.Count].name;
|
pistol.projectileName = shootableItems[shootableIndex % shootableItems.Count].name;
|
||||||
}
|
}
|
||||||
|
|
||||||
SetImage();
|
SetImage();
|
||||||
if (Input.GetButtonDown("CycleItems"))
|
if (Input.GetButtonDown("CycleItems"))
|
||||||
{
|
{
|
||||||
if (interactionHandler.GunEnabled)
|
if (interactionHandler.GunEnabled)
|
||||||
{
|
{
|
||||||
this.shootableIndex = (shootableIndex + 1) % shootableItems.Count;
|
shootableIndex = (shootableIndex + 1) % shootableItems.Count;
|
||||||
selectedImage.sprite = shootableItems[this.shootableIndex].icon;
|
selectedImage.sprite = shootableItems[shootableIndex].icon;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
this.spawnableIndex = (spawnableIndex+1)%spawnableItems.Count;
|
spawnableIndex = (spawnableIndex + 1) % spawnableItems.Count;
|
||||||
selectedImage.sprite = spawnableItems[this.spawnableIndex].icon;
|
selectedImage.sprite = spawnableItems[spawnableIndex].icon;
|
||||||
|
}
|
||||||
|
|
||||||
}
|
|
||||||
if (selectedImage.sprite == null)
|
if (selectedImage.sprite == null)
|
||||||
{
|
|
||||||
selectedImage.color = new Color(selectedImage.color.r, selectedImage.color.g, selectedImage.color.b, 0);
|
selectedImage.color = new Color(selectedImage.color.r, selectedImage.color.g, selectedImage.color.b, 0);
|
||||||
}
|
|
||||||
else
|
else
|
||||||
{
|
|
||||||
selectedImage.color = new Color(selectedImage.color.r, selectedImage.color.g, selectedImage.color.b, 1);
|
selectedImage.color = new Color(selectedImage.color.r, selectedImage.color.g, selectedImage.color.b, 1);
|
||||||
}
|
}
|
||||||
}
|
|
||||||
if (Input.GetButtonDown("TempPlace"))
|
if (Input.GetButtonDown("TempPlace"))
|
||||||
|
if (invent.GetQuantityOf(spawnableItems[spawnableIndex].name) > 0)
|
||||||
|
if (!interactionHandler.GunEnabled && spawnableItems[spawnableIndex].item != null)
|
||||||
{
|
{
|
||||||
if (invent.GetQuantityOf(spawnableItems[spawnableIndex].name)>0)
|
var prefab = spawnableItems[spawnableIndex].item;
|
||||||
if (!interactionHandler.GunEnabled && spawnableItems[spawnableIndex].item!= null)
|
var instance = Instantiate(prefab, interactionHandler.CarryingPos);
|
||||||
{
|
|
||||||
GameObject prefab = spawnableItems[spawnableIndex].item;
|
|
||||||
GameObject instance = Instantiate(prefab,interactionHandler.CarryingPos);
|
|
||||||
instance.transform.localPosition = Vector3.zero;
|
instance.transform.localPosition = Vector3.zero;
|
||||||
instance.transform.parent = null;
|
instance.transform.parent = null;
|
||||||
invent.Remove(spawnableItems[spawnableIndex].name);
|
invent.Remove(spawnableItems[spawnableIndex].name);
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void SetImage()
|
||||||
}
|
|
||||||
|
|
||||||
void SetImage()
|
|
||||||
{
|
{
|
||||||
|
|
||||||
if (interactionHandler.GunEnabled)
|
if (interactionHandler.GunEnabled)
|
||||||
{
|
{
|
||||||
|
selectedImage.sprite = shootableItems[shootableIndex].icon;
|
||||||
selectedImage.sprite = shootableItems[this.shootableIndex].icon;
|
selectedQuantityText.text = invent.GetQuantityOf(shootableItems[shootableIndex].name).ToString();
|
||||||
selectedQuantityText.text = invent.GetQuantityOf(shootableItems[this.shootableIndex].name).ToString();
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
selectedImage.sprite = spawnableItems[spawnableIndex].icon;
|
||||||
selectedImage.sprite = spawnableItems[this.spawnableIndex].icon;
|
selectedQuantityText.text = invent.GetQuantityOf(spawnableItems[spawnableIndex].name).ToString();
|
||||||
selectedQuantityText.text = invent.GetQuantityOf(spawnableItems[this.spawnableIndex].name).ToString();
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (selectedImage.sprite == null)
|
if (selectedImage.sprite == null)
|
||||||
{
|
{
|
||||||
selectedImage.color = new Color(selectedImage.color.r, selectedImage.color.g, selectedImage.color.b, 0);
|
selectedImage.color = new Color(selectedImage.color.r, selectedImage.color.g, selectedImage.color.b, 0);
|
||||||
selectedQuantityText.gameObject.SetActive(false);
|
selectedQuantityText.gameObject.SetActive(false);
|
||||||
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
selectedImage.color = new Color(selectedImage.color.r, selectedImage.color.g, selectedImage.color.b, 1);
|
selectedImage.color = new Color(selectedImage.color.r, selectedImage.color.g, selectedImage.color.b, 1);
|
||||||
selectedQuantityText.gameObject.SetActive(true);
|
selectedQuantityText.gameObject.SetActive(true);
|
||||||
if (selectedQuantityText.text == "0")
|
if (selectedQuantityText.text == "0")
|
||||||
{
|
|
||||||
selectedQuantityText.color = Color.red;
|
selectedQuantityText.color = Color.red;
|
||||||
}
|
|
||||||
else
|
else
|
||||||
{
|
|
||||||
selectedQuantityText.color = sqtInitColor;
|
selectedQuantityText.color = sqtInitColor;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
}
|
}
|
@ -1,233 +1,195 @@
|
|||||||
|
using System;
|
||||||
using System.Collections;
|
using System.Collections;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using UnityEngine;
|
using UnityEngine;
|
||||||
|
|
||||||
|
|
||||||
public class BasicLevelProgressionSystem : MonoBehaviour
|
public class BasicLevelProgressionSystem : MonoBehaviour
|
||||||
{
|
{
|
||||||
[SerializeField]
|
|
||||||
private ObjectiveText objectiveGui;
|
|
||||||
[SerializeField]
|
|
||||||
private WaypointMarker marker;
|
|
||||||
[SerializeField]
|
|
||||||
private PlayerComponent player;
|
|
||||||
//[SerializeField]
|
|
||||||
//private float minDist = 3;
|
|
||||||
|
|
||||||
[SerializeField]
|
|
||||||
private List<ProgressionSection> sections;
|
|
||||||
public List<ProgressionSection> Sections { get { return sections; } }
|
|
||||||
//Fire1 is click or A
|
//Fire1 is click or A
|
||||||
//Place is F or "Y" button
|
//Place is F or "Y" button
|
||||||
//Cycle is Tab or RB
|
//Cycle is Tab or RB
|
||||||
//Siwtch is Shift or "X"
|
//Siwtch is Shift or "X"
|
||||||
public enum InputType { FIRE1, PLACE, CYCLE, SWITCH, COLLISION, LOCATION,AIM,EXTERNAL};
|
public enum InputType
|
||||||
private int progress = 0;
|
{
|
||||||
private bool transitioning = false;
|
FIRE1,
|
||||||
|
PLACE,
|
||||||
|
CYCLE,
|
||||||
|
SWITCH,
|
||||||
|
COLLISION,
|
||||||
|
LOCATION,
|
||||||
|
AIM,
|
||||||
|
EXTERNAL
|
||||||
|
}
|
||||||
|
|
||||||
|
[SerializeField] private ObjectiveText objectiveGui;
|
||||||
|
|
||||||
|
[SerializeField] private WaypointMarker marker;
|
||||||
|
|
||||||
|
[SerializeField] private PlayerComponent player;
|
||||||
|
//[SerializeField]
|
||||||
|
//private float minDist = 3;
|
||||||
|
|
||||||
|
[SerializeField] private List<ProgressionSection> sections;
|
||||||
|
|
||||||
|
private int progress;
|
||||||
|
private bool transitioning;
|
||||||
|
public List<ProgressionSection> Sections => sections;
|
||||||
|
|
||||||
// Start is called before the first frame update
|
// Start is called before the first frame update
|
||||||
void Start()
|
private void Start()
|
||||||
{
|
{
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Update is called once per frame
|
// Update is called once per frame
|
||||||
void Update()
|
private void Update()
|
||||||
{
|
{
|
||||||
|
var cur = getCurrent().getActive();
|
||||||
Transform cur = this.getCurrent().getActive();
|
if (cur != null)
|
||||||
if(cur != null)
|
|
||||||
{
|
{
|
||||||
if (!this.getCurrent().objectiveOneMet)
|
if (!getCurrent().objectiveOneMet)
|
||||||
{
|
{
|
||||||
marker.target = cur;
|
marker.target = cur;
|
||||||
objectiveGui.visualObjects[0].text.text = this.getCurrent().instruction1;
|
objectiveGui.visualObjects[0].text.text = getCurrent().instruction1;
|
||||||
objectiveGui.visualObjects[1].text.text = this.getCurrent().istruction2;
|
objectiveGui.visualObjects[1].text.text = getCurrent().istruction2;
|
||||||
}
|
}
|
||||||
else if(!this.getCurrent().objectiveTwoMet)
|
else if (!getCurrent().objectiveTwoMet)
|
||||||
{
|
{
|
||||||
marker.target = cur;
|
marker.target = cur;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if(Input.GetButtonDown("Fire1")||Input.GetAxis("Fire1")>0.5f&&!transitioning)
|
if (Input.GetButtonDown("Fire1") || (Input.GetAxis("Fire1") > 0.5f && !transitioning))
|
||||||
{
|
|
||||||
ProgressCurrentIfInput(InputType.FIRE1);
|
ProgressCurrentIfInput(InputType.FIRE1);
|
||||||
}
|
if (Input.GetButtonDown("TempPlace")) ProgressCurrentIfInput(InputType.PLACE);
|
||||||
if (Input.GetButtonDown("TempPlace"))
|
if (Input.GetButtonDown("CycleItems")) ProgressCurrentIfInput(InputType.CYCLE);
|
||||||
{
|
if (Input.GetButtonDown("Fire3")) ProgressCurrentIfInput(InputType.SWITCH);
|
||||||
ProgressCurrentIfInput(InputType.PLACE);
|
if (Input.GetAxis("Aim") > .5f || Input.GetButtonDown("Aim"))
|
||||||
}
|
if (!transitioning)
|
||||||
if (Input.GetButtonDown("CycleItems"))
|
|
||||||
{
|
|
||||||
ProgressCurrentIfInput(InputType.CYCLE);
|
|
||||||
}
|
|
||||||
if(Input.GetButtonDown("Fire3"))
|
|
||||||
{
|
|
||||||
|
|
||||||
ProgressCurrentIfInput(InputType.SWITCH);
|
|
||||||
}
|
|
||||||
if(Input.GetAxis("Aim")>.5f || Input.GetButtonDown("Aim"))
|
|
||||||
{
|
|
||||||
if(!transitioning)
|
|
||||||
ProgressCurrentIfInput(InputType.AIM);
|
ProgressCurrentIfInput(InputType.AIM);
|
||||||
}
|
|
||||||
|
|
||||||
if (Vector3.Distance(player.transform.position, this.getCurrent().getActive().position) < 3)
|
if (Vector3.Distance(player.transform.position, getCurrent().getActive().position) < 3)
|
||||||
{
|
{
|
||||||
bool canIterate= this.getCurrent().Iterate();
|
var canIterate = getCurrent().Iterate();
|
||||||
if (!canIterate)
|
if (!canIterate)
|
||||||
{
|
{
|
||||||
if (!this.getCurrent().objectiveOneMet && this.getCurrent().conditionalOne == InputType.LOCATION)
|
if (!getCurrent().objectiveOneMet && getCurrent().conditionalOne == InputType.LOCATION)
|
||||||
{
|
|
||||||
OnePassed();
|
OnePassed();
|
||||||
}else if (this.getCurrent().objectiveOneMet && this.getCurrent().conditionalTwo == InputType.LOCATION && !this.getCurrent().objectiveTwoMet)
|
else if (getCurrent().objectiveOneMet && getCurrent().conditionalTwo == InputType.LOCATION &&
|
||||||
{
|
!getCurrent().objectiveTwoMet) TwoPassed();
|
||||||
TwoPassed();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
|
||||||
private void OnTriggerEnter(Collider other)
|
private void OnTriggerEnter(Collider other)
|
||||||
{
|
{
|
||||||
if (other.gameObject.GetComponentInParent<PlayerComponent>() != null)
|
if (other.gameObject.GetComponentInParent<PlayerComponent>() != null) ProgressCurrentIfCollide();
|
||||||
{
|
|
||||||
ProgressCurrentIfCollide();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void ProgressCurrentIfCollide()
|
private void ProgressCurrentIfCollide()
|
||||||
{
|
{
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private void OnePassed()
|
private void OnePassed()
|
||||||
{
|
{
|
||||||
this.getCurrent().objectiveOneMet = true;
|
getCurrent().objectiveOneMet = true;
|
||||||
this.getCurrent().Progress();
|
getCurrent().Progress();
|
||||||
|
|
||||||
this.objectiveGui.visualObjects[0].isComplete = true;
|
objectiveGui.visualObjects[0].isComplete = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void TwoPassed()
|
public void TwoPassed()
|
||||||
{
|
{
|
||||||
if (transitioning)
|
if (transitioning) return;
|
||||||
{
|
getCurrent().objectiveTwoMet = true;
|
||||||
return;
|
objectiveGui.visualObjects[1].isComplete = true;
|
||||||
}
|
objectiveGui.FadeOut();
|
||||||
this.getCurrent().objectiveTwoMet = true;
|
|
||||||
this.objectiveGui.visualObjects[1].isComplete = true;
|
|
||||||
this.objectiveGui.FadeOut();
|
|
||||||
transitioning = true;
|
transitioning = true;
|
||||||
StartCoroutine(waitForFadeIn());
|
StartCoroutine(waitForFadeIn());
|
||||||
}
|
}
|
||||||
|
|
||||||
public void ProgressCurrentIfInput(InputType type)
|
public void ProgressCurrentIfInput(InputType type)
|
||||||
{
|
{
|
||||||
|
if (getCurrent().AtEnd() && getCurrent().conditionalOne == type && !getCurrent().objectiveOneMet)
|
||||||
if (this.getCurrent().AtEnd() && this.getCurrent().conditionalOne == type&&!this.getCurrent().objectiveOneMet)
|
|
||||||
{
|
|
||||||
OnePassed();
|
OnePassed();
|
||||||
}else if(this.getCurrent().AtEnd() && this.getCurrent().conditionalTwo == type)
|
else if (getCurrent().AtEnd() && getCurrent().conditionalTwo == type) TwoPassed();
|
||||||
{
|
|
||||||
TwoPassed();
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public ProgressionSection getCurrent()
|
public ProgressionSection getCurrent()
|
||||||
{
|
{
|
||||||
|
return sections[progress];
|
||||||
return this.sections[progress];
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private IEnumerator waitForFadeIn()
|
private IEnumerator waitForFadeIn()
|
||||||
{
|
{
|
||||||
|
|
||||||
yield return new WaitForSeconds(3);
|
yield return new WaitForSeconds(3);
|
||||||
if (this.sections.Count > this.progress+1)
|
if (sections.Count > progress + 1)
|
||||||
{
|
{
|
||||||
this.progress++;
|
progress++;
|
||||||
this.objectiveGui.FadeIn();
|
objectiveGui.FadeIn();
|
||||||
this.objectiveGui.visualObjects[0].isComplete = false;
|
objectiveGui.visualObjects[0].isComplete = false;
|
||||||
this.objectiveGui.visualObjects[1].isComplete = false;
|
objectiveGui.visualObjects[1].isComplete = false;
|
||||||
}
|
}
|
||||||
else
|
|
||||||
{
|
|
||||||
|
|
||||||
}
|
|
||||||
transitioning = false;
|
transitioning = false;
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
[Serializable]
|
||||||
[System.Serializable]
|
|
||||||
public class ProgressionSection
|
public class ProgressionSection
|
||||||
{
|
{
|
||||||
[SerializeField]
|
[SerializeField] public string instruction1;
|
||||||
public string instruction1;
|
|
||||||
[SerializeField]
|
[SerializeField] public string istruction2;
|
||||||
public string istruction2;
|
|
||||||
[SerializeField]
|
[SerializeField] public bool objectiveOneMet;
|
||||||
public bool objectiveOneMet = false;
|
|
||||||
[SerializeField]
|
[SerializeField] public BasicLevelProgressionSystem.InputType conditionalOne;
|
||||||
public BasicLevelProgressionSystem.InputType conditionalOne;
|
|
||||||
[SerializeField]
|
[SerializeField] public bool objectiveTwoMet;
|
||||||
public bool objectiveTwoMet = false;
|
|
||||||
[SerializeField]
|
[SerializeField] public BasicLevelProgressionSystem.InputType conditionalTwo;
|
||||||
public BasicLevelProgressionSystem.InputType conditionalTwo;
|
|
||||||
|
[SerializeField] public List<Transform> positionsOne = new();
|
||||||
|
|
||||||
|
[SerializeField] public List<Transform> positionsTwo = new();
|
||||||
|
|
||||||
|
[HideInInspector] public int activePosition;
|
||||||
|
|
||||||
[SerializeField]
|
|
||||||
public List<Transform> positionsOne= new List<Transform>();
|
|
||||||
[SerializeField]
|
|
||||||
public List<Transform> positionsTwo = new List<Transform>();
|
|
||||||
[HideInInspector]
|
|
||||||
public int activePosition = 0;
|
|
||||||
public Transform getActive()
|
public Transform getActive()
|
||||||
{
|
{
|
||||||
if (!objectiveOneMet)
|
if (!objectiveOneMet)
|
||||||
{
|
|
||||||
return positionsOne[activePosition];
|
return positionsOne[activePosition];
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
|
|
||||||
return positionsTwo[activePosition];
|
return positionsTwo[activePosition];
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
|
||||||
public bool Iterate()
|
public bool Iterate()
|
||||||
{
|
{
|
||||||
if (!objectiveOneMet && this.activePosition + 1 < positionsOne.Count)
|
if (!objectiveOneMet && activePosition + 1 < positionsOne.Count)
|
||||||
{
|
{
|
||||||
this.activePosition += 1;
|
activePosition += 1;
|
||||||
return true;
|
|
||||||
}else if (objectiveOneMet && !objectiveTwoMet && this.activePosition + 1 < positionsTwo.Count)
|
|
||||||
{
|
|
||||||
this.activePosition += 1;
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
return false;
|
|
||||||
|
|
||||||
|
if (objectiveOneMet && !objectiveTwoMet && activePosition + 1 < positionsTwo.Count)
|
||||||
|
{
|
||||||
|
activePosition += 1;
|
||||||
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
public bool AtEnd()
|
public bool AtEnd()
|
||||||
{
|
{
|
||||||
if (!objectiveOneMet && this.activePosition + 1 < positionsOne.Count)
|
if (!objectiveOneMet && activePosition + 1 < positionsOne.Count)
|
||||||
{
|
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
}
|
if (objectiveOneMet && !objectiveTwoMet && activePosition + 1 < positionsTwo.Count) return false;
|
||||||
else if (objectiveOneMet && !objectiveTwoMet && this.activePosition + 1 < positionsTwo.Count)
|
|
||||||
{
|
|
||||||
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void Progress()
|
public void Progress()
|
||||||
{
|
{
|
||||||
this.activePosition = 0;
|
activePosition = 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -5,60 +5,55 @@ using UnityEngine.SceneManagement;
|
|||||||
|
|
||||||
public class LevelZeroSpecial : MonoBehaviour
|
public class LevelZeroSpecial : MonoBehaviour
|
||||||
{
|
{
|
||||||
|
|
||||||
//[SerializeField]
|
//[SerializeField]
|
||||||
//private int initalPlaceIndex = 0;
|
//private int initalPlaceIndex = 0;
|
||||||
[SerializeField]
|
[SerializeField] private DoorInteractable recepticleOne;
|
||||||
private DoorInteractable recepticleOne;
|
|
||||||
|
|
||||||
[SerializeField]
|
[SerializeField] private BasicLevelProgressionSystem progression;
|
||||||
private BasicLevelProgressionSystem progression;
|
|
||||||
[SerializeField]
|
|
||||||
private int enabledOn = 4;
|
|
||||||
private bool isEnabled = false;
|
|
||||||
|
|
||||||
[SerializeField]
|
[SerializeField] private int enabledOn = 4;
|
||||||
private List<HeavyInteractableItem> powercores;
|
|
||||||
[SerializeField]
|
[SerializeField] private List<HeavyInteractableItem> powercores;
|
||||||
private List<DoorInteractable> recepticals;
|
|
||||||
[SerializeField]
|
[SerializeField] private List<DoorInteractable> recepticals;
|
||||||
private WaypointMarker marker;
|
|
||||||
|
[SerializeField] private WaypointMarker marker;
|
||||||
|
|
||||||
|
[SerializeField] private Animator cover;
|
||||||
|
|
||||||
|
[SerializeField] private Animator gate;
|
||||||
|
|
||||||
|
[SerializeField] private GameObject exitCollider;
|
||||||
|
|
||||||
|
[SerializeField] private PlayerComponent player;
|
||||||
|
|
||||||
|
[SerializeField] private WaypointMarker marker2Ref;
|
||||||
|
|
||||||
|
[SerializeField] private WaypointMarker marker3Ref;
|
||||||
|
|
||||||
|
[SerializeField] private Optimizer finalRoomOptimizer;
|
||||||
|
|
||||||
|
private int countPowered;
|
||||||
|
private bool isEnabled;
|
||||||
|
|
||||||
|
private readonly List<WaypointMarker> markers = new();
|
||||||
|
|
||||||
|
private bool transitioningOut;
|
||||||
|
|
||||||
private List<WaypointMarker> markers=new List<WaypointMarker>();
|
|
||||||
private int countPowered = 0;
|
|
||||||
[SerializeField]
|
|
||||||
private Animator cover;
|
|
||||||
[SerializeField]
|
|
||||||
private Animator gate;
|
|
||||||
private bool transitioningOut = false;
|
|
||||||
[SerializeField]
|
|
||||||
private GameObject exitCollider;
|
|
||||||
[SerializeField]
|
|
||||||
private PlayerComponent player;
|
|
||||||
[SerializeField]
|
|
||||||
WaypointMarker marker2Ref;
|
|
||||||
[SerializeField]
|
|
||||||
WaypointMarker marker3Ref;
|
|
||||||
[SerializeField]
|
|
||||||
private Optimizer finalRoomOptimizer;
|
|
||||||
// Start is called before the first frame update
|
// Start is called before the first frame update
|
||||||
void Start()
|
private void Start()
|
||||||
{
|
{
|
||||||
marker2Ref.gameObject.SetActive(false);
|
marker2Ref.gameObject.SetActive(false);
|
||||||
marker3Ref.gameObject.SetActive(false);
|
marker3Ref.gameObject.SetActive(false);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Update is called once per frame
|
// Update is called once per frame
|
||||||
void Update()
|
private void Update()
|
||||||
{
|
{
|
||||||
if (progression.Sections[0] == progression.getCurrent())
|
if (progression.Sections[0] == progression.getCurrent())
|
||||||
{
|
|
||||||
if (recepticleOne.Powered)
|
if (recepticleOne.Powered)
|
||||||
{
|
|
||||||
progression.TwoPassed();
|
progression.TwoPassed();
|
||||||
//progression.ProgressCurrentIfInput(BasicLevelProgressionSystem.InputType.EXTERNAL);
|
//progression.ProgressCurrentIfInput(BasicLevelProgressionSystem.InputType.EXTERNAL);
|
||||||
}
|
|
||||||
}
|
|
||||||
countPowered = 0;
|
countPowered = 0;
|
||||||
if (progression.Sections[enabledOn] == progression.getCurrent() && !isEnabled)
|
if (progression.Sections[enabledOn] == progression.getCurrent() && !isEnabled)
|
||||||
{
|
{
|
||||||
@ -73,21 +68,17 @@ public class LevelZeroSpecial : MonoBehaviour
|
|||||||
|
|
||||||
markers.Add(marker2Ref);
|
markers.Add(marker2Ref);
|
||||||
markers.Add(marker3Ref);
|
markers.Add(marker3Ref);
|
||||||
|
|
||||||
}
|
}
|
||||||
if (isEnabled)
|
|
||||||
{
|
|
||||||
|
|
||||||
foreach (DoorInteractable recepitcal in recepticals)
|
if (isEnabled)
|
||||||
{
|
foreach (var recepitcal in recepticals)
|
||||||
if (recepitcal.Powered)
|
if (recepitcal.Powered)
|
||||||
{
|
{
|
||||||
countPowered++;
|
countPowered++;
|
||||||
for(int i = 0; i < markers.Count; i++)
|
for (var i = 0; i < markers.Count; i++)
|
||||||
{
|
{
|
||||||
WaypointMarker marker = markers[i];
|
var marker = markers[i];
|
||||||
if (marker.gameObject.activeInHierarchy)
|
if (marker.gameObject.activeInHierarchy)
|
||||||
{
|
|
||||||
if (marker.target == recepitcal.transform)
|
if (marker.target == recepitcal.transform)
|
||||||
{
|
{
|
||||||
marker.gameObject.SetActive(false);
|
marker.gameObject.SetActive(false);
|
||||||
@ -96,10 +87,6 @@ public class LevelZeroSpecial : MonoBehaviour
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if (countPowered == 3 && !transitioningOut)
|
if (countPowered == 3 && !transitioningOut)
|
||||||
{
|
{
|
||||||
//transition to cutscene
|
//transition to cutscene
|
||||||
@ -107,20 +94,15 @@ public class LevelZeroSpecial : MonoBehaviour
|
|||||||
transitioningOut = true;
|
transitioningOut = true;
|
||||||
gate.Play("Open");
|
gate.Play("Open");
|
||||||
finalRoomOptimizer.Enable();
|
finalRoomOptimizer.Enable();
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (transitioningOut)
|
if (transitioningOut)
|
||||||
{
|
|
||||||
if (player.transform.position.z > exitCollider.transform.position.z)
|
if (player.transform.position.z > exitCollider.transform.position.z)
|
||||||
{
|
|
||||||
StartCoroutine(transitionOut());
|
StartCoroutine(transitionOut());
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
IEnumerator transitionOut()
|
private IEnumerator transitionOut()
|
||||||
{
|
{
|
||||||
cover.Play("Cover_load_out");
|
cover.Play("Cover_load_out");
|
||||||
yield return new WaitForSeconds(1);
|
yield return new WaitForSeconds(1);
|
||||||
|
@ -1,47 +1,59 @@
|
|||||||
using System.Collections;
|
using System.Collections;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Linq;
|
|
||||||
using TMPro;
|
using TMPro;
|
||||||
using UnityEngine;
|
using UnityEngine;
|
||||||
using UnityEngine.UI;
|
|
||||||
using UnityEngine.SceneManagement;
|
using UnityEngine.SceneManagement;
|
||||||
|
using UnityEngine.UI;
|
||||||
|
|
||||||
public class MainMenuManager : MonoBehaviour
|
public class MainMenuManager : MonoBehaviour
|
||||||
{
|
{
|
||||||
private string component = "_FaceDilate";
|
[SerializeField] private TMP_Text title;
|
||||||
[SerializeField]
|
|
||||||
private TMP_Text title;
|
[SerializeField] private List<TMP_Text> textList = new();
|
||||||
[SerializeField]
|
|
||||||
private List<TMP_Text> textList= new List<TMP_Text>();
|
[SerializeField] private float dilateSpeed = 0.1f;
|
||||||
private List<float> initDilates= new List<float>();
|
|
||||||
private List<float> dilates= new List<float>();
|
[SerializeField] private Animator cover;
|
||||||
|
|
||||||
|
private readonly string component = "_FaceDilate";
|
||||||
private float dilate = -1;
|
private float dilate = -1;
|
||||||
|
private readonly List<float> dilates = new();
|
||||||
private float initDilate;
|
private float initDilate;
|
||||||
[SerializeField]
|
private readonly List<float> initDilates = new();
|
||||||
float dilateSpeed = 0.1f;
|
private bool transitioning;
|
||||||
[SerializeField]
|
|
||||||
private Animator cover;
|
|
||||||
private bool transitioning = false;
|
|
||||||
|
|
||||||
// Start is called before the first frame update
|
// Start is called before the first frame update
|
||||||
void Start()
|
private void Start()
|
||||||
{
|
{
|
||||||
//initDilate = title.fontSharedMaterials[0].GetFloat(component);
|
//initDilate = title.fontSharedMaterials[0].GetFloat(component);
|
||||||
initDilate = title.fontMaterials[0].GetFloat(component);
|
initDilate = title.fontMaterials[0].GetFloat(component);
|
||||||
|
|
||||||
|
|
||||||
foreach(TMP_Text text in this.textList)
|
foreach (var text in textList)
|
||||||
{
|
{
|
||||||
this.initDilates.Add(text.fontMaterials[0].GetFloat(component));
|
initDilates.Add(text.fontMaterials[0].GetFloat(component));
|
||||||
this.dilates.Add(-1f);
|
dilates.Add(-1f);
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
this.textList[0].GetComponent<Button>().onClick.AddListener(LoadFirstLevel);
|
|
||||||
this.textList[2].GetComponent<Button>().onClick.AddListener(ExitApp);
|
|
||||||
|
|
||||||
|
textList[0].GetComponent<Button>().onClick.AddListener(LoadFirstLevel);
|
||||||
|
textList[2].GetComponent<Button>().onClick.AddListener(ExitApp);
|
||||||
}
|
}
|
||||||
void LoadFirstLevel()
|
|
||||||
|
|
||||||
|
// Update is called once per frame
|
||||||
|
private void Update()
|
||||||
|
{
|
||||||
|
//dilate = Mathf.Min(initDilate, dilate += Time.deltaTime);
|
||||||
|
dilate = Mathf.Lerp(dilate, initDilate, Time.deltaTime * dilateSpeed);
|
||||||
|
title.fontMaterials[0].SetFloat(component, dilate);
|
||||||
|
for (var i = 0; i < textList.Count; i++)
|
||||||
|
{
|
||||||
|
dilates[i] = Mathf.Lerp(dilates[i], initDilates[i], Time.deltaTime * dilateSpeed);
|
||||||
|
textList[i].fontMaterials[0].SetFloat(component, dilates[i]);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private void LoadFirstLevel()
|
||||||
{
|
{
|
||||||
if (!transitioning)
|
if (!transitioning)
|
||||||
{
|
{
|
||||||
@ -49,32 +61,16 @@ public class MainMenuManager : MonoBehaviour
|
|||||||
transitioning = true;
|
transitioning = true;
|
||||||
StartCoroutine(_LoadFirstLevel());
|
StartCoroutine(_LoadFirstLevel());
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private IEnumerator _LoadFirstLevel()
|
private IEnumerator _LoadFirstLevel()
|
||||||
{
|
{
|
||||||
yield return new WaitForSeconds(4);
|
yield return new WaitForSeconds(4);
|
||||||
SceneManager.LoadScene(1);
|
SceneManager.LoadScene(1);
|
||||||
}
|
}
|
||||||
|
|
||||||
void ExitApp()
|
private void ExitApp()
|
||||||
{
|
{
|
||||||
Application.Quit();
|
Application.Quit();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// Update is called once per frame
|
|
||||||
void Update()
|
|
||||||
{
|
|
||||||
//dilate = Mathf.Min(initDilate, dilate += Time.deltaTime);
|
|
||||||
dilate = Mathf.Lerp(dilate, initDilate, Time.deltaTime*dilateSpeed);
|
|
||||||
title.fontMaterials[0].SetFloat(component, dilate);
|
|
||||||
for(int i =0;i<this.textList.Count;i++)
|
|
||||||
{
|
|
||||||
|
|
||||||
dilates[i] = Mathf.Lerp(dilates[i], initDilates[i],Time.deltaTime*dilateSpeed);
|
|
||||||
textList[i].fontMaterials[0].SetFloat(component, dilates[i]);
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
}
|
@ -1,28 +1,18 @@
|
|||||||
using System.Collections;
|
|
||||||
using System.Collections.Generic;
|
|
||||||
using System.Runtime.CompilerServices;
|
|
||||||
using System.Threading;
|
|
||||||
using UnityEngine;
|
using UnityEngine;
|
||||||
|
|
||||||
|
|
||||||
public class CameraController : MonoBehaviour
|
public class CameraController : MonoBehaviour
|
||||||
{
|
{
|
||||||
|
|
||||||
//private float mouseX = 0;
|
//private float mouseX = 0;
|
||||||
//private float mouseY;
|
//private float mouseY;
|
||||||
[SerializeField]
|
[SerializeField] private Camera cam;
|
||||||
private Camera cam;
|
|
||||||
|
|
||||||
|
|
||||||
[SerializeField]
|
[SerializeField] private Transform target;
|
||||||
private Transform target;
|
|
||||||
|
|
||||||
private Vector3 offset;
|
private Vector3 offset;
|
||||||
|
public Vector3 Forward { get; private set; } = Vector3.zero;
|
||||||
|
|
||||||
private Vector3 forward= Vector3.zero;
|
public Vector3 Right { get; private set; } = Vector3.zero;
|
||||||
private Vector3 right = Vector3.zero;
|
|
||||||
public Vector3 Forward { get { return this.forward; } }
|
|
||||||
public Vector3 Right { get { return this.right; } }
|
|
||||||
|
|
||||||
//private float originalDist = 0;
|
//private float originalDist = 0;
|
||||||
//private float newDist = 0;
|
//private float newDist = 0;
|
||||||
@ -30,24 +20,21 @@ public class CameraController : MonoBehaviour
|
|||||||
// private bool isChild = false;
|
// private bool isChild = false;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// Start is called before the first frame update
|
// Start is called before the first frame update
|
||||||
void Start()
|
private void Start()
|
||||||
{
|
{
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Update is called once per frame
|
// Update is called once per frame
|
||||||
void Update()
|
private void Update()
|
||||||
{
|
{
|
||||||
GetMouseLook();
|
GetMouseLook();
|
||||||
//if(target!=null&&!isChild)
|
//if(target!=null&&!isChild)
|
||||||
//transform.position = target.transform.position+offset;
|
//transform.position = target.transform.position+offset;
|
||||||
forward = new Vector3(cam.transform.forward.x, target.transform.forward.y, cam.transform.forward.z);
|
Forward = new Vector3(cam.transform.forward.x, target.transform.forward.y, cam.transform.forward.z);
|
||||||
right = new Vector3(cam.transform.right.x, target.transform.right.y, cam.transform.right.z);
|
Right = new Vector3(cam.transform.right.x, target.transform.right.y, cam.transform.right.z);
|
||||||
}
|
}
|
||||||
|
|
||||||
private void GetMouseLook()
|
private void GetMouseLook()
|
||||||
{
|
{
|
||||||
//mouseX = Input.GetAxis("Mouse X");
|
//mouseX = Input.GetAxis("Mouse X");
|
||||||
@ -59,6 +46,4 @@ public class CameraController : MonoBehaviour
|
|||||||
//Cursor.visible = false;
|
//Cursor.visible = false;
|
||||||
//Cursor.lockState = CursorLockMode.Locked;
|
//Cursor.lockState = CursorLockMode.Locked;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
@ -1,25 +1,51 @@
|
|||||||
using System.Collections;
|
|
||||||
using System.Collections.Generic;
|
|
||||||
using UnityEngine;
|
|
||||||
using Cinemachine;
|
using Cinemachine;
|
||||||
|
using UnityEngine;
|
||||||
|
|
||||||
public class CameraShift : MonoBehaviour
|
public class CameraShift : MonoBehaviour
|
||||||
{
|
{
|
||||||
public static CameraShift active;
|
public static CameraShift active;
|
||||||
[SerializeField]
|
|
||||||
private Camera childCam;
|
[SerializeField] private Camera childCam;
|
||||||
[SerializeField]
|
|
||||||
private Transform offset;
|
[SerializeField] private Transform offset;
|
||||||
|
|
||||||
|
[SerializeField] private float cameraSpeed = 5f;
|
||||||
|
|
||||||
|
[SerializeField] private CinemachineFreeLook freelook;
|
||||||
|
|
||||||
|
[SerializeField] private float initRadius = 3f;
|
||||||
|
|
||||||
|
[SerializeField] private float aimingRadius = 2f;
|
||||||
|
|
||||||
private bool isCenter = true;
|
private bool isCenter = true;
|
||||||
private Vector3 targetOffset;
|
private Vector3 targetOffset;
|
||||||
[SerializeField]
|
|
||||||
private float cameraSpeed = 5f;
|
// Start is called before the first frame update
|
||||||
[SerializeField]
|
private void Start()
|
||||||
private CinemachineFreeLook freelook;
|
{
|
||||||
[SerializeField]
|
targetOffset = Vector3.zero;
|
||||||
private float initRadius = 3f;
|
}
|
||||||
[SerializeField]
|
|
||||||
private float aimingRadius = 2f;
|
// Update is called once per frame
|
||||||
|
private void Update()
|
||||||
|
{
|
||||||
|
active = this;
|
||||||
|
if (isCenter)
|
||||||
|
{
|
||||||
|
targetOffset = Vector3.zero;
|
||||||
|
freelook.m_Orbits[1].m_Radius =
|
||||||
|
Mathf.Lerp(freelook.m_Orbits[1].m_Radius, initRadius, Time.deltaTime * cameraSpeed);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
targetOffset = offset.localPosition;
|
||||||
|
freelook.m_Orbits[1].m_Radius =
|
||||||
|
Mathf.Lerp(freelook.m_Orbits[1].m_Radius, aimingRadius, Time.deltaTime * cameraSpeed);
|
||||||
|
}
|
||||||
|
|
||||||
|
childCam.transform.localPosition =
|
||||||
|
Vector3.Lerp(childCam.transform.localPosition, targetOffset, Time.deltaTime * cameraSpeed);
|
||||||
|
}
|
||||||
//[SerializeField]
|
//[SerializeField]
|
||||||
//private PlayerMovementController movementController;
|
//private PlayerMovementController movementController;
|
||||||
|
|
||||||
@ -28,34 +54,9 @@ public class CameraShift : MonoBehaviour
|
|||||||
{
|
{
|
||||||
isCenter = !isCenter;
|
isCenter = !isCenter;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void SetCenter(bool isCenter)
|
public void SetCenter(bool isCenter)
|
||||||
{
|
{
|
||||||
this.isCenter = isCenter;
|
this.isCenter = isCenter;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Start is called before the first frame update
|
|
||||||
void Start()
|
|
||||||
{
|
|
||||||
targetOffset = Vector3.zero;
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
// Update is called once per frame
|
|
||||||
void Update()
|
|
||||||
{
|
|
||||||
active = this;
|
|
||||||
if (isCenter)
|
|
||||||
{
|
|
||||||
targetOffset= Vector3.zero;
|
|
||||||
freelook.m_Orbits[1].m_Radius = Mathf.Lerp(freelook.m_Orbits[1].m_Radius, initRadius, Time.deltaTime * cameraSpeed);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
targetOffset = offset.localPosition;
|
|
||||||
freelook.m_Orbits[1].m_Radius = Mathf.Lerp(freelook.m_Orbits[1].m_Radius, aimingRadius, Time.deltaTime*cameraSpeed);
|
|
||||||
}
|
|
||||||
childCam.transform.localPosition= Vector3.Lerp(childCam.transform.localPosition, targetOffset, Time.deltaTime*cameraSpeed);
|
|
||||||
}
|
|
||||||
}
|
}
|
@ -1,72 +1,62 @@
|
|||||||
using System.Collections;
|
|
||||||
using System.Collections.Generic;
|
|
||||||
using UnityEngine;
|
using UnityEngine;
|
||||||
using UnityEngine.Rendering;
|
|
||||||
|
|
||||||
public class NoiseVisibilitySettingsManager : MonoBehaviour
|
public class NoiseVisibilitySettingsManager : MonoBehaviour
|
||||||
{
|
{
|
||||||
[SerializeField]
|
[SerializeField] private float sneakNoiseDistance = 5f;
|
||||||
private float sneakNoiseDistance = 5f;
|
|
||||||
[SerializeField]
|
|
||||||
private float runNoiseDistance = 10f;
|
|
||||||
[SerializeField]
|
|
||||||
private float shootNoiseDistance = 30f;
|
|
||||||
[SerializeField]
|
|
||||||
private float standNoiseDistance = 0f;
|
|
||||||
private float noiseDistance = 0f;
|
|
||||||
|
|
||||||
public float SneakNoiseDistance { get { return sneakNoiseDistance; } }
|
[SerializeField] private float runNoiseDistance = 10f;
|
||||||
public float RunNoiseDistance { get { return runNoiseDistance; } }
|
|
||||||
public float ShootNoiseDistance { get { return shootNoiseDistance; } }
|
|
||||||
public float StandNoiseDistance { get { return standNoiseDistance; } }
|
|
||||||
|
|
||||||
public float NoiseDistance { get { return this.noiseDistance; } }
|
[SerializeField] private float shootNoiseDistance = 30f;
|
||||||
|
|
||||||
private float timeSinceLastShot = 0f;
|
[SerializeField] private float standNoiseDistance;
|
||||||
[SerializeField]
|
|
||||||
private float shootNoiseDuration = 2f;
|
[SerializeField] private float shootNoiseDuration = 2f;
|
||||||
private bool isSneaking = false;
|
|
||||||
private bool isRunning = false;
|
private bool isRunning;
|
||||||
|
private bool isSneaking;
|
||||||
|
|
||||||
|
private float timeSinceLastShot;
|
||||||
|
|
||||||
|
public float SneakNoiseDistance => sneakNoiseDistance;
|
||||||
|
public float RunNoiseDistance => runNoiseDistance;
|
||||||
|
public float ShootNoiseDistance => shootNoiseDistance;
|
||||||
|
public float StandNoiseDistance => standNoiseDistance;
|
||||||
|
|
||||||
|
public float NoiseDistance { get; private set; }
|
||||||
|
|
||||||
|
|
||||||
// Start is called before the first frame update
|
// Start is called before the first frame update
|
||||||
void Start()
|
private void Start()
|
||||||
{
|
{
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Update is called once per frame
|
// Update is called once per frame
|
||||||
void Update()
|
private void Update()
|
||||||
{
|
{
|
||||||
if (timeSinceLastShot>0)
|
if (timeSinceLastShot > 0)
|
||||||
{
|
NoiseDistance = shootNoiseDistance;
|
||||||
this.noiseDistance = this.shootNoiseDistance;
|
|
||||||
}
|
|
||||||
else if (isRunning)
|
else if (isRunning)
|
||||||
{
|
NoiseDistance = runNoiseDistance;
|
||||||
this.noiseDistance = this.runNoiseDistance;
|
else if (isSneaking)
|
||||||
}else if (isSneaking)
|
NoiseDistance = sneakNoiseDistance;
|
||||||
{
|
|
||||||
this.noiseDistance = this.sneakNoiseDistance;
|
|
||||||
}
|
|
||||||
else
|
else
|
||||||
{
|
NoiseDistance = standNoiseDistance;
|
||||||
this.noiseDistance = standNoiseDistance;
|
|
||||||
}
|
|
||||||
|
|
||||||
timeSinceLastShot -= Time.deltaTime;
|
timeSinceLastShot -= Time.deltaTime;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void ShotFired()
|
public void ShotFired()
|
||||||
{
|
{
|
||||||
this.timeSinceLastShot = this.shootNoiseDuration;
|
timeSinceLastShot = shootNoiseDuration;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void SetRunning(bool isRunning)
|
public void SetRunning(bool isRunning)
|
||||||
{
|
{
|
||||||
this.isRunning = isRunning;
|
this.isRunning = isRunning;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void SetSneaking(bool isSneaking)
|
public void SetSneaking(bool isSneaking)
|
||||||
{
|
{
|
||||||
this.isSneaking= isSneaking;
|
this.isSneaking = isSneaking;
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -1,28 +1,24 @@
|
|||||||
using System.Collections;
|
|
||||||
using System.Collections.Generic;
|
|
||||||
using UnityEngine;
|
using UnityEngine;
|
||||||
|
|
||||||
public class PlayerAim : MonoBehaviour
|
public class PlayerAim : MonoBehaviour
|
||||||
{
|
{
|
||||||
public static PlayerAim active;
|
public static PlayerAim active;
|
||||||
public Vector3 targetPosition;
|
public Vector3 targetPosition;
|
||||||
|
|
||||||
private Camera cam;
|
private Camera cam;
|
||||||
|
|
||||||
// Start is called before the first frame update
|
// Start is called before the first frame update
|
||||||
void Start()
|
private void Start()
|
||||||
{
|
{
|
||||||
active = this;
|
active = this;
|
||||||
cam = GetComponent<Camera>();
|
cam = GetComponent<Camera>();
|
||||||
}
|
}
|
||||||
|
|
||||||
// Update is called once per frame
|
// Update is called once per frame
|
||||||
void Update()
|
private void Update()
|
||||||
{
|
{
|
||||||
Ray r = new Ray(cam.transform.position,cam.transform.forward);
|
var r = new Ray(cam.transform.position, cam.transform.forward);
|
||||||
RaycastHit hit;
|
RaycastHit hit;
|
||||||
if(Physics.Raycast(r,out hit))
|
if (Physics.Raycast(r, out hit)) targetPosition = hit.point;
|
||||||
{
|
|
||||||
targetPosition = hit.point;
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -1,63 +1,91 @@
|
|||||||
using System.Collections;
|
|
||||||
using System.Collections.Generic;
|
|
||||||
using UnityEngine;
|
using UnityEngine;
|
||||||
|
|
||||||
public class PlayerAnimationController : MonoBehaviour
|
public class PlayerAnimationController : MonoBehaviour
|
||||||
{
|
{
|
||||||
[SerializeField]
|
[SerializeField] private Animator animController;
|
||||||
private Animator animController;
|
|
||||||
[SerializeField]
|
[SerializeField] private string runningParameter;
|
||||||
private string runningParameter;
|
|
||||||
[SerializeField]
|
[SerializeField] private string runningSpeedParameter;
|
||||||
private string runningSpeedParameter;
|
|
||||||
[SerializeField]
|
[SerializeField] private string sideStepSpeedParameter;
|
||||||
private string sideStepSpeedParameter;
|
|
||||||
|
//private bool movementInterrupt = false;
|
||||||
|
[SerializeField] private PlayerInteractionHandler interactionHandler;
|
||||||
|
|
||||||
|
[SerializeField] private PlayerMovementController movement;
|
||||||
|
|
||||||
|
//private float verticalAiming = 0;
|
||||||
|
[SerializeField] private Camera hiddenCam;
|
||||||
|
|
||||||
|
private bool isRunning;
|
||||||
|
|
||||||
private float runningSpeed;
|
private float runningSpeed;
|
||||||
private float sideStepSpeed;
|
private float sideStepSpeed;
|
||||||
|
|
||||||
private bool isRunning;
|
// Start is called before the first frame update
|
||||||
//private bool movementInterrupt = false;
|
private void Start()
|
||||||
[SerializeField]
|
{
|
||||||
private PlayerInteractionHandler interactionHandler;
|
}
|
||||||
[SerializeField]
|
|
||||||
private PlayerMovementController movement;
|
|
||||||
|
|
||||||
//private float verticalAiming = 0;
|
// Update is called once per frame
|
||||||
[SerializeField]
|
private void Update()
|
||||||
private Camera hiddenCam;
|
{
|
||||||
|
animController.SetBool("IsCarrying", interactionHandler.IsCarrying);
|
||||||
|
animController.SetBool("HasGun", interactionHandler.GunEnabled);
|
||||||
|
|
||||||
public void Animate(Vector2 movement,bool jump,bool isMoving)
|
if (interactionHandler.GunEnabled && !interactionHandler.isDead && movement.AllowRotation)
|
||||||
|
{
|
||||||
|
if (hiddenCam.transform.localEulerAngles.x < 90)
|
||||||
|
{
|
||||||
|
//DOWN
|
||||||
|
var target = Mathf.Lerp(animController.GetLayerWeight(3), hiddenCam.transform.localEulerAngles.x / 70f,
|
||||||
|
Time.deltaTime * 10f);
|
||||||
|
animController.SetLayerWeight(3, target);
|
||||||
|
animController.SetLayerWeight(2, 0);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
//UP
|
||||||
|
animController.SetLayerWeight(3, 0);
|
||||||
|
var target = Mathf.Lerp(animController.GetLayerWeight(2),
|
||||||
|
(360f - hiddenCam.transform.localEulerAngles.x) / (360f - 300f), Time.deltaTime * 10);
|
||||||
|
animController.SetLayerWeight(2, target);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
animController.SetLayerWeight(2, Mathf.Lerp(animController.GetLayerWeight(2), 0, Time.deltaTime * 10));
|
||||||
|
animController.SetLayerWeight(3, Mathf.Lerp(animController.GetLayerWeight(3), 0, Time.deltaTime * 10));
|
||||||
|
}
|
||||||
|
|
||||||
|
//print("carrying:" + interactionHandler.IsCarrying + " running:"+animController.GetBool(runningParameter)+" running speed:" + animController.GetFloat(runningSpeedParameter));
|
||||||
|
}
|
||||||
|
|
||||||
|
public void Animate(Vector2 movement, bool jump, bool isMoving)
|
||||||
{
|
{
|
||||||
animController.SetFloat(runningSpeedParameter, movement.magnitude);
|
animController.SetFloat(runningSpeedParameter, movement.magnitude);
|
||||||
animController.SetBool(runningParameter,isMoving);
|
animController.SetBool(runningParameter, isMoving);
|
||||||
|
|
||||||
if (this.movement.IsAiming)
|
if (this.movement.IsAiming)
|
||||||
{
|
{
|
||||||
|
|
||||||
animController.SetFloat("StrafingSpeed", movement.x);
|
animController.SetFloat("StrafingSpeed", movement.x);
|
||||||
float dir = 0;
|
float dir = 0;
|
||||||
if (movement.x > 0)
|
if (movement.x > 0)
|
||||||
{
|
|
||||||
dir = 1;
|
dir = 1;
|
||||||
}else if (movement.x < 0)
|
else if (movement.x < 0) dir = -1;
|
||||||
{
|
|
||||||
dir = -1;
|
|
||||||
}
|
|
||||||
animController.SetFloat("StrafingDirection", dir);
|
animController.SetFloat("StrafingDirection", dir);
|
||||||
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
animController.SetFloat("StrafingSpeed", 0);
|
animController.SetFloat("StrafingSpeed", 0);
|
||||||
animController.SetFloat("StrafingDirection", 1);
|
animController.SetFloat("StrafingDirection", 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public void Animate(PlayerQuickAnimationType animation)
|
public void Animate(PlayerQuickAnimationType animation)
|
||||||
{
|
{
|
||||||
switch(animation)
|
switch (animation)
|
||||||
{
|
{
|
||||||
case PlayerQuickAnimationType.Grab:
|
case PlayerQuickAnimationType.Grab:
|
||||||
print("grabbing...");
|
print("grabbing...");
|
||||||
@ -73,51 +101,16 @@ public class PlayerAnimationController : MonoBehaviour
|
|||||||
animController.SetTrigger("WasHit");
|
animController.SetTrigger("WasHit");
|
||||||
animController.SetBool("IsDead", isDead);
|
animController.SetBool("IsDead", isDead);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Start is called before the first frame update
|
|
||||||
void Start()
|
|
||||||
{
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
// Update is called once per frame
|
|
||||||
void Update()
|
|
||||||
{
|
|
||||||
animController.SetBool("IsCarrying", interactionHandler.IsCarrying);
|
|
||||||
animController.SetBool("HasGun",interactionHandler.GunEnabled);
|
|
||||||
|
|
||||||
if (interactionHandler.GunEnabled&&!interactionHandler.isDead&&movement.AllowRotation)
|
|
||||||
{
|
|
||||||
|
|
||||||
|
|
||||||
if (hiddenCam.transform.localEulerAngles.x < 90)
|
|
||||||
{
|
|
||||||
//DOWN
|
|
||||||
float target = Mathf.Lerp(animController.GetLayerWeight(3), hiddenCam.transform.localEulerAngles.x / 70f,Time.deltaTime*10f);
|
|
||||||
animController.SetLayerWeight(3, target);
|
|
||||||
animController.SetLayerWeight(2, 0);
|
|
||||||
|
|
||||||
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
//UP
|
|
||||||
animController.SetLayerWeight(3, 0);
|
|
||||||
float target = Mathf.Lerp(animController.GetLayerWeight(2), (360f - hiddenCam.transform.localEulerAngles.x) / (360f - 300f),Time.deltaTime*10);
|
|
||||||
animController.SetLayerWeight(2, target);
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
animController.SetLayerWeight(2, Mathf.Lerp(animController.GetLayerWeight(2),0,Time.deltaTime*10));
|
|
||||||
animController.SetLayerWeight(3, Mathf.Lerp(animController.GetLayerWeight(3), 0, Time.deltaTime*10));
|
|
||||||
}
|
|
||||||
|
|
||||||
//print("carrying:" + interactionHandler.IsCarrying + " running:"+animController.GetBool(runningParameter)+" running speed:" + animController.GetFloat(runningSpeedParameter));
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public enum PlayerAnimationType {Movement,Action}
|
public enum PlayerAnimationType
|
||||||
public enum PlayerQuickAnimationType { Grab,Shoot}
|
{
|
||||||
|
Movement,
|
||||||
|
Action
|
||||||
|
}
|
||||||
|
|
||||||
|
public enum PlayerQuickAnimationType
|
||||||
|
{
|
||||||
|
Grab,
|
||||||
|
Shoot
|
||||||
|
}
|
@ -1,59 +1,55 @@
|
|||||||
using System.Collections;
|
|
||||||
using System.Collections.Generic;
|
|
||||||
using UnityEngine;
|
|
||||||
using Cinemachine;
|
using Cinemachine;
|
||||||
using TMPro;
|
using UnityEngine;
|
||||||
|
|
||||||
|
|
||||||
public class PlayerComponent : MonoBehaviour
|
public class PlayerComponent : MonoBehaviour
|
||||||
{
|
{
|
||||||
[SerializeField]
|
[SerializeField] private float health = 5f;
|
||||||
private float health = 5f;
|
|
||||||
[SerializeField]
|
[SerializeField] private float maxHealth = 5f;
|
||||||
private float maxHealth = 5f;
|
|
||||||
[SerializeField]
|
[SerializeField] private float stamina = 20f;
|
||||||
private float stamina = 20f;
|
|
||||||
[SerializeField]
|
[SerializeField] private float maxStamina = 20f;
|
||||||
private float maxStamina = 20f;
|
|
||||||
|
|
||||||
[SerializeField] private NoiseVisibilitySettingsManager noiseManager;
|
[SerializeField] private NoiseVisibilitySettingsManager noiseManager;
|
||||||
[SerializeField] private PlayerMovementController movementController;
|
[SerializeField] private PlayerMovementController movementController;
|
||||||
|
|
||||||
public NoiseVisibilitySettingsManager NoiseManager { get { return this.noiseManager; } }
|
[SerializeField] private PlayerAnimationController animationController;
|
||||||
public PlayerMovementController MovementController { get { return movementController; } }
|
|
||||||
[SerializeField]
|
|
||||||
private PlayerAnimationController animationController;
|
|
||||||
|
|
||||||
[HideInInspector]
|
[HideInInspector] public FlareRegister flareRegister;
|
||||||
public FlareRegister flareRegister;
|
|
||||||
[SerializeField]
|
[SerializeField] private CinemachineFreeLook cameraFreeLook;
|
||||||
private CinemachineFreeLook cameraFreeLook;
|
|
||||||
private float shakeTimer = 0;
|
[SerializeField] private float knockbackDuration = 1f;
|
||||||
CinemachineBasicMultiChannelPerlin perlin;
|
|
||||||
[SerializeField]
|
[SerializeField] private float knockbackDistance = 5f;
|
||||||
private float knockbackDuration = 1f;
|
|
||||||
[SerializeField]
|
[SerializeField] private StatsOutputScreen statsOutput;
|
||||||
private float knockbackDistance = 5f;
|
|
||||||
[SerializeField]
|
private CinemachineBasicMultiChannelPerlin perlin;
|
||||||
private StatsOutputScreen statsOutput;
|
private float shakeTimer;
|
||||||
|
|
||||||
|
public NoiseVisibilitySettingsManager NoiseManager => noiseManager;
|
||||||
|
public PlayerMovementController MovementController => movementController;
|
||||||
|
|
||||||
|
[HideInInspector] public bool IsAlive => health > 0;
|
||||||
|
|
||||||
[HideInInspector]
|
|
||||||
public bool IsAlive { get { return this.health > 0; } }
|
|
||||||
private void Awake()
|
private void Awake()
|
||||||
{
|
{
|
||||||
flareRegister = GameObject.FindObjectOfType<FlareRegister>();
|
flareRegister = FindObjectOfType<FlareRegister>();
|
||||||
}
|
}
|
||||||
|
|
||||||
// Start is called before the first frame update
|
// Start is called before the first frame update
|
||||||
void Start()
|
private void Start()
|
||||||
{
|
{
|
||||||
perlin = cameraFreeLook.GetRig(1).GetCinemachineComponent<CinemachineBasicMultiChannelPerlin>();
|
perlin = cameraFreeLook.GetRig(1).GetCinemachineComponent<CinemachineBasicMultiChannelPerlin>();
|
||||||
}
|
}
|
||||||
|
|
||||||
// Update is called once per frame
|
// Update is called once per frame
|
||||||
void Update()
|
private void Update()
|
||||||
{
|
{
|
||||||
NoiseManager.SetRunning(MovementController.IsRunning);
|
NoiseManager.SetRunning(MovementController.IsRunning);
|
||||||
statsOutput.health = this.health;
|
statsOutput.health = health;
|
||||||
statsOutput.stamina = 20f;
|
statsOutput.stamina = 20f;
|
||||||
statsOutput.oxygen = 100f;
|
statsOutput.oxygen = 100f;
|
||||||
|
|
||||||
@ -63,41 +59,14 @@ public class PlayerComponent : MonoBehaviour
|
|||||||
|
|
||||||
// perlin.m_AmplitudeGain = 0;
|
// perlin.m_AmplitudeGain = 0;
|
||||||
perlin.m_AmplitudeGain = Mathf.Lerp(perlin.m_AmplitudeGain, 0, .1f);
|
perlin.m_AmplitudeGain = Mathf.Lerp(perlin.m_AmplitudeGain, 0, .1f);
|
||||||
if (shakeTimer <= 0f)
|
if (shakeTimer <= 0f) perlin.m_AmplitudeGain = 0;
|
||||||
{
|
}
|
||||||
|
|
||||||
perlin.m_AmplitudeGain = 0;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if (!IsAlive)
|
if (!IsAlive)
|
||||||
{
|
{
|
||||||
PlayerInteractionHandler.instance.isDead = true;
|
PlayerInteractionHandler.instance.isDead = true;
|
||||||
movementController.isDead = true;
|
movementController.isDead = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
public void ShakeCamera(float intensity, float time)
|
|
||||||
{
|
|
||||||
CinemachineBasicMultiChannelPerlin perlin = cameraFreeLook.GetRig(1).GetCinemachineComponent<CinemachineBasicMultiChannelPerlin>();
|
|
||||||
perlin.m_AmplitudeGain= intensity;
|
|
||||||
shakeTimer = time;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void SetSensitivity(float magnitude)
|
|
||||||
{
|
|
||||||
movementController.SetSensitivity(magnitude);
|
|
||||||
}
|
|
||||||
|
|
||||||
public void Damage(float damage,bool applyShake=false)
|
|
||||||
{
|
|
||||||
this.health-=damage;
|
|
||||||
if (applyShake)
|
|
||||||
{
|
|
||||||
ShakeCamera(15, 5);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private void OnTriggerEnter(Collider other)
|
private void OnTriggerEnter(Collider other)
|
||||||
@ -105,12 +74,31 @@ public class PlayerComponent : MonoBehaviour
|
|||||||
if (other.CompareTag("Damaging"))
|
if (other.CompareTag("Damaging"))
|
||||||
{
|
{
|
||||||
print("HIT!");
|
print("HIT!");
|
||||||
MonsterComponent monster = other.GetComponentInParent<MonsterComponent>();
|
var monster = other.GetComponentInParent<MonsterComponent>();
|
||||||
|
|
||||||
this.Damage(monster.AttackDamage, monster.ShakeCameraOnHit);
|
Damage(monster.AttackDamage, monster.ShakeCameraOnHit);
|
||||||
animationController.Hit(this.health<=0);
|
animationController.Hit(health <= 0);
|
||||||
this.movementController.PhysicalForceMove((transform.position - monster.transform.position)*knockbackDistance);
|
movementController.PhysicalForceMove((transform.position - monster.transform.position) * knockbackDistance);
|
||||||
this.movementController.LockMovement(this.knockbackDuration);
|
movementController.LockMovement(knockbackDuration);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public void ShakeCamera(float intensity, float time)
|
||||||
|
{
|
||||||
|
var perlin = cameraFreeLook.GetRig(1).GetCinemachineComponent<CinemachineBasicMultiChannelPerlin>();
|
||||||
|
perlin.m_AmplitudeGain = intensity;
|
||||||
|
shakeTimer = time;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void SetSensitivity(float magnitude)
|
||||||
|
{
|
||||||
|
movementController.SetSensitivity(magnitude);
|
||||||
|
}
|
||||||
|
|
||||||
|
public void Damage(float damage, bool applyShake = false)
|
||||||
|
{
|
||||||
|
health -= damage;
|
||||||
|
if (applyShake) ShakeCamera(15, 5);
|
||||||
|
}
|
||||||
}
|
}
|
@ -1,139 +1,98 @@
|
|||||||
using System.Collections;
|
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Linq;
|
|
||||||
using System.Runtime.CompilerServices;
|
|
||||||
using System.Xml;
|
|
||||||
using Unity.VisualScripting;
|
|
||||||
using Unity.VisualScripting.FullSerializer;
|
|
||||||
using UnityEngine;
|
using UnityEngine;
|
||||||
|
|
||||||
[RequireComponent(typeof(Collider))]
|
[RequireComponent(typeof(Collider))]
|
||||||
public class PlayerInteractionHandler : MonoBehaviour
|
public class PlayerInteractionHandler : MonoBehaviour
|
||||||
{
|
{
|
||||||
private List<InteractableItem> itemsInRange= new List<InteractableItem>();
|
|
||||||
private List<HeavyInteractableItem> heavyItemsInRange = new List<HeavyInteractableItem>();
|
|
||||||
private Inventory invent;
|
|
||||||
private TempInventory tempInvent;
|
|
||||||
public Inventory Inventory { get { return invent; } }
|
|
||||||
public static PlayerInteractionHandler instance;
|
public static PlayerInteractionHandler instance;
|
||||||
[SerializeField]
|
|
||||||
private Light flashlight;
|
[SerializeField] private Light flashlight;
|
||||||
[SerializeField]
|
|
||||||
private GameObject flashlight3D;
|
[SerializeField] private GameObject flashlight3D;
|
||||||
|
|
||||||
|
[SerializeField] private int materialIndex = 1;
|
||||||
|
|
||||||
|
[SerializeField] private Transform carryingPos;
|
||||||
|
|
||||||
|
[SerializeField] private bool useItemSelector = true;
|
||||||
|
|
||||||
|
[SerializeField] private PistolComponent pistol;
|
||||||
|
|
||||||
|
[SerializeField] private NoiseVisibilitySettingsManager noiseManager;
|
||||||
|
|
||||||
|
[SerializeField] private CameraShift shift;
|
||||||
|
|
||||||
|
public bool isDead;
|
||||||
|
|
||||||
|
//Check if button down
|
||||||
|
private readonly AxisIsDown fireDown = new("Fire1");
|
||||||
private bool flashlightEnabled = true;
|
private bool flashlightEnabled = true;
|
||||||
[SerializeField]
|
|
||||||
private int materialIndex = 1;
|
|
||||||
private Material selMaterial;
|
|
||||||
private Color initColor;
|
|
||||||
|
|
||||||
private HeavyInteractableItem heavyInvent;
|
private HeavyInteractableItem heavyInvent;
|
||||||
public bool IsCarrying { get { return heavyInvent !=null; } }
|
private readonly List<HeavyInteractableItem> heavyItemsInRange = new();
|
||||||
public bool GunEnabled { get { return this.gunEnabled; } }
|
private Color initColor;
|
||||||
private bool gunEnabled = false;
|
private Inventory invent;
|
||||||
[SerializeField]
|
|
||||||
private Transform carryingPos;
|
|
||||||
public Transform CarryingPos { get { return this.carryingPos; } }
|
|
||||||
|
|
||||||
private ItemSelector itemSelector;
|
private ItemSelector itemSelector;
|
||||||
[SerializeField]
|
private readonly List<InteractableItem> itemsInRange = new();
|
||||||
private bool useItemSelector = true;
|
|
||||||
[SerializeField]
|
|
||||||
private PistolComponent pistol;
|
|
||||||
[SerializeField]
|
|
||||||
private NoiseVisibilitySettingsManager noiseManager;
|
|
||||||
|
|
||||||
private InGameManager manager;
|
private InGameManager manager;
|
||||||
[SerializeField]
|
private Material selMaterial;
|
||||||
private CameraShift shift;
|
private TempInventory tempInvent;
|
||||||
|
public Inventory Inventory => invent;
|
||||||
|
public bool IsCarrying => heavyInvent != null;
|
||||||
|
public bool GunEnabled { get; private set; }
|
||||||
|
|
||||||
public bool isDead = false;
|
public Transform CarryingPos => carryingPos;
|
||||||
//Check if button down
|
|
||||||
private AxisIsDown fireDown = new AxisIsDown("Fire1");
|
|
||||||
|
|
||||||
// Start is called before the first frame update
|
// Start is called before the first frame update
|
||||||
void Start()
|
private void Start()
|
||||||
{
|
{
|
||||||
instance = this;
|
instance = this;
|
||||||
invent = this.transform.parent.GetComponent<Inventory>();
|
invent = transform.parent.GetComponent<Inventory>();
|
||||||
//TEMP FIELD
|
//TEMP FIELD
|
||||||
tempInvent = this.transform.parent.GetComponent<TempInventory>();
|
tempInvent = transform.parent.GetComponent<TempInventory>();
|
||||||
|
|
||||||
initColor = flashlight3D.GetComponent<MeshRenderer>().materials[materialIndex].GetColor("_BaseColor");
|
initColor = flashlight3D.GetComponent<MeshRenderer>().materials[materialIndex].GetColor("_BaseColor");
|
||||||
selMaterial = flashlight3D.GetComponent<MeshRenderer>().materials[materialIndex];
|
selMaterial = flashlight3D.GetComponent<MeshRenderer>().materials[materialIndex];
|
||||||
itemSelector = ItemSelector.instance;
|
itemSelector = ItemSelector.instance;
|
||||||
pistol.gameObject.SetActive(this.gunEnabled);
|
pistol.gameObject.SetActive(GunEnabled);
|
||||||
flashlightEnabled = this.flashlight.gameObject.activeSelf;
|
flashlightEnabled = flashlight.gameObject.activeSelf;
|
||||||
manager = GameObject.FindObjectOfType<InGameManager>();
|
manager = FindObjectOfType<InGameManager>();
|
||||||
}
|
|
||||||
|
|
||||||
private bool receiverInRange(out int index)
|
|
||||||
{
|
|
||||||
int i = 0;
|
|
||||||
foreach(InteractableItem item in this.itemsInRange)
|
|
||||||
{
|
|
||||||
if(item is HeavyItemReceiver)
|
|
||||||
{
|
|
||||||
index = i;
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
i++;
|
|
||||||
}
|
|
||||||
index = -1;
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
private void DropHeavy()
|
|
||||||
{
|
|
||||||
if (heavyInvent != null)
|
|
||||||
{
|
|
||||||
heavyInvent.transform.parent = null;
|
|
||||||
heavyInvent.GetComponent<Rigidbody>().isKinematic = false;
|
|
||||||
heavyInvent.EnableAll();
|
|
||||||
heavyInvent = null;
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Update is called once per frame
|
// Update is called once per frame
|
||||||
void Update()
|
private void Update()
|
||||||
{
|
{
|
||||||
fireDown.Check();
|
fireDown.Check();
|
||||||
if (this.isDead)
|
if (isDead)
|
||||||
{
|
{
|
||||||
DropHeavy();
|
DropHeavy();
|
||||||
return;
|
return;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (manager.IsPaused||isDead)
|
if (manager.IsPaused || isDead) return;
|
||||||
{
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
if(Input.GetButtonDown("Fire1")||fireDown.IsDown())
|
if (Input.GetButtonDown("Fire1") || fireDown.IsDown())
|
||||||
{
|
{
|
||||||
if (this.GunEnabled)
|
if (GunEnabled)
|
||||||
{
|
{
|
||||||
if (tempInvent.GetQuantityOf(this.pistol.projectileName) > 0)
|
if (tempInvent.GetQuantityOf(pistol.projectileName) > 0)
|
||||||
{
|
{
|
||||||
this.pistol.Fire();
|
pistol.Fire();
|
||||||
this.noiseManager.ShotFired();
|
noiseManager.ShotFired();
|
||||||
tempInvent.Remove(this.pistol.projectileName);
|
tempInvent.Remove(pistol.projectileName);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if (!IsCarrying)
|
if (!IsCarrying)
|
||||||
{
|
{
|
||||||
int t_index = 0;
|
var t_index = 0;
|
||||||
bool pickupFound = false;
|
var pickupFound = false;
|
||||||
if (itemsInRange.Count > 0)
|
if (itemsInRange.Count > 0)
|
||||||
{
|
{
|
||||||
while (t_index < itemsInRange.Count && !itemsInRange[t_index].CanPickup)
|
while (t_index < itemsInRange.Count && !itemsInRange[t_index].CanPickup) t_index++;
|
||||||
{
|
|
||||||
t_index++;
|
|
||||||
}
|
|
||||||
if (t_index != itemsInRange.Count)
|
if (t_index != itemsInRange.Count)
|
||||||
{
|
{
|
||||||
pickupFound = true;
|
pickupFound = true;
|
||||||
@ -141,8 +100,6 @@ public class PlayerInteractionHandler : MonoBehaviour
|
|||||||
itemsInRange[0].transform.gameObject.SetActive(false);
|
itemsInRange[0].transform.gameObject.SetActive(false);
|
||||||
itemsInRange.Remove(itemsInRange[t_index]);
|
itemsInRange.Remove(itemsInRange[t_index]);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
else if (heavyItemsInRange.Count > 0)
|
else if (heavyItemsInRange.Count > 0)
|
||||||
{
|
{
|
||||||
@ -157,165 +114,115 @@ public class PlayerInteractionHandler : MonoBehaviour
|
|||||||
heavyItemsInRange.Remove(heavyItemsInRange[0]);
|
heavyItemsInRange.Remove(heavyItemsInRange[0]);
|
||||||
heavyInvent.Disable();
|
heavyInvent.Disable();
|
||||||
heavyInvent.DisableAll();
|
heavyInvent.DisableAll();
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!pickupFound)
|
if (!pickupFound)
|
||||||
{
|
foreach (var item in itemsInRange)
|
||||||
foreach (InteractableItem item in itemsInRange)
|
|
||||||
{
|
|
||||||
if (!item.CanPickup)
|
if (!item.CanPickup)
|
||||||
{
|
{
|
||||||
if (!item.Interact(ref invent, ref heavyInvent))
|
if (!item.Interact(ref invent, ref heavyInvent))
|
||||||
{
|
|
||||||
item.Interact();
|
item.Interact();
|
||||||
}else if(item is HeavyItemReceiver)
|
else if (item is HeavyItemReceiver)
|
||||||
{
|
if (heavyInvent != null)
|
||||||
if(heavyInvent != null)
|
|
||||||
{
|
{
|
||||||
heavyInvent.transform.parent = carryingPos;
|
heavyInvent.transform.parent = carryingPos;
|
||||||
heavyInvent.transform.localPosition = Vector3.zero;
|
heavyInvent.transform.localPosition = Vector3.zero;
|
||||||
heavyInvent.transform.localEulerAngles = Vector3.zero;
|
heavyInvent.transform.localEulerAngles = Vector3.zero;
|
||||||
heavyItemsInRange.Remove(heavyInvent);
|
heavyItemsInRange.Remove(heavyInvent);
|
||||||
heavyInvent.GetComponent<Rigidbody>().constraints = RigidbodyConstraints.FreezeRotation;
|
heavyInvent.GetComponent<Rigidbody>().constraints =
|
||||||
|
RigidbodyConstraints.FreezeRotation;
|
||||||
heavyInvent.GetComponent<Rigidbody>().isKinematic = true;
|
heavyInvent.GetComponent<Rigidbody>().isKinematic = true;
|
||||||
heavyInvent.Disable();
|
heavyInvent.Disable();
|
||||||
heavyInvent.DisableAll();
|
heavyInvent.DisableAll();
|
||||||
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
int refIndex;
|
int refIndex;
|
||||||
if (itemsInRange.Count > 0&&receiverInRange(out refIndex)) {
|
if (itemsInRange.Count > 0 && receiverInRange(out refIndex))
|
||||||
((HeavyItemReceiver)itemsInRange[refIndex]).Interact(ref this.invent, ref heavyInvent);
|
{
|
||||||
|
((HeavyItemReceiver)itemsInRange[refIndex]).Interact(ref invent, ref heavyInvent);
|
||||||
heavyInvent = null;
|
heavyInvent = null;
|
||||||
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
this.DropHeavy();
|
DropHeavy();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
}
|
|
||||||
if (Input.GetButtonDown("Fire2"))
|
if (Input.GetButtonDown("Fire2"))
|
||||||
{
|
{
|
||||||
//print(this.GunEnabled);
|
//print(this.GunEnabled);
|
||||||
if (!this.GunEnabled)
|
if (!GunEnabled)
|
||||||
{
|
{
|
||||||
|
|
||||||
if (!flashlight.gameObject.activeSelf)
|
if (!flashlight.gameObject.activeSelf)
|
||||||
{
|
|
||||||
EnableFlashlight();
|
EnableFlashlight();
|
||||||
}
|
|
||||||
else
|
else
|
||||||
{
|
|
||||||
DisableFlashlight();
|
DisableFlashlight();
|
||||||
}
|
}
|
||||||
}
|
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
this.pistol.LightToggle();
|
pistol.LightToggle();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
|
||||||
if (Input.GetButtonDown("Fire3"))
|
if (Input.GetButtonDown("Fire3"))
|
||||||
|
if (!IsCarrying)
|
||||||
{
|
{
|
||||||
if (!this.IsCarrying)
|
GunEnabled = !GunEnabled;
|
||||||
{
|
if (!GunEnabled)
|
||||||
this.gunEnabled = !this.gunEnabled;
|
|
||||||
if(!this.gunEnabled)
|
|
||||||
pistol.Disable();
|
pistol.Disable();
|
||||||
pistol.gameObject.SetActive(this.gunEnabled);
|
pistol.gameObject.SetActive(GunEnabled);
|
||||||
if (this.gunEnabled)
|
if (GunEnabled)
|
||||||
pistol.Enable();
|
pistol.Enable();
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
|
||||||
if (this.GunEnabled)
|
if (GunEnabled)
|
||||||
{
|
{
|
||||||
this.DisableFlashlight();
|
DisableFlashlight();
|
||||||
|
|
||||||
float aimAxis = Input.GetAxis("Aim");
|
var aimAxis = Input.GetAxis("Aim");
|
||||||
|
|
||||||
if (aimAxis > 0.5f)
|
if (aimAxis > 0.5f)
|
||||||
{
|
|
||||||
pistol.aimMode = PistolComponent.AimMode.CAMERA;
|
pistol.aimMode = PistolComponent.AimMode.CAMERA;
|
||||||
|
|
||||||
}
|
|
||||||
else
|
else
|
||||||
{
|
|
||||||
pistol.aimMode = PistolComponent.AimMode.MODIFIED;
|
pistol.aimMode = PistolComponent.AimMode.MODIFIED;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
shift.SetCenter(!GunEnabled);
|
||||||
}
|
}
|
||||||
else
|
|
||||||
{
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
shift.SetCenter(!this.GunEnabled);
|
|
||||||
}
|
|
||||||
public void EnableFlashlight()
|
|
||||||
{
|
|
||||||
|
|
||||||
flashlight.gameObject.SetActive(true);
|
|
||||||
flashlight3D.GetComponent<MeshRenderer>().materials[materialIndex].SetColor("_BaseColor", initColor);
|
|
||||||
selMaterial.SetColor("_EmissionColor", new Color(255, 255, 255, 255));
|
|
||||||
flashlight3D.gameObject.SetActive(true);
|
|
||||||
this.flashlightEnabled = true;
|
|
||||||
}
|
|
||||||
public void DisableFlashlight()
|
|
||||||
{
|
|
||||||
|
|
||||||
flashlight.gameObject.SetActive(false);
|
|
||||||
flashlight3D.GetComponent<MeshRenderer>().materials[materialIndex].SetColor("_BaseColor", new Color(0, 0, 0));
|
|
||||||
selMaterial.SetColor("_EmissionColor", new Color(0, 0, 0, 0));
|
|
||||||
flashlight3D.gameObject.SetActive(false);
|
|
||||||
this.flashlightEnabled = false;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
private void OnTriggerEnter(Collider other)
|
private void OnTriggerEnter(Collider other)
|
||||||
{
|
{
|
||||||
if(other.gameObject.GetComponent<InteractableItem>() != null)
|
if (other.gameObject.GetComponent<InteractableItem>() != null)
|
||||||
{
|
{
|
||||||
InteractableItem item = other.gameObject.GetComponent<InteractableItem>();
|
var item = other.gameObject.GetComponent<InteractableItem>();
|
||||||
if(item is InteractableItem && item is not HeavyInteractableItem)
|
if (item is InteractableItem && item is not HeavyInteractableItem)
|
||||||
{
|
{
|
||||||
((InteractableItem)item).Enable();
|
item.Enable();
|
||||||
itemsInRange.Add(item);
|
itemsInRange.Add(item);
|
||||||
}else if(item is HeavyInteractableItem)
|
}
|
||||||
|
else if (item is HeavyInteractableItem)
|
||||||
{
|
{
|
||||||
((HeavyInteractableItem)item).Enable();
|
((HeavyInteractableItem)item).Enable();
|
||||||
heavyItemsInRange.Add((HeavyInteractableItem)item);
|
heavyItemsInRange.Add((HeavyInteractableItem)item);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
}
|
|
||||||
}
|
|
||||||
private void OnTriggerExit(Collider other)
|
private void OnTriggerExit(Collider other)
|
||||||
{
|
{
|
||||||
if (other.gameObject.GetComponent<InteractableItem>() != null)
|
if (other.gameObject.GetComponent<InteractableItem>() != null)
|
||||||
{
|
{
|
||||||
InteractableItem item = other.gameObject.GetComponent<InteractableItem>();
|
var item = other.gameObject.GetComponent<InteractableItem>();
|
||||||
if (item is InteractableItem && item is not HeavyInteractableItem)
|
if (item is InteractableItem && item is not HeavyInteractableItem)
|
||||||
{
|
{
|
||||||
((InteractableItem)item).Disable();
|
item.Disable();
|
||||||
itemsInRange.Remove(item);
|
itemsInRange.Remove(item);
|
||||||
|
|
||||||
}
|
}
|
||||||
else if (item is HeavyInteractableItem)
|
else if (item is HeavyInteractableItem)
|
||||||
{
|
{
|
||||||
@ -325,42 +232,85 @@ public class PlayerInteractionHandler : MonoBehaviour
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private bool receiverInRange(out int index)
|
||||||
|
{
|
||||||
|
var i = 0;
|
||||||
|
foreach (var item in itemsInRange)
|
||||||
|
{
|
||||||
|
if (item is HeavyItemReceiver)
|
||||||
|
{
|
||||||
|
index = i;
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
i++;
|
||||||
|
}
|
||||||
|
|
||||||
|
index = -1;
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
private void DropHeavy()
|
||||||
|
{
|
||||||
|
if (heavyInvent != null)
|
||||||
|
{
|
||||||
|
heavyInvent.transform.parent = null;
|
||||||
|
heavyInvent.GetComponent<Rigidbody>().isKinematic = false;
|
||||||
|
heavyInvent.EnableAll();
|
||||||
|
heavyInvent = null;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public void EnableFlashlight()
|
||||||
|
{
|
||||||
|
flashlight.gameObject.SetActive(true);
|
||||||
|
flashlight3D.GetComponent<MeshRenderer>().materials[materialIndex].SetColor("_BaseColor", initColor);
|
||||||
|
selMaterial.SetColor("_EmissionColor", new Color(255, 255, 255, 255));
|
||||||
|
flashlight3D.gameObject.SetActive(true);
|
||||||
|
flashlightEnabled = true;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void DisableFlashlight()
|
||||||
|
{
|
||||||
|
flashlight.gameObject.SetActive(false);
|
||||||
|
flashlight3D.GetComponent<MeshRenderer>().materials[materialIndex].SetColor("_BaseColor", new Color(0, 0, 0));
|
||||||
|
selMaterial.SetColor("_EmissionColor", new Color(0, 0, 0, 0));
|
||||||
|
flashlight3D.gameObject.SetActive(false);
|
||||||
|
flashlightEnabled = false;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
class AxisIsDown
|
internal class AxisIsDown
|
||||||
{
|
{
|
||||||
|
|
||||||
|
|
||||||
private string axisName;
|
|
||||||
private bool isDown = false;
|
|
||||||
private bool pIsDown = false;
|
|
||||||
private float axis;
|
private float axis;
|
||||||
|
|
||||||
private bool down = false;
|
|
||||||
|
|
||||||
public void Check()
|
private readonly string axisName;
|
||||||
{
|
|
||||||
axis = Input.GetAxis(axisName);
|
private bool down;
|
||||||
isDown = axis > 0.5f;
|
private bool isDown;
|
||||||
if (isDown != pIsDown&&isDown)
|
private bool pIsDown;
|
||||||
{
|
|
||||||
down = true;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
down = false;
|
|
||||||
}
|
|
||||||
pIsDown = isDown;
|
|
||||||
}
|
|
||||||
|
|
||||||
public bool IsDown()
|
|
||||||
{
|
|
||||||
return this.down;
|
|
||||||
}
|
|
||||||
public AxisIsDown(string axisName)
|
public AxisIsDown(string axisName)
|
||||||
{
|
{
|
||||||
this.axisName = axisName;
|
this.axisName = axisName;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void Check()
|
||||||
|
{
|
||||||
|
axis = Input.GetAxis(axisName);
|
||||||
|
isDown = axis > 0.5f;
|
||||||
|
if (isDown != pIsDown && isDown)
|
||||||
|
down = true;
|
||||||
|
else
|
||||||
|
down = false;
|
||||||
|
pIsDown = isDown;
|
||||||
|
}
|
||||||
|
|
||||||
|
public bool IsDown()
|
||||||
|
{
|
||||||
|
return down;
|
||||||
|
}
|
||||||
}
|
}
|
@ -1,85 +1,116 @@
|
|||||||
using System.Collections;
|
using System.Collections;
|
||||||
using System.Collections.Generic;
|
|
||||||
using UnityEngine;
|
|
||||||
using Cinemachine;
|
using Cinemachine;
|
||||||
|
using UnityEngine;
|
||||||
|
|
||||||
public class PlayerMovementController : MonoBehaviour
|
public class PlayerMovementController : MonoBehaviour
|
||||||
{
|
{
|
||||||
[SerializeField]
|
[SerializeField] private PlayerAnimationController animcontroller;
|
||||||
private PlayerAnimationController animcontroller;
|
|
||||||
|
|
||||||
private float x = 0;
|
[SerializeField] private CharacterController ccontroller;
|
||||||
private float y = 0;
|
|
||||||
|
[SerializeField] private CameraController cameraController;
|
||||||
|
|
||||||
|
[SerializeField] private float speed = 1f;
|
||||||
|
|
||||||
|
[SerializeField] private float sideSpeed = 0.5f;
|
||||||
|
|
||||||
|
[SerializeField] private float animatedRotationSpeed = 5f;
|
||||||
|
|
||||||
|
[SerializeField] public Camera cam;
|
||||||
|
|
||||||
|
[HideInInspector] public bool AllowRotation;
|
||||||
|
|
||||||
|
[HideInInspector] public bool IsAiming;
|
||||||
|
|
||||||
|
[SerializeField] private NoiseVisibilitySettingsManager noiseSettings;
|
||||||
|
|
||||||
|
[SerializeField] private CinemachineFreeLook freelook;
|
||||||
|
|
||||||
|
[SerializeField] private string mouseXAxis = "Mouse X";
|
||||||
|
|
||||||
|
[SerializeField] private string mouseYAxis = "Mouse Y";
|
||||||
|
|
||||||
|
public bool isDead;
|
||||||
|
private CharacterControllerForce ccForceAddon;
|
||||||
|
private float initXSensitivity = 250f;
|
||||||
|
|
||||||
|
private float initYSensitivity = 10f;
|
||||||
//private float mouseX = 0;
|
//private float mouseX = 0;
|
||||||
|
|
||||||
private bool isRunning = false;
|
|
||||||
private bool isSneaking = false;
|
private bool isSneaking = false;
|
||||||
public bool IsRunning { get { return isRunning; } }
|
|
||||||
[SerializeField]
|
|
||||||
private CharacterController ccontroller;
|
|
||||||
private CharacterControllerForce ccForceAddon;
|
|
||||||
|
|
||||||
[SerializeField]
|
|
||||||
private CameraController cameraController;
|
|
||||||
|
|
||||||
[SerializeField]
|
|
||||||
private float speed = 1f;
|
|
||||||
[SerializeField]
|
|
||||||
private float sideSpeed = 0.5f;
|
|
||||||
|
|
||||||
[SerializeField]
|
|
||||||
private float animatedRotationSpeed = 5f;
|
|
||||||
[SerializeField]
|
|
||||||
public Camera cam;
|
|
||||||
|
|
||||||
[HideInInspector]
|
|
||||||
public bool AllowRotation = false;
|
|
||||||
[HideInInspector]
|
|
||||||
public bool IsAiming = false;
|
|
||||||
|
|
||||||
[SerializeField]
|
|
||||||
private NoiseVisibilitySettingsManager noiseSettings;
|
|
||||||
|
|
||||||
private InGameManager manager;
|
|
||||||
|
|
||||||
|
|
||||||
public float NoiseDistance { get { return this.noiseSettings.NoiseDistance; } }
|
|
||||||
|
|
||||||
|
|
||||||
private Vector3 lookingDirectionVector;
|
private Vector3 lookingDirectionVector;
|
||||||
|
|
||||||
private bool movementLocked = false;
|
private InGameManager manager;
|
||||||
[SerializeField]
|
|
||||||
private CinemachineFreeLook freelook;
|
private bool movementLocked;
|
||||||
private float initXSensitivity = 250f;
|
|
||||||
private float initYSensitivity = 10f;
|
private float x;
|
||||||
[SerializeField]
|
private float y;
|
||||||
private string mouseXAxis = "Mouse X";
|
public bool IsRunning { get; private set; }
|
||||||
[SerializeField]
|
|
||||||
private string mouseYAxis = "Mouse Y";
|
|
||||||
|
public float NoiseDistance => noiseSettings.NoiseDistance;
|
||||||
|
|
||||||
|
|
||||||
|
// Start is called before the first frame update
|
||||||
|
private void Start()
|
||||||
|
{
|
||||||
|
ccForceAddon = ccontroller.gameObject.GetComponent<CharacterControllerForce>();
|
||||||
|
manager = FindObjectOfType<InGameManager>();
|
||||||
|
initXSensitivity = freelook.m_XAxis.m_MaxSpeed;
|
||||||
|
initYSensitivity = freelook.m_YAxis.m_MaxSpeed;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Update is called once per frame
|
||||||
|
private void Update()
|
||||||
|
{
|
||||||
|
if (isDead) return;
|
||||||
|
AllowRotation = IsAiming || IsRunning;
|
||||||
|
IsAiming = Input.GetMouseButton(1) || Input.GetAxis("Aim") > 0.5f;
|
||||||
|
GetMovementOld();
|
||||||
|
MovePlayer();
|
||||||
|
|
||||||
|
animcontroller.Animate(new Vector2(x, y), false, IsRunning);
|
||||||
|
|
||||||
|
lookingDirectionVector = (cameraController.Forward * y + cameraController.Right * x).normalized;
|
||||||
|
if ((IsRunning && !Input.GetMouseButtonDown(1)) || AllowRotation)
|
||||||
|
{
|
||||||
|
if ((AllowRotation && x == 0 && y == 0) || (IsAiming && PlayerInteractionHandler.instance.GunEnabled))
|
||||||
|
lookingDirectionVector = cameraController.Forward.normalized;
|
||||||
|
SlowLookAt(lookingDirectionVector);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
freelook.m_XAxis.m_InputAxisName = !manager.IsPaused ? mouseXAxis : "";
|
||||||
|
freelook.m_YAxis.m_InputAxisName = !manager.IsPaused ? mouseYAxis : "";
|
||||||
|
}
|
||||||
|
|
||||||
public bool isDead = false;
|
|
||||||
private void GetMovementOld()
|
private void GetMovementOld()
|
||||||
{
|
{
|
||||||
x = Input.GetAxis("Horizontal");
|
x = Input.GetAxis("Horizontal");
|
||||||
y = Input.GetAxis("Vertical");
|
y = Input.GetAxis("Vertical");
|
||||||
if (movementLocked||manager.IsPaused)
|
if (movementLocked || manager.IsPaused)
|
||||||
{
|
{
|
||||||
x = 0;
|
x = 0;
|
||||||
y = 0;
|
y = 0;
|
||||||
}
|
}
|
||||||
isRunning = (Mathf.Abs(y) > 0.1f || Mathf.Abs(x) > 0.1f);
|
|
||||||
|
IsRunning = Mathf.Abs(y) > 0.1f || Mathf.Abs(x) > 0.1f;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void SetSensitivity(float sensitivity)
|
public void SetSensitivity(float sensitivity)
|
||||||
{
|
{
|
||||||
this.freelook.m_XAxis.m_MaxSpeed = initXSensitivity * sensitivity;
|
freelook.m_XAxis.m_MaxSpeed = initXSensitivity * sensitivity;
|
||||||
this.freelook.m_YAxis.m_MaxSpeed= initYSensitivity * sensitivity;
|
freelook.m_YAxis.m_MaxSpeed = initYSensitivity * sensitivity;
|
||||||
}
|
}
|
||||||
|
|
||||||
private void MovePlayer()
|
private void MovePlayer()
|
||||||
{
|
{
|
||||||
Vector3 movement = Vector3.zero;
|
var movement = Vector3.zero;
|
||||||
//movement += transform.forward * Mathf.Abs(y) * Time.deltaTime * speed;//+(transform.right*x*Time.deltaTime*speed);
|
//movement += transform.forward * Mathf.Abs(y) * Time.deltaTime * speed;//+(transform.right*x*Time.deltaTime*speed);
|
||||||
movement += cam.transform.forward *y * Time.deltaTime * speed;
|
movement += cam.transform.forward * y * Time.deltaTime * speed;
|
||||||
|
|
||||||
//movement += transform.forward * Mathf.Abs(x) * Time.deltaTime * speed;
|
//movement += transform.forward * Mathf.Abs(x) * Time.deltaTime * speed;
|
||||||
|
|
||||||
@ -89,8 +120,7 @@ public class PlayerMovementController : MonoBehaviour
|
|||||||
movement += cam.transform.right * x * Time.deltaTime * sideSpeed;
|
movement += cam.transform.right * x * Time.deltaTime * sideSpeed;
|
||||||
|
|
||||||
|
|
||||||
|
movement += Vector3.down * Time.deltaTime * 9.8f;
|
||||||
movement += Vector3.down*Time.deltaTime*9.8f;
|
|
||||||
ccontroller.Move(movement);
|
ccontroller.Move(movement);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -101,73 +131,29 @@ public class PlayerMovementController : MonoBehaviour
|
|||||||
|
|
||||||
private void GetJumpOld()
|
private void GetJumpOld()
|
||||||
{
|
{
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// Start is called before the first frame update
|
private void SlowLookAt(Vector3 targetVector)
|
||||||
void Start()
|
|
||||||
{
|
{
|
||||||
ccForceAddon = ccontroller.gameObject.GetComponent<CharacterControllerForce>();
|
var relativePos = targetVector;
|
||||||
manager = GameObject.FindObjectOfType<InGameManager>();
|
var toRotation = Quaternion.LookRotation(relativePos);
|
||||||
initXSensitivity =freelook.m_XAxis.m_MaxSpeed;
|
|
||||||
initYSensitivity= freelook.m_YAxis.m_MaxSpeed;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Update is called once per frame
|
|
||||||
void Update()
|
|
||||||
{
|
|
||||||
if(isDead) return;
|
|
||||||
AllowRotation = IsAiming||IsRunning;
|
|
||||||
IsAiming = Input.GetMouseButton(1) || Input.GetAxis("Aim") > 0.5f;
|
|
||||||
GetMovementOld();
|
|
||||||
MovePlayer();
|
|
||||||
|
|
||||||
animcontroller.Animate(new Vector2(x, y), false,isRunning);
|
|
||||||
|
|
||||||
this.lookingDirectionVector = ((cameraController.Forward * y) + cameraController.Right * x).normalized;
|
|
||||||
if (isRunning && !Input.GetMouseButtonDown(1) || AllowRotation)
|
|
||||||
{
|
|
||||||
if (AllowRotation && x == 0 && y == 0 || IsAiming && PlayerInteractionHandler.instance.GunEnabled)
|
|
||||||
{
|
|
||||||
this.lookingDirectionVector = cameraController.Forward.normalized;
|
|
||||||
|
|
||||||
}
|
|
||||||
SlowLookAt(this.lookingDirectionVector);
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
freelook.m_XAxis.m_InputAxisName = !manager.IsPaused ? this.mouseXAxis : "";
|
|
||||||
freelook.m_YAxis.m_InputAxisName = !manager.IsPaused ? this.mouseYAxis : "";
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
void SlowLookAt(Vector3 targetVector)
|
|
||||||
{
|
|
||||||
Vector3 relativePos = targetVector;
|
|
||||||
Quaternion toRotation = Quaternion.LookRotation(relativePos);
|
|
||||||
|
|
||||||
transform.rotation = Quaternion.Lerp(transform.rotation, toRotation, animatedRotationSpeed * Time.deltaTime);
|
transform.rotation = Quaternion.Lerp(transform.rotation, toRotation, animatedRotationSpeed * Time.deltaTime);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public void PhysicalForceMove(Vector3 vector)
|
public void PhysicalForceMove(Vector3 vector)
|
||||||
{
|
{
|
||||||
this.ccontroller.Move(vector);
|
ccontroller.Move(vector);
|
||||||
ccForceAddon.AddImpact(vector, vector.magnitude);
|
ccForceAddon.AddImpact(vector, vector.magnitude);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public void LockMovement(float duration)
|
public void LockMovement(float duration)
|
||||||
{
|
{
|
||||||
StartCoroutine(lockMovement(duration));
|
StartCoroutine(lockMovement(duration));
|
||||||
}
|
}
|
||||||
|
|
||||||
private IEnumerator lockMovement(float duration)
|
private IEnumerator lockMovement(float duration)
|
||||||
{
|
{
|
||||||
movementLocked = true;
|
movementLocked = true;
|
||||||
|
@ -1,60 +1,49 @@
|
|||||||
using System.Collections;
|
|
||||||
using System.Collections.Generic;
|
|
||||||
using UnityEngine;
|
|
||||||
using TMPro;
|
using TMPro;
|
||||||
|
using UnityEngine;
|
||||||
|
|
||||||
public class StatsOutputScreen : MonoBehaviour
|
public class StatsOutputScreen : MonoBehaviour
|
||||||
{
|
{
|
||||||
[SerializeField]
|
[SerializeField] private TMP_Text healthText;
|
||||||
private TMP_Text healthText;
|
|
||||||
[SerializeField]
|
[SerializeField] private TMP_Text staminaText;
|
||||||
private TMP_Text staminaText;
|
|
||||||
[SerializeField]
|
[SerializeField] private TMP_Text oxygenText;
|
||||||
private TMP_Text oxygenText;
|
|
||||||
[HideInInspector]
|
[HideInInspector] public float health;
|
||||||
public float health = 0;
|
|
||||||
[HideInInspector]
|
[HideInInspector] public float stamina;
|
||||||
public float stamina = 0;
|
|
||||||
[HideInInspector]
|
[HideInInspector] public float oxygen;
|
||||||
public float oxygen = 0;
|
|
||||||
|
|
||||||
private Color initColor;
|
private Color initColor;
|
||||||
|
|
||||||
// Start is called before the first frame update
|
// Start is called before the first frame update
|
||||||
void Start()
|
private void Start()
|
||||||
{
|
{
|
||||||
initColor = healthText.color;
|
initColor = healthText.color;
|
||||||
InvokeRepeating("ToggleColor", 0.5f, 0.5f);
|
InvokeRepeating("ToggleColor", 0.5f, 0.5f);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Update is called once per frame
|
// Update is called once per frame
|
||||||
void Update()
|
private void Update()
|
||||||
{
|
{
|
||||||
healthText.text = "Health:" + health.ToString();
|
healthText.text = "Health:" + health;
|
||||||
|
|
||||||
if (health <= 1)
|
if (health <= 1)
|
||||||
{
|
|
||||||
//Dark Red
|
//Dark Red
|
||||||
healthText.color = new Color(50,0,0);
|
healthText.color = new Color(50, 0, 0);
|
||||||
}
|
else if (health <= 3)
|
||||||
else if (health <=3)
|
|
||||||
{
|
|
||||||
healthText.color = Color.red;
|
healthText.color = Color.red;
|
||||||
}
|
|
||||||
else
|
else
|
||||||
{
|
|
||||||
healthText.color = initColor;
|
healthText.color = initColor;
|
||||||
}
|
|
||||||
|
|
||||||
staminaText.text = "Stamina:" + stamina.ToString();
|
staminaText.text = "Stamina:" + stamina;
|
||||||
oxygenText.text = "Oxygen:"+oxygen.ToString();
|
oxygenText.text = "Oxygen:" + oxygen;
|
||||||
}
|
}
|
||||||
|
|
||||||
private void ToggleColor()
|
private void ToggleColor()
|
||||||
{
|
{
|
||||||
if(health<=1)
|
if (health <= 1)
|
||||||
healthText.gameObject.SetActive(!healthText.gameObject.activeSelf);
|
healthText.gameObject.SetActive(!healthText.gameObject.activeSelf);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
@ -1,5 +1,6 @@
|
|||||||
fileFormatVersion: 2
|
fileFormatVersion: 2
|
||||||
guid: 2ad85b0f43f25f1499c27a4dca23ddd8
|
guid: 6e954a9a26b1f7447a8a8a8aeafa34bb
|
||||||
|
folderAsset: yes
|
||||||
DefaultImporter:
|
DefaultImporter:
|
||||||
externalObjects: {}
|
externalObjects: {}
|
||||||
userData:
|
userData:
|
30
Assets/Scripts/Steam/FriendObject.cs
Normal file
30
Assets/Scripts/Steam/FriendObject.cs
Normal file
@ -0,0 +1,30 @@
|
|||||||
|
using System.Collections;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using UnityEngine;
|
||||||
|
using Steamworks;
|
||||||
|
|
||||||
|
|
||||||
|
public class FriendObject : MonoBehaviour
|
||||||
|
{
|
||||||
|
public SteamId steamid;
|
||||||
|
|
||||||
|
public async void Invite()
|
||||||
|
{
|
||||||
|
if (SteamLobbyManager.UserInLobby)
|
||||||
|
{
|
||||||
|
SteamLobbyManager.CurrentLobby.InviteFriend(steamid);
|
||||||
|
Debug.Log("Invited " + steamid);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
bool result = await SteamLobbyManager.CreateLobby();
|
||||||
|
if (result)
|
||||||
|
{
|
||||||
|
SteamLobbyManager.CurrentLobby.InviteFriend(steamid);
|
||||||
|
Debug.Log("Invited " + steamid + " Created a new lobby");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
11
Assets/Scripts/Steam/FriendObject.cs.meta
Normal file
11
Assets/Scripts/Steam/FriendObject.cs.meta
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
fileFormatVersion: 2
|
||||||
|
guid: 57db693cbe9a46345add801ae22e1e2a
|
||||||
|
MonoImporter:
|
||||||
|
externalObjects: {}
|
||||||
|
serializedVersion: 2
|
||||||
|
defaultReferences: []
|
||||||
|
executionOrder: 0
|
||||||
|
icon: {instanceID: 0}
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
74
Assets/Scripts/Steam/SteamFriendsManager.cs
Normal file
74
Assets/Scripts/Steam/SteamFriendsManager.cs
Normal file
@ -0,0 +1,74 @@
|
|||||||
|
using Steamworks;
|
||||||
|
using UnityEngine;
|
||||||
|
using UnityEngine.UI;
|
||||||
|
|
||||||
|
public class SteamFriendsManager : MonoBehaviour
|
||||||
|
{
|
||||||
|
public RawImage playerprofile;
|
||||||
|
public Text playername;
|
||||||
|
|
||||||
|
public Transform friendsContent;
|
||||||
|
public GameObject friendObj;
|
||||||
|
|
||||||
|
async void Start()
|
||||||
|
{
|
||||||
|
if (!SteamClient.IsValid) return;
|
||||||
|
|
||||||
|
playername.text = SteamClient.Name;
|
||||||
|
InitFriendsAsync();
|
||||||
|
var img = await SteamFriends.GetLargeAvatarAsync(SteamClient.SteamId);
|
||||||
|
playerprofile.texture = GetTextureFromImage(img.Value);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
public static Texture2D GetTextureFromImage(Steamworks.Data.Image image)
|
||||||
|
{
|
||||||
|
Texture2D texture = new Texture2D((int)image.Width, (int)image.Height);
|
||||||
|
|
||||||
|
for (int x = 0; x < image.Width; x++)
|
||||||
|
{
|
||||||
|
for (int y = 0; y < image.Height; y++)
|
||||||
|
{
|
||||||
|
var p = image.GetPixel(x, y);
|
||||||
|
texture.SetPixel(x, (int)image.Height - y, new Color(p.r / 255.0f, p.g / 255.0f, p.b / 255.0f, p.a / 255.0f));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
texture.Apply();
|
||||||
|
return texture;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void InitFriendsAsync()
|
||||||
|
{
|
||||||
|
foreach (var friend in SteamFriends.GetFriends())
|
||||||
|
{
|
||||||
|
GameObject f = Instantiate(friendObj, friendsContent);
|
||||||
|
f.GetComponentInChildren<Text>().text = friend.Name;
|
||||||
|
f.GetComponent<FriendObject>().steamid = friend.Id;
|
||||||
|
AssingFriendImage(f, friend.Id);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public async void AssingFriendImage(GameObject f, SteamId id)
|
||||||
|
{
|
||||||
|
var img = await SteamFriends.GetLargeAvatarAsync(id);
|
||||||
|
f.GetComponentInChildren<RawImage>().texture = GetTextureFromImage(img.Value);
|
||||||
|
}
|
||||||
|
|
||||||
|
public static async System.Threading.Tasks.Task<Texture2D> GetTextureFromSteamIdAsync(SteamId id)
|
||||||
|
{
|
||||||
|
var img = await SteamFriends.GetLargeAvatarAsync(SteamClient.SteamId);
|
||||||
|
Steamworks.Data.Image image = img.Value;
|
||||||
|
Texture2D texture = new Texture2D((int)image.Width, (int)image.Height);
|
||||||
|
|
||||||
|
for (int x = 0; x < image.Width; x++)
|
||||||
|
{
|
||||||
|
for (int y = 0; y < image.Height; y++)
|
||||||
|
{
|
||||||
|
var p = image.GetPixel(x, y);
|
||||||
|
texture.SetPixel(x, (int)image.Height - y, new Color(p.r / 255.0f, p.g / 255.0f, p.b / 255.0f, p.a / 255.0f));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
texture.Apply();
|
||||||
|
return texture;
|
||||||
|
}
|
||||||
|
}
|
11
Assets/Scripts/Steam/SteamFriendsManager.cs.meta
Normal file
11
Assets/Scripts/Steam/SteamFriendsManager.cs.meta
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
fileFormatVersion: 2
|
||||||
|
guid: 3e1287d29b0590b4086746e0ea190f4e
|
||||||
|
MonoImporter:
|
||||||
|
externalObjects: {}
|
||||||
|
serializedVersion: 2
|
||||||
|
defaultReferences: []
|
||||||
|
executionOrder: 0
|
||||||
|
icon: {instanceID: 0}
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
176
Assets/Scripts/Steam/SteamLobbyManager.cs
Normal file
176
Assets/Scripts/Steam/SteamLobbyManager.cs
Normal file
@ -0,0 +1,176 @@
|
|||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
using Steamworks;
|
||||||
|
using Steamworks.Data;
|
||||||
|
using UnityEngine;
|
||||||
|
using UnityEngine.Events;
|
||||||
|
using UnityEngine.UI;
|
||||||
|
|
||||||
|
|
||||||
|
public class SteamLobbyManager : MonoBehaviour
|
||||||
|
{
|
||||||
|
public static Lobby CurrentLobby;
|
||||||
|
public static bool UserInLobby;
|
||||||
|
public UnityEvent onLobbyCreated;
|
||||||
|
public UnityEvent onLobbyJoined;
|
||||||
|
public UnityEvent onLobbyLeave;
|
||||||
|
|
||||||
|
|
||||||
|
public GameObject inLobbyFriend;
|
||||||
|
public Transform content;
|
||||||
|
|
||||||
|
public Dictionary<SteamId, GameObject> inLobby = new();
|
||||||
|
|
||||||
|
private void Start()
|
||||||
|
{
|
||||||
|
DontDestroyOnLoad(this);
|
||||||
|
|
||||||
|
SteamMatchmaking.OnLobbyCreated += OnLobbyCreatedCallBack;
|
||||||
|
SteamMatchmaking.OnLobbyEntered += OnLobbyEntered;
|
||||||
|
SteamMatchmaking.OnLobbyMemberJoined += OnLobbyMemberJoined;
|
||||||
|
SteamMatchmaking.OnChatMessage += OnChatMessage;
|
||||||
|
SteamMatchmaking.OnLobbyMemberDisconnected += OnLobbyMemberDisconnected;
|
||||||
|
SteamMatchmaking.OnLobbyMemberLeave += OnLobbyMemberDisconnected;
|
||||||
|
SteamMatchmaking.OnLobbyGameCreated += OnLobbyGameCreated;
|
||||||
|
SteamFriends.OnGameLobbyJoinRequested += OnGameLobbyJoinRequest;
|
||||||
|
SteamMatchmaking.OnLobbyInvite += OnLobbyInvite;
|
||||||
|
}
|
||||||
|
|
||||||
|
private void OnLobbyInvite(Friend friend, Lobby lobby)
|
||||||
|
{
|
||||||
|
Debug.Log($"{friend.Name} invited you to his lobby.");
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
private void OnLobbyGameCreated(Lobby lobby, uint ip, ushort port, SteamId id)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
private async void OnLobbyMemberJoined(Lobby lobby, Friend friend)
|
||||||
|
{
|
||||||
|
Debug.Log($"{friend.Name} joined the lobby");
|
||||||
|
var obj = Instantiate(inLobbyFriend, content);
|
||||||
|
obj.GetComponentInChildren<Text>().text = friend.Name;
|
||||||
|
obj.GetComponentInChildren<RawImage>().texture =
|
||||||
|
await SteamFriendsManager.GetTextureFromSteamIdAsync(friend.Id);
|
||||||
|
inLobby.Add(friend.Id, obj);
|
||||||
|
}
|
||||||
|
|
||||||
|
private void OnLobbyMemberDisconnected(Lobby lobby, Friend friend)
|
||||||
|
{
|
||||||
|
Debug.Log($"{friend.Name} left the lobby");
|
||||||
|
Debug.Log($"New lobby owner is {CurrentLobby.Owner}");
|
||||||
|
if (inLobby.ContainsKey(friend.Id))
|
||||||
|
{
|
||||||
|
Destroy(inLobby[friend.Id]);
|
||||||
|
inLobby.Remove(friend.Id);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private void OnChatMessage(Lobby lobby, Friend friend, string message)
|
||||||
|
{
|
||||||
|
Debug.Log($"incoming chat message from {friend.Name} : {message}");
|
||||||
|
}
|
||||||
|
|
||||||
|
private async void OnGameLobbyJoinRequest(Lobby joinedLobby, SteamId id)
|
||||||
|
{
|
||||||
|
var joinedLobbySuccess = await joinedLobby.Join();
|
||||||
|
if (joinedLobbySuccess != RoomEnter.Success)
|
||||||
|
Debug.Log("failed to join lobby : " + joinedLobbySuccess);
|
||||||
|
else
|
||||||
|
CurrentLobby = joinedLobby;
|
||||||
|
}
|
||||||
|
|
||||||
|
private void OnLobbyCreatedCallBack(Result result, Lobby lobby)
|
||||||
|
{
|
||||||
|
if (result != Result.OK)
|
||||||
|
{
|
||||||
|
Debug.Log("lobby creation result not ok : " + result);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
onLobbyCreated.Invoke();
|
||||||
|
Debug.Log("lobby creation result ok");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private async void OnLobbyEntered(Lobby lobby)
|
||||||
|
{
|
||||||
|
Debug.Log("Client joined the lobby");
|
||||||
|
UserInLobby = true;
|
||||||
|
foreach (var user in inLobby.Values) Destroy(user);
|
||||||
|
inLobby.Clear();
|
||||||
|
|
||||||
|
var obj = Instantiate(inLobbyFriend, content);
|
||||||
|
obj.GetComponentInChildren<Text>().text = SteamClient.Name;
|
||||||
|
obj.GetComponentInChildren<RawImage>().texture =
|
||||||
|
await SteamFriendsManager.GetTextureFromSteamIdAsync(SteamClient.SteamId);
|
||||||
|
|
||||||
|
inLobby.Add(SteamClient.SteamId, obj);
|
||||||
|
|
||||||
|
foreach (var friend in CurrentLobby.Members)
|
||||||
|
if (friend.Id != SteamClient.SteamId)
|
||||||
|
{
|
||||||
|
var obj2 = Instantiate(inLobbyFriend, content);
|
||||||
|
obj2.GetComponentInChildren<Text>().text = friend.Name;
|
||||||
|
obj2.GetComponentInChildren<RawImage>().texture =
|
||||||
|
await SteamFriendsManager.GetTextureFromSteamIdAsync(friend.Id);
|
||||||
|
|
||||||
|
inLobby.Add(friend.Id, obj2);
|
||||||
|
}
|
||||||
|
|
||||||
|
onLobbyJoined.Invoke();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public async void CreateLobbyAsync()
|
||||||
|
{
|
||||||
|
var result = await CreateLobby();
|
||||||
|
if (!result)
|
||||||
|
{
|
||||||
|
//Invoke a error message.
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public static async Task<bool> CreateLobby()
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
var createLobbyOutput = await SteamMatchmaking.CreateLobbyAsync();
|
||||||
|
if (!createLobbyOutput.HasValue)
|
||||||
|
{
|
||||||
|
Debug.Log("Lobby created but not correctly instantiated.");
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
CurrentLobby = createLobbyOutput.Value;
|
||||||
|
|
||||||
|
CurrentLobby.SetPublic();
|
||||||
|
//currentLobby.SetPrivate();
|
||||||
|
CurrentLobby.SetJoinable(true);
|
||||||
|
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
catch (Exception exception)
|
||||||
|
{
|
||||||
|
Debug.Log("Failed to create multiplayer lobby : " + exception);
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public void LeaveLobby()
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
UserInLobby = false;
|
||||||
|
CurrentLobby.Leave();
|
||||||
|
onLobbyLeave.Invoke();
|
||||||
|
foreach (var user in inLobby.Values) Destroy(user);
|
||||||
|
inLobby.Clear();
|
||||||
|
}
|
||||||
|
catch
|
||||||
|
{
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
11
Assets/Scripts/Steam/SteamLobbyManager.cs.meta
Normal file
11
Assets/Scripts/Steam/SteamLobbyManager.cs.meta
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
fileFormatVersion: 2
|
||||||
|
guid: d4b922de688dc97428e1fcaec4244b9e
|
||||||
|
MonoImporter:
|
||||||
|
externalObjects: {}
|
||||||
|
serializedVersion: 2
|
||||||
|
defaultReferences: []
|
||||||
|
executionOrder: 0
|
||||||
|
icon: {instanceID: 0}
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
39
Assets/Scripts/Steam/SteamManager.cs
Normal file
39
Assets/Scripts/Steam/SteamManager.cs
Normal file
@ -0,0 +1,39 @@
|
|||||||
|
using System;
|
||||||
|
using Steamworks;
|
||||||
|
using UnityEngine;
|
||||||
|
using UnityEngine.Events;
|
||||||
|
|
||||||
|
|
||||||
|
public class SteamManager : MonoBehaviour
|
||||||
|
{
|
||||||
|
public uint appId;
|
||||||
|
public UnityEvent onSteamFailed;
|
||||||
|
|
||||||
|
private void Awake()
|
||||||
|
{
|
||||||
|
DontDestroyOnLoad(this);
|
||||||
|
try
|
||||||
|
{
|
||||||
|
SteamClient.Init(appId);
|
||||||
|
Debug.Log("Steam is up and running!");
|
||||||
|
}
|
||||||
|
catch (Exception e)
|
||||||
|
{
|
||||||
|
Debug.Log(e.Message);
|
||||||
|
onSteamFailed.Invoke();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private void OnApplicationQuit()
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
Debug.Log("Steam is shutting down!");
|
||||||
|
SteamClient.Shutdown();
|
||||||
|
}
|
||||||
|
catch
|
||||||
|
{
|
||||||
|
Debug.Log("Steam is not running!");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
@ -1,5 +1,5 @@
|
|||||||
fileFormatVersion: 2
|
fileFormatVersion: 2
|
||||||
guid: 1b5f291225ca7c4459871c80128b5172
|
guid: c790abd20c22fc348ac5c95c419527bb
|
||||||
MonoImporter:
|
MonoImporter:
|
||||||
externalObjects: {}
|
externalObjects: {}
|
||||||
serializedVersion: 2
|
serializedVersion: 2
|
@ -1,60 +1,52 @@
|
|||||||
using System.Collections;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
|
using TMPro;
|
||||||
using UnityEngine;
|
using UnityEngine;
|
||||||
using UnityEngine.UI;
|
using UnityEngine.UI;
|
||||||
using TMPro;
|
|
||||||
|
|
||||||
[ExecuteAlways]
|
[ExecuteAlways]
|
||||||
public class ObjectiveText : MonoBehaviour
|
public class ObjectiveText : MonoBehaviour
|
||||||
{
|
{
|
||||||
|
[SerializeField] public List<VisualObjectiveItemGUI> visualObjects;
|
||||||
|
|
||||||
[SerializeField]
|
[SerializeField] private Color inCompleteColor = Color.white;
|
||||||
public List<VisualObjectiveItemGUI> visualObjects;
|
|
||||||
|
|
||||||
[SerializeField]
|
[SerializeField] private Color completeColor = Color.yellow;
|
||||||
private Color inCompleteColor = Color.white;
|
|
||||||
[SerializeField]
|
[SerializeField] private float speed;
|
||||||
private Color completeColor = Color.yellow;
|
|
||||||
[SerializeField]
|
[SerializeField] private Animator animator;
|
||||||
private float speed;
|
|
||||||
[SerializeField]
|
|
||||||
private Animator animator;
|
|
||||||
|
|
||||||
// Start is called before the first frame update
|
// Start is called before the first frame update
|
||||||
void Start()
|
private void Start()
|
||||||
{
|
{
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Update is called once per frame
|
// Update is called once per frame
|
||||||
void Update()
|
private void Update()
|
||||||
{
|
{
|
||||||
foreach(VisualObjectiveItemGUI item in visualObjects)
|
foreach (var item in visualObjects)
|
||||||
{
|
if (item.isComplete)
|
||||||
if (item.isComplete){
|
item.icon.color = Color.Lerp(item.icon.color, completeColor, Time.deltaTime * speed);
|
||||||
item.icon.color = Color.Lerp(item.icon.color, completeColor, Time.deltaTime*speed);
|
|
||||||
}
|
|
||||||
else
|
else
|
||||||
{
|
item.icon.color = Color.Lerp(item.icon.color, inCompleteColor, Time.deltaTime * speed);
|
||||||
item.icon.color = Color.Lerp(item.icon.color,inCompleteColor, Time.deltaTime*speed);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public void FadeOut()
|
public void FadeOut()
|
||||||
{
|
{
|
||||||
animator.Play("FadeOut");
|
animator.Play("FadeOut");
|
||||||
}
|
}
|
||||||
|
|
||||||
public void FadeIn()
|
public void FadeIn()
|
||||||
{
|
{
|
||||||
animator.Play("FadeIn");
|
animator.Play("FadeIn");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
[System.Serializable]
|
[Serializable]
|
||||||
public class VisualObjectiveItemGUI
|
public class VisualObjectiveItemGUI
|
||||||
{
|
{
|
||||||
public TMP_Text text;
|
public TMP_Text text;
|
||||||
public Image icon;
|
public Image icon;
|
||||||
public bool isComplete = false;
|
public bool isComplete;
|
||||||
|
|
||||||
}
|
}
|
@ -1,60 +1,49 @@
|
|||||||
using System.Collections;
|
using TMPro;
|
||||||
using System.Collections.Generic;
|
|
||||||
using UnityEngine;
|
using UnityEngine;
|
||||||
using UnityEngine.UI;
|
using UnityEngine.UI;
|
||||||
using TMPro;
|
|
||||||
|
|
||||||
public class WaypointMarker : MonoBehaviour
|
public class WaypointMarker : MonoBehaviour
|
||||||
{
|
{
|
||||||
public Image pointer;
|
public Image pointer;
|
||||||
public Transform target;
|
public Transform target;
|
||||||
public TMP_Text distanceMarker;
|
public TMP_Text distanceMarker;
|
||||||
|
|
||||||
private Vector2 offset;
|
private Vector2 offset;
|
||||||
|
|
||||||
// Start is called before the first frame update
|
// Start is called before the first frame update
|
||||||
void Start()
|
private void Start()
|
||||||
{
|
{
|
||||||
offset = distanceMarker.transform.position - pointer.transform.position;
|
offset = distanceMarker.transform.position - pointer.transform.position;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Update is called once per frame
|
// Update is called once per frame
|
||||||
void Update()
|
private void Update()
|
||||||
{
|
{
|
||||||
float minX = pointer.GetPixelAdjustedRect().width / 2;
|
var minX = pointer.GetPixelAdjustedRect().width / 2;
|
||||||
float maxX = Screen.width - minX;
|
var maxX = Screen.width - minX;
|
||||||
float minY = pointer.GetPixelAdjustedRect().height / 2;
|
var minY = pointer.GetPixelAdjustedRect().height / 2;
|
||||||
float maxY = Screen.height - minY;
|
var maxY = Screen.height - minY;
|
||||||
|
|
||||||
Vector2 pos = Camera.main.WorldToScreenPoint(target.position);
|
Vector2 pos = Camera.main.WorldToScreenPoint(target.position);
|
||||||
|
|
||||||
if (Vector3.Dot(target.position - Camera.main.transform.position, Camera.main.transform.forward) < 0)
|
if (Vector3.Dot(target.position - Camera.main.transform.position, Camera.main.transform.forward) < 0)
|
||||||
{
|
{
|
||||||
//target is behind player
|
//target is behind player
|
||||||
if(pos.x < Screen.width / 2)
|
if (pos.x < Screen.width / 2)
|
||||||
{
|
|
||||||
pos.x = maxX;
|
pos.x = maxX;
|
||||||
}
|
|
||||||
else
|
else
|
||||||
{
|
|
||||||
pos.x = minX;
|
pos.x = minX;
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
pos.x = Mathf.Clamp(pos.x, minX, maxX);
|
pos.x = Mathf.Clamp(pos.x, minX, maxX);
|
||||||
pos.y = Mathf.Clamp(pos.y, minY, maxY);
|
pos.y = Mathf.Clamp(pos.y, minY, maxY);
|
||||||
|
|
||||||
pointer.transform.position = pos;
|
pointer.transform.position = pos;
|
||||||
distanceMarker.text = Mathf.RoundToInt(Vector3.Distance(Camera.main.transform.position, target.transform.position)).ToString() + " meters";
|
distanceMarker.text =
|
||||||
|
Mathf.RoundToInt(Vector3.Distance(Camera.main.transform.position, target.transform.position)) + " meters";
|
||||||
if (pos.x < Screen.width / 2)
|
if (pos.x < Screen.width / 2)
|
||||||
{
|
|
||||||
distanceMarker.transform.position = pos + offset;
|
distanceMarker.transform.position = pos + offset;
|
||||||
|
|
||||||
}
|
|
||||||
else
|
else
|
||||||
{
|
|
||||||
distanceMarker.transform.position = pos - offset;
|
distanceMarker.transform.position = pos - offset;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
}
|
@ -1,156 +1,416 @@
|
|||||||
{"frames": [
|
|
||||||
|
|
||||||
{
|
{
|
||||||
|
"frames": [
|
||||||
|
{
|
||||||
"filename": "1f60a.png",
|
"filename": "1f60a.png",
|
||||||
"frame": {"x":0,"y":0,"w":128,"h":128},
|
"frame": {
|
||||||
|
"x": 0,
|
||||||
|
"y": 0,
|
||||||
|
"w": 128,
|
||||||
|
"h": 128
|
||||||
|
},
|
||||||
"rotated": false,
|
"rotated": false,
|
||||||
"trimmed": false,
|
"trimmed": false,
|
||||||
"spriteSourceSize": {"x":0,"y":0,"w":128,"h":128},
|
"spriteSourceSize": {
|
||||||
"sourceSize": {"w":128,"h":128},
|
"x": 0,
|
||||||
"pivot": {"x":0.5,"y":0.5}
|
"y": 0,
|
||||||
},
|
"w": 128,
|
||||||
{
|
"h": 128
|
||||||
|
},
|
||||||
|
"sourceSize": {
|
||||||
|
"w": 128,
|
||||||
|
"h": 128
|
||||||
|
},
|
||||||
|
"pivot": {
|
||||||
|
"x": 0.5,
|
||||||
|
"y": 0.5
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
"filename": "1f60b.png",
|
"filename": "1f60b.png",
|
||||||
"frame": {"x":128,"y":0,"w":128,"h":128},
|
"frame": {
|
||||||
|
"x": 128,
|
||||||
|
"y": 0,
|
||||||
|
"w": 128,
|
||||||
|
"h": 128
|
||||||
|
},
|
||||||
"rotated": false,
|
"rotated": false,
|
||||||
"trimmed": false,
|
"trimmed": false,
|
||||||
"spriteSourceSize": {"x":0,"y":0,"w":128,"h":128},
|
"spriteSourceSize": {
|
||||||
"sourceSize": {"w":128,"h":128},
|
"x": 0,
|
||||||
"pivot": {"x":0.5,"y":0.5}
|
"y": 0,
|
||||||
},
|
"w": 128,
|
||||||
{
|
"h": 128
|
||||||
|
},
|
||||||
|
"sourceSize": {
|
||||||
|
"w": 128,
|
||||||
|
"h": 128
|
||||||
|
},
|
||||||
|
"pivot": {
|
||||||
|
"x": 0.5,
|
||||||
|
"y": 0.5
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
"filename": "1f60d.png",
|
"filename": "1f60d.png",
|
||||||
"frame": {"x":256,"y":0,"w":128,"h":128},
|
"frame": {
|
||||||
|
"x": 256,
|
||||||
|
"y": 0,
|
||||||
|
"w": 128,
|
||||||
|
"h": 128
|
||||||
|
},
|
||||||
"rotated": false,
|
"rotated": false,
|
||||||
"trimmed": false,
|
"trimmed": false,
|
||||||
"spriteSourceSize": {"x":0,"y":0,"w":128,"h":128},
|
"spriteSourceSize": {
|
||||||
"sourceSize": {"w":128,"h":128},
|
"x": 0,
|
||||||
"pivot": {"x":0.5,"y":0.5}
|
"y": 0,
|
||||||
},
|
"w": 128,
|
||||||
{
|
"h": 128
|
||||||
|
},
|
||||||
|
"sourceSize": {
|
||||||
|
"w": 128,
|
||||||
|
"h": 128
|
||||||
|
},
|
||||||
|
"pivot": {
|
||||||
|
"x": 0.5,
|
||||||
|
"y": 0.5
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
"filename": "1f60e.png",
|
"filename": "1f60e.png",
|
||||||
"frame": {"x":384,"y":0,"w":128,"h":128},
|
"frame": {
|
||||||
|
"x": 384,
|
||||||
|
"y": 0,
|
||||||
|
"w": 128,
|
||||||
|
"h": 128
|
||||||
|
},
|
||||||
"rotated": false,
|
"rotated": false,
|
||||||
"trimmed": false,
|
"trimmed": false,
|
||||||
"spriteSourceSize": {"x":0,"y":0,"w":128,"h":128},
|
"spriteSourceSize": {
|
||||||
"sourceSize": {"w":128,"h":128},
|
"x": 0,
|
||||||
"pivot": {"x":0.5,"y":0.5}
|
"y": 0,
|
||||||
},
|
"w": 128,
|
||||||
{
|
"h": 128
|
||||||
|
},
|
||||||
|
"sourceSize": {
|
||||||
|
"w": 128,
|
||||||
|
"h": 128
|
||||||
|
},
|
||||||
|
"pivot": {
|
||||||
|
"x": 0.5,
|
||||||
|
"y": 0.5
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
"filename": "1f600.png",
|
"filename": "1f600.png",
|
||||||
"frame": {"x":0,"y":128,"w":128,"h":128},
|
"frame": {
|
||||||
|
"x": 0,
|
||||||
|
"y": 128,
|
||||||
|
"w": 128,
|
||||||
|
"h": 128
|
||||||
|
},
|
||||||
"rotated": false,
|
"rotated": false,
|
||||||
"trimmed": false,
|
"trimmed": false,
|
||||||
"spriteSourceSize": {"x":0,"y":0,"w":128,"h":128},
|
"spriteSourceSize": {
|
||||||
"sourceSize": {"w":128,"h":128},
|
"x": 0,
|
||||||
"pivot": {"x":0.5,"y":0.5}
|
"y": 0,
|
||||||
},
|
"w": 128,
|
||||||
{
|
"h": 128
|
||||||
|
},
|
||||||
|
"sourceSize": {
|
||||||
|
"w": 128,
|
||||||
|
"h": 128
|
||||||
|
},
|
||||||
|
"pivot": {
|
||||||
|
"x": 0.5,
|
||||||
|
"y": 0.5
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
"filename": "1f601.png",
|
"filename": "1f601.png",
|
||||||
"frame": {"x":128,"y":128,"w":128,"h":128},
|
"frame": {
|
||||||
|
"x": 128,
|
||||||
|
"y": 128,
|
||||||
|
"w": 128,
|
||||||
|
"h": 128
|
||||||
|
},
|
||||||
"rotated": false,
|
"rotated": false,
|
||||||
"trimmed": false,
|
"trimmed": false,
|
||||||
"spriteSourceSize": {"x":0,"y":0,"w":128,"h":128},
|
"spriteSourceSize": {
|
||||||
"sourceSize": {"w":128,"h":128},
|
"x": 0,
|
||||||
"pivot": {"x":0.5,"y":0.5}
|
"y": 0,
|
||||||
},
|
"w": 128,
|
||||||
{
|
"h": 128
|
||||||
|
},
|
||||||
|
"sourceSize": {
|
||||||
|
"w": 128,
|
||||||
|
"h": 128
|
||||||
|
},
|
||||||
|
"pivot": {
|
||||||
|
"x": 0.5,
|
||||||
|
"y": 0.5
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
"filename": "1f602.png",
|
"filename": "1f602.png",
|
||||||
"frame": {"x":256,"y":128,"w":128,"h":128},
|
"frame": {
|
||||||
|
"x": 256,
|
||||||
|
"y": 128,
|
||||||
|
"w": 128,
|
||||||
|
"h": 128
|
||||||
|
},
|
||||||
"rotated": false,
|
"rotated": false,
|
||||||
"trimmed": false,
|
"trimmed": false,
|
||||||
"spriteSourceSize": {"x":0,"y":0,"w":128,"h":128},
|
"spriteSourceSize": {
|
||||||
"sourceSize": {"w":128,"h":128},
|
"x": 0,
|
||||||
"pivot": {"x":0.5,"y":0.5}
|
"y": 0,
|
||||||
},
|
"w": 128,
|
||||||
{
|
"h": 128
|
||||||
|
},
|
||||||
|
"sourceSize": {
|
||||||
|
"w": 128,
|
||||||
|
"h": 128
|
||||||
|
},
|
||||||
|
"pivot": {
|
||||||
|
"x": 0.5,
|
||||||
|
"y": 0.5
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
"filename": "1f603.png",
|
"filename": "1f603.png",
|
||||||
"frame": {"x":384,"y":128,"w":128,"h":128},
|
"frame": {
|
||||||
|
"x": 384,
|
||||||
|
"y": 128,
|
||||||
|
"w": 128,
|
||||||
|
"h": 128
|
||||||
|
},
|
||||||
"rotated": false,
|
"rotated": false,
|
||||||
"trimmed": false,
|
"trimmed": false,
|
||||||
"spriteSourceSize": {"x":0,"y":0,"w":128,"h":128},
|
"spriteSourceSize": {
|
||||||
"sourceSize": {"w":128,"h":128},
|
"x": 0,
|
||||||
"pivot": {"x":0.5,"y":0.5}
|
"y": 0,
|
||||||
},
|
"w": 128,
|
||||||
{
|
"h": 128
|
||||||
|
},
|
||||||
|
"sourceSize": {
|
||||||
|
"w": 128,
|
||||||
|
"h": 128
|
||||||
|
},
|
||||||
|
"pivot": {
|
||||||
|
"x": 0.5,
|
||||||
|
"y": 0.5
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
"filename": "1f604.png",
|
"filename": "1f604.png",
|
||||||
"frame": {"x":0,"y":256,"w":128,"h":128},
|
"frame": {
|
||||||
|
"x": 0,
|
||||||
|
"y": 256,
|
||||||
|
"w": 128,
|
||||||
|
"h": 128
|
||||||
|
},
|
||||||
"rotated": false,
|
"rotated": false,
|
||||||
"trimmed": false,
|
"trimmed": false,
|
||||||
"spriteSourceSize": {"x":0,"y":0,"w":128,"h":128},
|
"spriteSourceSize": {
|
||||||
"sourceSize": {"w":128,"h":128},
|
"x": 0,
|
||||||
"pivot": {"x":0.5,"y":0.5}
|
"y": 0,
|
||||||
},
|
"w": 128,
|
||||||
{
|
"h": 128
|
||||||
|
},
|
||||||
|
"sourceSize": {
|
||||||
|
"w": 128,
|
||||||
|
"h": 128
|
||||||
|
},
|
||||||
|
"pivot": {
|
||||||
|
"x": 0.5,
|
||||||
|
"y": 0.5
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
"filename": "1f605.png",
|
"filename": "1f605.png",
|
||||||
"frame": {"x":128,"y":256,"w":128,"h":128},
|
"frame": {
|
||||||
|
"x": 128,
|
||||||
|
"y": 256,
|
||||||
|
"w": 128,
|
||||||
|
"h": 128
|
||||||
|
},
|
||||||
"rotated": false,
|
"rotated": false,
|
||||||
"trimmed": false,
|
"trimmed": false,
|
||||||
"spriteSourceSize": {"x":0,"y":0,"w":128,"h":128},
|
"spriteSourceSize": {
|
||||||
"sourceSize": {"w":128,"h":128},
|
"x": 0,
|
||||||
"pivot": {"x":0.5,"y":0.5}
|
"y": 0,
|
||||||
},
|
"w": 128,
|
||||||
{
|
"h": 128
|
||||||
|
},
|
||||||
|
"sourceSize": {
|
||||||
|
"w": 128,
|
||||||
|
"h": 128
|
||||||
|
},
|
||||||
|
"pivot": {
|
||||||
|
"x": 0.5,
|
||||||
|
"y": 0.5
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
"filename": "1f606.png",
|
"filename": "1f606.png",
|
||||||
"frame": {"x":256,"y":256,"w":128,"h":128},
|
"frame": {
|
||||||
|
"x": 256,
|
||||||
|
"y": 256,
|
||||||
|
"w": 128,
|
||||||
|
"h": 128
|
||||||
|
},
|
||||||
"rotated": false,
|
"rotated": false,
|
||||||
"trimmed": false,
|
"trimmed": false,
|
||||||
"spriteSourceSize": {"x":0,"y":0,"w":128,"h":128},
|
"spriteSourceSize": {
|
||||||
"sourceSize": {"w":128,"h":128},
|
"x": 0,
|
||||||
"pivot": {"x":0.5,"y":0.5}
|
"y": 0,
|
||||||
},
|
"w": 128,
|
||||||
{
|
"h": 128
|
||||||
|
},
|
||||||
|
"sourceSize": {
|
||||||
|
"w": 128,
|
||||||
|
"h": 128
|
||||||
|
},
|
||||||
|
"pivot": {
|
||||||
|
"x": 0.5,
|
||||||
|
"y": 0.5
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
"filename": "1f609.png",
|
"filename": "1f609.png",
|
||||||
"frame": {"x":384,"y":256,"w":128,"h":128},
|
"frame": {
|
||||||
|
"x": 384,
|
||||||
|
"y": 256,
|
||||||
|
"w": 128,
|
||||||
|
"h": 128
|
||||||
|
},
|
||||||
"rotated": false,
|
"rotated": false,
|
||||||
"trimmed": false,
|
"trimmed": false,
|
||||||
"spriteSourceSize": {"x":0,"y":0,"w":128,"h":128},
|
"spriteSourceSize": {
|
||||||
"sourceSize": {"w":128,"h":128},
|
"x": 0,
|
||||||
"pivot": {"x":0.5,"y":0.5}
|
"y": 0,
|
||||||
},
|
"w": 128,
|
||||||
{
|
"h": 128
|
||||||
|
},
|
||||||
|
"sourceSize": {
|
||||||
|
"w": 128,
|
||||||
|
"h": 128
|
||||||
|
},
|
||||||
|
"pivot": {
|
||||||
|
"x": 0.5,
|
||||||
|
"y": 0.5
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
"filename": "1f618.png",
|
"filename": "1f618.png",
|
||||||
"frame": {"x":0,"y":384,"w":128,"h":128},
|
"frame": {
|
||||||
|
"x": 0,
|
||||||
|
"y": 384,
|
||||||
|
"w": 128,
|
||||||
|
"h": 128
|
||||||
|
},
|
||||||
"rotated": false,
|
"rotated": false,
|
||||||
"trimmed": false,
|
"trimmed": false,
|
||||||
"spriteSourceSize": {"x":0,"y":0,"w":128,"h":128},
|
"spriteSourceSize": {
|
||||||
"sourceSize": {"w":128,"h":128},
|
"x": 0,
|
||||||
"pivot": {"x":0.5,"y":0.5}
|
"y": 0,
|
||||||
},
|
"w": 128,
|
||||||
{
|
"h": 128
|
||||||
|
},
|
||||||
|
"sourceSize": {
|
||||||
|
"w": 128,
|
||||||
|
"h": 128
|
||||||
|
},
|
||||||
|
"pivot": {
|
||||||
|
"x": 0.5,
|
||||||
|
"y": 0.5
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
"filename": "1f923.png",
|
"filename": "1f923.png",
|
||||||
"frame": {"x":128,"y":384,"w":128,"h":128},
|
"frame": {
|
||||||
|
"x": 128,
|
||||||
|
"y": 384,
|
||||||
|
"w": 128,
|
||||||
|
"h": 128
|
||||||
|
},
|
||||||
"rotated": false,
|
"rotated": false,
|
||||||
"trimmed": false,
|
"trimmed": false,
|
||||||
"spriteSourceSize": {"x":0,"y":0,"w":128,"h":128},
|
"spriteSourceSize": {
|
||||||
"sourceSize": {"w":128,"h":128},
|
"x": 0,
|
||||||
"pivot": {"x":0.5,"y":0.5}
|
"y": 0,
|
||||||
},
|
"w": 128,
|
||||||
{
|
"h": 128
|
||||||
|
},
|
||||||
|
"sourceSize": {
|
||||||
|
"w": 128,
|
||||||
|
"h": 128
|
||||||
|
},
|
||||||
|
"pivot": {
|
||||||
|
"x": 0.5,
|
||||||
|
"y": 0.5
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
"filename": "263a.png",
|
"filename": "263a.png",
|
||||||
"frame": {"x":256,"y":384,"w":128,"h":128},
|
"frame": {
|
||||||
|
"x": 256,
|
||||||
|
"y": 384,
|
||||||
|
"w": 128,
|
||||||
|
"h": 128
|
||||||
|
},
|
||||||
"rotated": false,
|
"rotated": false,
|
||||||
"trimmed": false,
|
"trimmed": false,
|
||||||
"spriteSourceSize": {"x":0,"y":0,"w":128,"h":128},
|
"spriteSourceSize": {
|
||||||
"sourceSize": {"w":128,"h":128},
|
"x": 0,
|
||||||
"pivot": {"x":0.5,"y":0.5}
|
"y": 0,
|
||||||
},
|
"w": 128,
|
||||||
{
|
"h": 128
|
||||||
|
},
|
||||||
|
"sourceSize": {
|
||||||
|
"w": 128,
|
||||||
|
"h": 128
|
||||||
|
},
|
||||||
|
"pivot": {
|
||||||
|
"x": 0.5,
|
||||||
|
"y": 0.5
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
"filename": "2639.png",
|
"filename": "2639.png",
|
||||||
"frame": {"x":384,"y":384,"w":128,"h":128},
|
"frame": {
|
||||||
|
"x": 384,
|
||||||
|
"y": 384,
|
||||||
|
"w": 128,
|
||||||
|
"h": 128
|
||||||
|
},
|
||||||
"rotated": false,
|
"rotated": false,
|
||||||
"trimmed": false,
|
"trimmed": false,
|
||||||
"spriteSourceSize": {"x":0,"y":0,"w":128,"h":128},
|
"spriteSourceSize": {
|
||||||
"sourceSize": {"w":128,"h":128},
|
"x": 0,
|
||||||
"pivot": {"x":0.5,"y":0.5}
|
"y": 0,
|
||||||
}],
|
"w": 128,
|
||||||
"meta": {
|
"h": 128
|
||||||
|
},
|
||||||
|
"sourceSize": {
|
||||||
|
"w": 128,
|
||||||
|
"h": 128
|
||||||
|
},
|
||||||
|
"pivot": {
|
||||||
|
"x": 0.5,
|
||||||
|
"y": 0.5
|
||||||
|
}
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"meta": {
|
||||||
"app": "http://www.codeandweb.com/texturepacker",
|
"app": "http://www.codeandweb.com/texturepacker",
|
||||||
"version": "1.0",
|
"version": "1.0",
|
||||||
"image": "EmojiOne.png",
|
"image": "EmojiOne.png",
|
||||||
"format": "RGBA8888",
|
"format": "RGBA8888",
|
||||||
"size": {"w":512,"h":512},
|
"size": {
|
||||||
|
"w": 512,
|
||||||
|
"h": 512
|
||||||
|
},
|
||||||
"scale": "1",
|
"scale": "1",
|
||||||
"smartupdate": "$TexturePacker:SmartUpdate:196a26a2e149d875b91ffc8fa3581e76:fc928c7e275404b7e0649307410475cb:424723c3774975ddb2053fd5c4b85f6e$"
|
"smartupdate": "$TexturePacker:SmartUpdate:196a26a2e149d875b91ffc8fa3581e76:fc928c7e275404b7e0649307410475cb:424723c3774975ddb2053fd5c4b85f6e$"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
"com.unity.cinemachine": "2.8.9",
|
"com.unity.cinemachine": "2.8.9",
|
||||||
"com.unity.collab-proxy": "2.0.0",
|
"com.unity.collab-proxy": "2.0.0",
|
||||||
"com.unity.feature.development": "1.0.1",
|
"com.unity.feature.development": "1.0.1",
|
||||||
"com.unity.ide.rider": "3.0.18",
|
"com.unity.ide.rider": "3.0.22",
|
||||||
"com.unity.ide.visualstudio": "2.0.17",
|
"com.unity.ide.visualstudio": "2.0.17",
|
||||||
"com.unity.ide.vscode": "1.2.5",
|
"com.unity.ide.vscode": "1.2.5",
|
||||||
"com.unity.inputsystem": "1.4.4",
|
"com.unity.inputsystem": "1.4.4",
|
||||||
@ -12,6 +12,7 @@
|
|||||||
"com.unity.textmeshpro": "3.0.6",
|
"com.unity.textmeshpro": "3.0.6",
|
||||||
"com.unity.timeline": "1.6.4",
|
"com.unity.timeline": "1.6.4",
|
||||||
"com.unity.toolchain.linux-x86_64": "2.0.5",
|
"com.unity.toolchain.linux-x86_64": "2.0.5",
|
||||||
|
"com.unity.toolchain.win-x86_64-linux-x86_64": "2.0.5",
|
||||||
"com.unity.ugui": "1.0.0",
|
"com.unity.ugui": "1.0.0",
|
||||||
"com.unity.visualscripting": "1.8.0",
|
"com.unity.visualscripting": "1.8.0",
|
||||||
"com.unity.modules.ai": "1.0.0",
|
"com.unity.modules.ai": "1.0.0",
|
||||||
|
@ -54,7 +54,7 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"com.unity.ide.rider": {
|
"com.unity.ide.rider": {
|
||||||
"version": "3.0.18",
|
"version": "3.0.22",
|
||||||
"depth": 0,
|
"depth": 0,
|
||||||
"source": "registry",
|
"source": "registry",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
@ -227,6 +227,16 @@
|
|||||||
},
|
},
|
||||||
"url": "https://packages.unity.com"
|
"url": "https://packages.unity.com"
|
||||||
},
|
},
|
||||||
|
"com.unity.toolchain.win-x86_64-linux-x86_64": {
|
||||||
|
"version": "2.0.5",
|
||||||
|
"depth": 0,
|
||||||
|
"source": "registry",
|
||||||
|
"dependencies": {
|
||||||
|
"com.unity.sysroot": "2.0.6",
|
||||||
|
"com.unity.sysroot.linux-x86_64": "2.0.5"
|
||||||
|
},
|
||||||
|
"url": "https://packages.unity.com"
|
||||||
|
},
|
||||||
"com.unity.ugui": {
|
"com.unity.ugui": {
|
||||||
"version": "1.0.0",
|
"version": "1.0.0",
|
||||||
"depth": 0,
|
"depth": 0,
|
||||||
|
Reference in New Issue
Block a user