Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
fd0c6fea0c | ||
|
|
6e43949591 | ||
|
|
cb176962a9 | ||
|
|
dfd4014286 | ||
|
|
706c128369 | ||
|
|
14c99f1b7d | ||
|
|
cb335c78ec | ||
|
|
d557e098b8 | ||
|
|
1a498ce99d | ||
|
|
b78957739c | ||
|
|
2d38838efd | ||
|
|
5c158aed5e | ||
|
|
7362c7f57e | ||
|
|
b57c4f8202 | ||
|
|
f57c7313c6 | ||
|
|
2aca024b1c |
@@ -1,25 +1,21 @@
|
||||
<Project>
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<!-- Generated file, do not modify, your changes will be overwritten (use AssetPostprocessor.OnGeneratedCSProject) -->
|
||||
<PropertyGroup>
|
||||
<BaseIntermediateOutputPath>Temp\obj\$(MSBuildProjectName)</BaseIntermediateOutputPath>
|
||||
<IntermediateOutputPath>$(BaseIntermediateOutputPath)</IntermediateOutputPath>
|
||||
<AppendTargetFrameworkToOutputPath>false</AppendTargetFrameworkToOutputPath>
|
||||
<UseCommonOutputDirectory>true</UseCommonOutputDirectory>
|
||||
<OutputPath>Temp\bin\Debug\</OutputPath>
|
||||
</PropertyGroup>
|
||||
<Import Project="Sdk.props" Sdk="Microsoft.NET.Sdk" />
|
||||
<ItemGroup>
|
||||
<ProjectCapability Include="Unity" />
|
||||
<ProjectCapability Include="EnableOnDemandExcludedFolderLoading" />
|
||||
</ItemGroup>
|
||||
<PropertyGroup>
|
||||
<GenerateAssemblyInfo>false</GenerateAssemblyInfo>
|
||||
<EnableDefaultItems>false</EnableDefaultItems>
|
||||
<LangVersion>9.0</LangVersion>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup>
|
||||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
||||
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
|
||||
<ProductVersion>10.0.20506</ProductVersion>
|
||||
<SchemaVersion>2.0</SchemaVersion>
|
||||
<RootNamespace></RootNamespace>
|
||||
<ProjectGuid>{1E981750-D248-28D9-7629-4D5A5BCFF26D}</ProjectGuid>
|
||||
<OutputType>Library</OutputType>
|
||||
<AppDesignerFolder>Properties</AppDesignerFolder>
|
||||
<AssemblyName>Assembly-CSharp</AssemblyName>
|
||||
<TargetFramework>netstandard2.1</TargetFramework>
|
||||
<TargetFrameworkVersion>v4.7.1</TargetFrameworkVersion>
|
||||
<FileAlignment>512</FileAlignment>
|
||||
<BaseDirectory>.</BaseDirectory>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup>
|
||||
@@ -27,23 +23,38 @@
|
||||
<DefineConstants>UNITY_6000_3_6;UNITY_6000_3;UNITY_6000;UNITY_5_3_OR_NEWER;UNITY_5_4_OR_NEWER;UNITY_5_5_OR_NEWER;UNITY_5_6_OR_NEWER;UNITY_2017_1_OR_NEWER;UNITY_2017_2_OR_NEWER;UNITY_2017_3_OR_NEWER;UNITY_2017_4_OR_NEWER;UNITY_2018_1_OR_NEWER;UNITY_2018_2_OR_NEWER;UNITY_2018_3_OR_NEWER;UNITY_2018_4_OR_NEWER;UNITY_2019_1_OR_NEWER;UNITY_2019_2_OR_NEWER;UNITY_2019_3_OR_NEWER;UNITY_2019_4_OR_NEWER;UNITY_2020_1_OR_NEWER;UNITY_2020_2_OR_NEWER;UNITY_2020_3_OR_NEWER;UNITY_2021_1_OR_NEWER;UNITY_2021_2_OR_NEWER;UNITY_2021_3_OR_NEWER;UNITY_2022_1_OR_NEWER;UNITY_2022_2_OR_NEWER;UNITY_2022_3_OR_NEWER;UNITY_2023_1_OR_NEWER;UNITY_2023_2_OR_NEWER;UNITY_2023_3_OR_NEWER;UNITY_6000_0_OR_NEWER;UNITY_6000_1_OR_NEWER;UNITY_6000_2_OR_NEWER;UNITY_6000_3_OR_NEWER;PLATFORM_ARCH_64;UNITY_64;UNITY_INCLUDE_TESTS;ENABLE_AR;ENABLE_AUDIO;ENABLE_AUDIO_SCRIPTABLE_PIPELINE;ENABLE_CACHING;ENABLE_CLOTH;ENABLE_EVENT_QUEUE;ENABLE_MICROPHONE;ENABLE_MULTIPLE_DISPLAYS;ENABLE_PHYSICS;ENABLE_TEXTURE_STREAMING;ENABLE_VIRTUALTEXTURING;ENABLE_LZMA;ENABLE_UNITYEVENTS;ENABLE_VR;ENABLE_WEBCAM;ENABLE_UNITYWEBREQUEST;ENABLE_WWW;ENABLE_CLOUD_SERVICES;ENABLE_CLOUD_SERVICES_ADS;ENABLE_CLOUD_SERVICES_USE_WEBREQUEST;ENABLE_UNITY_CONSENT;ENABLE_UNITY_CLOUD_IDENTIFIERS;ENABLE_CLOUD_SERVICES_CRASH_REPORTING;ENABLE_CLOUD_SERVICES_NATIVE_CRASH_REPORTING;ENABLE_CLOUD_SERVICES_PURCHASING;ENABLE_CLOUD_SERVICES_ANALYTICS;ENABLE_CLOUD_SERVICES_BUILD;ENABLE_EDITOR_GAME_SERVICES;ENABLE_UNITY_GAME_SERVICES_ANALYTICS_SUPPORT;ENABLE_CLOUD_LICENSE;ENABLE_EDITOR_HUB_LICENSE;ENABLE_WEBSOCKET_CLIENT;ENABLE_GENERATE_NATIVE_PLUGINS_FOR_ASSEMBLIES_API;ENABLE_DIRECTOR_AUDIO;ENABLE_DIRECTOR_TEXTURE;ENABLE_MANAGED_JOBS;ENABLE_MANAGED_TRANSFORM_JOBS;ENABLE_MANAGED_ANIMATION_JOBS;ENABLE_MANAGED_AUDIO_JOBS;ENABLE_MANAGED_UNITYTLS;INCLUDE_DYNAMIC_GI;ENABLE_SCRIPTING_GC_WBARRIERS;PLATFORM_SUPPORTS_MONO;RENDER_SOFTWARE_CURSOR;ENABLE_MARSHALLING_TESTS;ENABLE_VIDEO;ENABLE_NAVIGATION_OFFMESHLINK_TO_NAVMESHLINK;ENABLE_ACCELERATOR_CLIENT_DEBUGGING;ENABLE_ACCESSIBILITY_SCREEN_READER;TEXTCORE_1_0_OR_NEWER;EDITOR_ONLY_NAVMESH_BUILDER_DEPRECATED;PLATFORM_STANDALONE_WIN;PLATFORM_STANDALONE;UNITY_STANDALONE_WIN;UNITY_STANDALONE;ENABLE_RUNTIME_GI;ENABLE_MOVIES;ENABLE_NETWORK;ENABLE_NVIDIA;ENABLE_AMD;ENABLE_CRUNCH_TEXTURE_COMPRESSION;ENABLE_CLOUD_SERVICES_ENGINE_DIAGNOSTICS;ENABLE_OUT_OF_PROCESS_CRASH_HANDLER;ENABLE_CLUSTER_SYNC;ENABLE_CLUSTERINPUT;PLATFORM_UPDATES_TIME_OUTSIDE_OF_PLAYER_LOOP;GFXDEVICE_WAITFOREVENT_MESSAGEPUMP;PLATFORM_USES_EXPLICIT_MEMORY_MANAGER_INITIALIZER;PLATFORM_SUPPORTS_WAIT_FOR_PRESENTATION;PLATFORM_SUPPORTS_SPLIT_GRAPHICS_JOBS;ENABLE_MONO;NET_STANDARD_2_0;NET_STANDARD;NET_STANDARD_2_1;NETSTANDARD;NETSTANDARD2_1;ENABLE_PROFILER;DEBUG;TRACE;UNITY_ASSERTIONS;UNITY_EDITOR;UNITY_EDITOR_64;UNITY_EDITOR_WIN;ENABLE_UNITY_COLLECTIONS_CHECKS;ENABLE_BURST_AOT;UNITY_TEAM_LICENSE;ENABLE_CUSTOM_RENDER_TEXTURE;ENABLE_DIRECTOR;ENABLE_LOCALIZATION;ENABLE_SPRITES;ENABLE_TERRAIN;ENABLE_TILEMAP;ENABLE_TIMELINE;ENABLE_INPUT_SYSTEM;TEXTCORE_FONT_ENGINE_1_5_OR_NEWER;TEXTCORE_TEXT_ENGINE_1_5_OR_NEWER;TEXTCORE_FONT_ENGINE_1_6_OR_NEWER;CSHARP_7_OR_LATER;CSHARP_7_3_OR_NEWER</DefineConstants>
|
||||
<AllowUnsafeBlocks>False</AllowUnsafeBlocks>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup>
|
||||
<NoStandardLibraries>true</NoStandardLibraries>
|
||||
<NoStdLib>true</NoStdLib>
|
||||
<NoConfig>true</NoConfig>
|
||||
<DisableImplicitFrameworkReferences>true</DisableImplicitFrameworkReferences>
|
||||
<MSBuildWarningsAsMessages>MSB3277</MSBuildWarningsAsMessages>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
|
||||
<DebugSymbols>true</DebugSymbols>
|
||||
<DebugType>full</DebugType>
|
||||
<Optimize>false</Optimize>
|
||||
<OutputPath>Temp\bin\Debug\</OutputPath>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
|
||||
<DebugType>pdbonly</DebugType>
|
||||
<Optimize>true</Optimize>
|
||||
<OutputPath>Temp\bin\Release\</OutputPath>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup>
|
||||
<NoConfig>true</NoConfig>
|
||||
<NoStdLib>true</NoStdLib>
|
||||
<AddAdditionalExplicitAssemblyReferences>false</AddAdditionalExplicitAssemblyReferences>
|
||||
<ImplicitlyExpandNETStandardFacades>false</ImplicitlyExpandNETStandardFacades>
|
||||
<ImplicitlyExpandDesignTimeFacades>false</ImplicitlyExpandDesignTimeFacades>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup>
|
||||
<ProjectTypeGuids>{E097FAD1-6243-4DAD-9C02-E9B9EFC3FFC1};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
|
||||
<UnityProjectGenerator>Package</UnityProjectGenerator>
|
||||
<UnityProjectGeneratorVersion>2.0.26</UnityProjectGeneratorVersion>
|
||||
<UnityProjectGeneratorStyle>SDK</UnityProjectGeneratorStyle>
|
||||
<UnityProjectGeneratorStyle>Legacy</UnityProjectGeneratorStyle>
|
||||
<UnityProjectType>Game:1</UnityProjectType>
|
||||
<UnityBuildTarget>StandaloneWindows64:19</UnityBuildTarget>
|
||||
<UnityVersion>6000.3.6f1</UnityVersion>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<Analyzer Include="C:\Users\roegnere\.vscode\extensions\visualstudiotoolsforunity.vstuc-1.2.1\Analyzers\Microsoft.Unity.Analyzers.dll" />
|
||||
<Analyzer Include="C:\Program Files\Unity\Hub\Editor\6000.3.6f1\Editor\Data\Tools\BuildPipeline\Unity.SourceGenerators\Unity.SourceGenerators.dll" />
|
||||
<Analyzer Include="C:\Program Files\Unity\Hub\Editor\6000.3.6f1\Editor\Data\Tools\BuildPipeline\Unity.SourceGenerators\Unity.Properties.SourceGenerator.dll" />
|
||||
<Analyzer Include="C:\Program Files\Unity\Hub\Editor\6000.3.6f1\Editor\Data\Tools\BuildPipeline\Unity.SourceGenerators\Unity.UIToolkit.SourceGenerator.dll" />
|
||||
@@ -66,6 +77,7 @@
|
||||
<Compile Include="Assets\Scripts\CreditsInputHandler.cs" />
|
||||
<Compile Include="Assets\Scripts\LoseGuiController.cs" />
|
||||
<Compile Include="Assets\Scripts\HealthGUIController.cs" />
|
||||
<Compile Include="Assets\Scripts\PlayerAnimationController.cs" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="Assets\UI Toolkit\CreditsGUI.uxml" />
|
||||
@@ -1404,15 +1416,13 @@
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
</ItemGroup>
|
||||
<Import Project="Sdk.targets" Sdk="Microsoft.NET.Sdk" />
|
||||
<ItemGroup>
|
||||
<ProjectCapability Remove="LaunchProfiles" />
|
||||
<ProjectCapability Remove="SharedProjectReferences" />
|
||||
<ProjectCapability Remove="ReferenceManagerSharedProjects" />
|
||||
<ProjectCapability Remove="ReferenceManagerProjects" />
|
||||
<ProjectCapability Remove="COMReferences" />
|
||||
<ProjectCapability Remove="ReferenceManagerCOM" />
|
||||
<ProjectCapability Remove="AssemblyReferences" />
|
||||
<ProjectCapability Remove="ReferenceManagerAssemblies" />
|
||||
</ItemGroup>
|
||||
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
||||
<Target Name="GenerateTargetFrameworkMonikerAttribute" />
|
||||
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
|
||||
Other similar extension points exist, see Microsoft.Common.targets.
|
||||
<Target Name="BeforeBuild">
|
||||
</Target>
|
||||
<Target Name="AfterBuild">
|
||||
</Target>
|
||||
-->
|
||||
</Project>
|
||||
|
||||
@@ -135,6 +135,31 @@ AnimatorState:
|
||||
m_MirrorParameter:
|
||||
m_CycleOffsetParameter:
|
||||
m_TimeParameter:
|
||||
--- !u!1101 &-6621590539747483612
|
||||
AnimatorStateTransition:
|
||||
m_ObjectHideFlags: 1
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_Name:
|
||||
m_Conditions:
|
||||
- m_ConditionMode: 1
|
||||
m_ConditionEvent: isCollapsed
|
||||
m_EventTreshold: 0
|
||||
m_DstStateMachine: {fileID: 0}
|
||||
m_DstState: {fileID: -1210443090960147805}
|
||||
m_Solo: 0
|
||||
m_Mute: 0
|
||||
m_IsExit: 0
|
||||
serializedVersion: 3
|
||||
m_TransitionDuration: 0.25
|
||||
m_TransitionOffset: 0
|
||||
m_ExitTime: 0.7692308
|
||||
m_HasExitTime: 1
|
||||
m_HasFixedDuration: 1
|
||||
m_InterruptionSource: 0
|
||||
m_OrderedInterruption: 1
|
||||
m_CanTransitionToSelf: 1
|
||||
--- !u!1101 &-6059084907828803585
|
||||
AnimatorStateTransition:
|
||||
m_ObjectHideFlags: 1
|
||||
@@ -172,6 +197,7 @@ AnimatorState:
|
||||
m_CycleOffset: 0
|
||||
m_Transitions:
|
||||
- {fileID: 3261478500395500566}
|
||||
- {fileID: -6621590539747483612}
|
||||
m_StateMachineBehaviours: []
|
||||
m_Position: {x: 50, y: 50, z: 0}
|
||||
m_IKOnFeet: 0
|
||||
@@ -251,9 +277,6 @@ AnimatorStateTransition:
|
||||
- m_ConditionMode: 1
|
||||
m_ConditionEvent: isJumping
|
||||
m_EventTreshold: 0
|
||||
- m_ConditionMode: 2
|
||||
m_ConditionEvent: isRunning
|
||||
m_EventTreshold: 0
|
||||
m_DstStateMachine: {fileID: 0}
|
||||
m_DstState: {fileID: -5449330869365902308}
|
||||
m_Solo: 0
|
||||
@@ -303,8 +326,7 @@ AnimatorState:
|
||||
m_Name: playerCollapse
|
||||
m_Speed: 1
|
||||
m_CycleOffset: 0
|
||||
m_Transitions:
|
||||
- {fileID: 7973517625427532113}
|
||||
m_Transitions: []
|
||||
m_StateMachineBehaviours: []
|
||||
m_Position: {x: 50, y: 50, z: 0}
|
||||
m_IKOnFeet: 0
|
||||
@@ -758,28 +780,3 @@ AnimatorStateTransition:
|
||||
m_InterruptionSource: 0
|
||||
m_OrderedInterruption: 1
|
||||
m_CanTransitionToSelf: 1
|
||||
--- !u!1101 &7973517625427532113
|
||||
AnimatorStateTransition:
|
||||
m_ObjectHideFlags: 1
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_Name:
|
||||
m_Conditions:
|
||||
- m_ConditionMode: 2
|
||||
m_ConditionEvent: isCollapsed
|
||||
m_EventTreshold: 0
|
||||
m_DstStateMachine: {fileID: 0}
|
||||
m_DstState: {fileID: 7407206800022927606}
|
||||
m_Solo: 0
|
||||
m_Mute: 0
|
||||
m_IsExit: 0
|
||||
serializedVersion: 3
|
||||
m_TransitionDuration: 0.25
|
||||
m_TransitionOffset: 0
|
||||
m_ExitTime: 0.8148148
|
||||
m_HasExitTime: 1
|
||||
m_HasFixedDuration: 1
|
||||
m_InterruptionSource: 0
|
||||
m_OrderedInterruption: 1
|
||||
m_CanTransitionToSelf: 1
|
||||
|
||||
|
After Width: | Height: | Size: 298 KiB |
|
After Width: | Height: | Size: 41 KiB |
|
After Width: | Height: | Size: 129 KiB |
|
After Width: | Height: | Size: 88 KiB |
|
After Width: | Height: | Size: 33 KiB |
|
After Width: | Height: | Size: 1.9 MiB |
|
After Width: | Height: | Size: 306 KiB |
|
After Width: | Height: | Size: 1.2 MiB |
|
After Width: | Height: | Size: 2.1 MiB |
@@ -32,6 +32,15 @@
|
||||
"processors": "",
|
||||
"interactions": "",
|
||||
"initialStateCheck": false
|
||||
},
|
||||
{
|
||||
"name": "Heal",
|
||||
"type": "Button",
|
||||
"id": "96a3c855-05a0-4431-961e-d2552c539bf0",
|
||||
"expectedControlType": "",
|
||||
"processors": "",
|
||||
"interactions": "",
|
||||
"initialStateCheck": false
|
||||
}
|
||||
],
|
||||
"bindings": [
|
||||
@@ -221,6 +230,17 @@
|
||||
"action": "Interact",
|
||||
"isComposite": false,
|
||||
"isPartOfComposite": false
|
||||
},
|
||||
{
|
||||
"name": "",
|
||||
"id": "95d44eae-cbf8-4ad2-9dc3-9e8524118e9f",
|
||||
"path": "<Gamepad>/buttonNorth",
|
||||
"interactions": "",
|
||||
"processors": "",
|
||||
"groups": ";Gamepad",
|
||||
"action": "Heal",
|
||||
"isComposite": false,
|
||||
"isPartOfComposite": false
|
||||
}
|
||||
]
|
||||
},
|
||||
@@ -254,6 +274,15 @@
|
||||
"processors": "",
|
||||
"interactions": "",
|
||||
"initialStateCheck": false
|
||||
},
|
||||
{
|
||||
"name": "Heal",
|
||||
"type": "Button",
|
||||
"id": "d384b3b4-cc86-4a73-a97f-0d04e31417a8",
|
||||
"expectedControlType": "",
|
||||
"processors": "",
|
||||
"interactions": "",
|
||||
"initialStateCheck": false
|
||||
}
|
||||
],
|
||||
"bindings": [
|
||||
@@ -268,6 +297,17 @@
|
||||
"isComposite": false,
|
||||
"isPartOfComposite": false
|
||||
},
|
||||
{
|
||||
"name": "",
|
||||
"id": "d952c2fd-e0f5-4ab9-bbbd-2af129855725",
|
||||
"path": "<Gamepad>/buttonNorth",
|
||||
"interactions": "",
|
||||
"processors": "",
|
||||
"groups": ";Gamepad",
|
||||
"action": "Heal",
|
||||
"isComposite": false,
|
||||
"isPartOfComposite": false
|
||||
},
|
||||
{
|
||||
"name": "",
|
||||
"id": "0bb7b65d-0e9d-4a2a-8bd4-35a4d9f5b7a2",
|
||||
@@ -322,6 +362,15 @@
|
||||
"processors": "",
|
||||
"interactions": "",
|
||||
"initialStateCheck": false
|
||||
},
|
||||
{
|
||||
"name": "Heal",
|
||||
"type": "Button",
|
||||
"id": "56e697eb-9ef8-4e3d-9671-74da02a08793",
|
||||
"expectedControlType": "",
|
||||
"processors": "",
|
||||
"interactions": "",
|
||||
"initialStateCheck": false
|
||||
}
|
||||
],
|
||||
"bindings": [
|
||||
@@ -336,6 +385,17 @@
|
||||
"isComposite": false,
|
||||
"isPartOfComposite": false
|
||||
},
|
||||
{
|
||||
"name": "",
|
||||
"id": "bcba7833-70cc-40cf-aa96-a824333c9112",
|
||||
"path": "<Gamepad>/buttonNorth",
|
||||
"interactions": "",
|
||||
"processors": "",
|
||||
"groups": ";Gamepad",
|
||||
"action": "Heal",
|
||||
"isComposite": false,
|
||||
"isPartOfComposite": false
|
||||
},
|
||||
{
|
||||
"name": "",
|
||||
"id": "a91fe28e-bdb1-4a19-b09b-9bb52dc0940c",
|
||||
@@ -390,6 +450,15 @@
|
||||
"processors": "",
|
||||
"interactions": "",
|
||||
"initialStateCheck": false
|
||||
},
|
||||
{
|
||||
"name": "Heal",
|
||||
"type": "Button",
|
||||
"id": "7eee99e7-4426-4f8f-812f-0562adbbbbd3",
|
||||
"expectedControlType": "",
|
||||
"processors": "",
|
||||
"interactions": "",
|
||||
"initialStateCheck": false
|
||||
}
|
||||
],
|
||||
"bindings": [
|
||||
@@ -404,6 +473,17 @@
|
||||
"isComposite": false,
|
||||
"isPartOfComposite": false
|
||||
},
|
||||
{
|
||||
"name": "",
|
||||
"id": "f5d22357-bf6c-456d-95bb-057bd7d482f9",
|
||||
"path": "<Gamepad>/buttonNorth",
|
||||
"interactions": "",
|
||||
"processors": "",
|
||||
"groups": ";Gamepad",
|
||||
"action": "Heal",
|
||||
"isComposite": false,
|
||||
"isPartOfComposite": false
|
||||
},
|
||||
{
|
||||
"name": "",
|
||||
"id": "0f15df45-ecb7-4a35-8e06-293d50b89001",
|
||||
@@ -1007,4 +1087,4 @@
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,55 @@
|
||||
%YAML 1.1
|
||||
%TAG !u! tag:unity3d.com,2011:
|
||||
--- !u!1 &8062391313330381747
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 191492520573121038}
|
||||
- component: {fileID: 2630265126968092202}
|
||||
m_Layer: 0
|
||||
m_Name: EnemyBarrier
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!4 &191492520573121038
|
||||
Transform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 8062391313330381747}
|
||||
serializedVersion: 2
|
||||
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: 0}
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
--- !u!65 &2630265126968092202
|
||||
BoxCollider:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 8062391313330381747}
|
||||
m_Material: {fileID: 0}
|
||||
m_IncludeLayers:
|
||||
serializedVersion: 2
|
||||
m_Bits: 0
|
||||
m_ExcludeLayers:
|
||||
serializedVersion: 2
|
||||
m_Bits: 0
|
||||
m_LayerOverridePriority: 0
|
||||
m_IsTrigger: 0
|
||||
m_ProvidesContacts: 0
|
||||
m_Enabled: 1
|
||||
serializedVersion: 3
|
||||
m_Size: {x: 1.6092091, y: 10.161938, z: 1}
|
||||
m_Center: {x: 7.4978, y: -0.040241957, z: 0}
|
||||
@@ -0,0 +1,7 @@
|
||||
fileFormatVersion: 2
|
||||
guid: dd978b6bbfaf7864dbb3a6ec7b2851ba
|
||||
PrefabImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -16,6 +16,8 @@ GameObject:
|
||||
- component: {fileID: 7763498473808654306}
|
||||
- component: {fileID: 3659140714710275197}
|
||||
- component: {fileID: 9133098163257611752}
|
||||
- component: {fileID: 4619270190355407300}
|
||||
- component: {fileID: 72138333084358172}
|
||||
m_Layer: 6
|
||||
m_Name: Player
|
||||
m_TagString: Untagged
|
||||
@@ -199,6 +201,7 @@ MonoBehaviour:
|
||||
actionMapName: Player
|
||||
moveActionName: Move
|
||||
jumpActionName: Jump
|
||||
healActionName: Heal
|
||||
controlSchemeName: Gamepad
|
||||
gamepadIndex: 0
|
||||
moveSpeed: 6
|
||||
@@ -251,6 +254,40 @@ MonoBehaviour:
|
||||
isPanicking: 0
|
||||
isParalyzed: 0
|
||||
paralyseDuration: 1.2
|
||||
--- !u!95 &4619270190355407300
|
||||
Animator:
|
||||
serializedVersion: 7
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 3937090937419967315}
|
||||
m_Enabled: 1
|
||||
m_Avatar: {fileID: 0}
|
||||
m_Controller: {fileID: 9100000, guid: 86632cb6b3835a44e87fb6f039478d61, type: 2}
|
||||
m_CullingMode: 0
|
||||
m_UpdateMode: 0
|
||||
m_ApplyRootMotion: 0
|
||||
m_LinearVelocityBlending: 0
|
||||
m_StabilizeFeet: 0
|
||||
m_AnimatePhysics: 0
|
||||
m_WarningMessage:
|
||||
m_HasTransformHierarchy: 1
|
||||
m_AllowConstantClipSamplingOptimization: 1
|
||||
m_KeepAnimatorStateOnDisable: 0
|
||||
m_WriteDefaultValuesOnDisable: 0
|
||||
--- !u!114 &72138333084358172
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 3937090937419967315}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: fdb391b004c27a64da8f6922aab5512e, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier: '::'
|
||||
--- !u!1 &6898135930931977916
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
|
||||
@@ -13,8 +13,6 @@ GameObject:
|
||||
- component: {fileID: 700000003}
|
||||
- component: {fileID: 700000004}
|
||||
- component: {fileID: 700000005}
|
||||
- component: {fileID: 3917207367007631320}
|
||||
- component: {fileID: -9156742802622042603}
|
||||
m_Layer: 3
|
||||
m_Name: Trick
|
||||
m_TagString: Interactable
|
||||
@@ -189,15 +187,13 @@ MonoBehaviour:
|
||||
consumeCooldown: 3
|
||||
trickPrefab: {fileID: 700000005}
|
||||
avoidPlayerRadius: 0
|
||||
avoidTrickRadius: 0
|
||||
treatSeekWeight: 1
|
||||
wanderWeight: 0.4
|
||||
maxTricks: 50
|
||||
jumpImpulse: 6
|
||||
jumpImpulseVariance: 0.25
|
||||
jumpCooldown: 1
|
||||
jumpChancePerSecond: 0.5
|
||||
jumpArcChance: 0.5
|
||||
jumpArcHorizontalImpulse: 2
|
||||
groundMask:
|
||||
serializedVersion: 2
|
||||
m_Bits: 4294967295
|
||||
@@ -205,202 +201,3 @@ MonoBehaviour:
|
||||
despawnMinX: -12
|
||||
despawnMaxX: 12
|
||||
despawnMinY: -10
|
||||
despawnMaxY: 20
|
||||
throwControlLockTime: 0.35
|
||||
wallCheckDistance: 0.1
|
||||
wallAvoidDuration: 0.6
|
||||
trickEatSound: {fileID: -9156742802622042603}
|
||||
--- !u!82 &3917207367007631320
|
||||
AudioSource:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 700000000}
|
||||
m_Enabled: 1
|
||||
serializedVersion: 4
|
||||
OutputAudioMixerGroup: {fileID: 0}
|
||||
m_audioClip: {fileID: 0}
|
||||
m_Resource: {fileID: 0}
|
||||
m_PlayOnAwake: 1
|
||||
m_Volume: 1
|
||||
m_Pitch: 1
|
||||
Loop: 0
|
||||
Mute: 0
|
||||
Spatialize: 0
|
||||
SpatializePostEffects: 0
|
||||
Priority: 128
|
||||
DopplerLevel: 1
|
||||
MinDistance: 1
|
||||
MaxDistance: 500
|
||||
Pan2D: 0
|
||||
rolloffMode: 0
|
||||
BypassEffects: 0
|
||||
BypassListenerEffects: 0
|
||||
BypassReverbZones: 0
|
||||
rolloffCustomCurve:
|
||||
serializedVersion: 2
|
||||
m_Curve:
|
||||
- serializedVersion: 3
|
||||
time: 0
|
||||
value: 1
|
||||
inSlope: 0
|
||||
outSlope: 0
|
||||
tangentMode: 0
|
||||
weightedMode: 0
|
||||
inWeight: 0.33333334
|
||||
outWeight: 0.33333334
|
||||
- serializedVersion: 3
|
||||
time: 1
|
||||
value: 0
|
||||
inSlope: 0
|
||||
outSlope: 0
|
||||
tangentMode: 0
|
||||
weightedMode: 0
|
||||
inWeight: 0.33333334
|
||||
outWeight: 0.33333334
|
||||
m_PreInfinity: 2
|
||||
m_PostInfinity: 2
|
||||
m_RotationOrder: 4
|
||||
panLevelCustomCurve:
|
||||
serializedVersion: 2
|
||||
m_Curve:
|
||||
- serializedVersion: 3
|
||||
time: 0
|
||||
value: 0
|
||||
inSlope: 0
|
||||
outSlope: 0
|
||||
tangentMode: 0
|
||||
weightedMode: 0
|
||||
inWeight: 0.33333334
|
||||
outWeight: 0.33333334
|
||||
m_PreInfinity: 2
|
||||
m_PostInfinity: 2
|
||||
m_RotationOrder: 4
|
||||
spreadCustomCurve:
|
||||
serializedVersion: 2
|
||||
m_Curve:
|
||||
- serializedVersion: 3
|
||||
time: 0
|
||||
value: 0
|
||||
inSlope: 0
|
||||
outSlope: 0
|
||||
tangentMode: 0
|
||||
weightedMode: 0
|
||||
inWeight: 0.33333334
|
||||
outWeight: 0.33333334
|
||||
m_PreInfinity: 2
|
||||
m_PostInfinity: 2
|
||||
m_RotationOrder: 4
|
||||
reverbZoneMixCustomCurve:
|
||||
serializedVersion: 2
|
||||
m_Curve:
|
||||
- serializedVersion: 3
|
||||
time: 0
|
||||
value: 1
|
||||
inSlope: 0
|
||||
outSlope: 0
|
||||
tangentMode: 0
|
||||
weightedMode: 0
|
||||
inWeight: 0.33333334
|
||||
outWeight: 0.33333334
|
||||
m_PreInfinity: 2
|
||||
m_PostInfinity: 2
|
||||
m_RotationOrder: 4
|
||||
--- !u!82 &-9156742802622042603
|
||||
AudioSource:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 700000000}
|
||||
m_Enabled: 1
|
||||
serializedVersion: 4
|
||||
OutputAudioMixerGroup: {fileID: 0}
|
||||
m_audioClip: {fileID: 0}
|
||||
m_Resource: {fileID: 8300000, guid: f69d2619e3b7cc14885cd3c2ce146442, type: 3}
|
||||
m_PlayOnAwake: 1
|
||||
m_Volume: 0.4
|
||||
m_Pitch: 1
|
||||
Loop: 0
|
||||
Mute: 0
|
||||
Spatialize: 0
|
||||
SpatializePostEffects: 0
|
||||
Priority: 128
|
||||
DopplerLevel: 1
|
||||
MinDistance: 1
|
||||
MaxDistance: 500
|
||||
Pan2D: 0
|
||||
rolloffMode: 0
|
||||
BypassEffects: 0
|
||||
BypassListenerEffects: 0
|
||||
BypassReverbZones: 0
|
||||
rolloffCustomCurve:
|
||||
serializedVersion: 2
|
||||
m_Curve:
|
||||
- serializedVersion: 3
|
||||
time: 0
|
||||
value: 1
|
||||
inSlope: 0
|
||||
outSlope: 0
|
||||
tangentMode: 0
|
||||
weightedMode: 0
|
||||
inWeight: 0.33333334
|
||||
outWeight: 0.33333334
|
||||
- serializedVersion: 3
|
||||
time: 1
|
||||
value: 0
|
||||
inSlope: 0
|
||||
outSlope: 0
|
||||
tangentMode: 0
|
||||
weightedMode: 0
|
||||
inWeight: 0.33333334
|
||||
outWeight: 0.33333334
|
||||
m_PreInfinity: 2
|
||||
m_PostInfinity: 2
|
||||
m_RotationOrder: 4
|
||||
panLevelCustomCurve:
|
||||
serializedVersion: 2
|
||||
m_Curve:
|
||||
- serializedVersion: 3
|
||||
time: 0
|
||||
value: 0
|
||||
inSlope: 0
|
||||
outSlope: 0
|
||||
tangentMode: 0
|
||||
weightedMode: 0
|
||||
inWeight: 0.33333334
|
||||
outWeight: 0.33333334
|
||||
m_PreInfinity: 2
|
||||
m_PostInfinity: 2
|
||||
m_RotationOrder: 4
|
||||
spreadCustomCurve:
|
||||
serializedVersion: 2
|
||||
m_Curve:
|
||||
- serializedVersion: 3
|
||||
time: 0
|
||||
value: 0
|
||||
inSlope: 0
|
||||
outSlope: 0
|
||||
tangentMode: 0
|
||||
weightedMode: 0
|
||||
inWeight: 0.33333334
|
||||
outWeight: 0.33333334
|
||||
m_PreInfinity: 2
|
||||
m_PostInfinity: 2
|
||||
m_RotationOrder: 4
|
||||
reverbZoneMixCustomCurve:
|
||||
serializedVersion: 2
|
||||
m_Curve:
|
||||
- serializedVersion: 3
|
||||
time: 0
|
||||
value: 1
|
||||
inSlope: 0
|
||||
outSlope: 0
|
||||
tangentMode: 0
|
||||
weightedMode: 0
|
||||
inWeight: 0.33333334
|
||||
outWeight: 0.33333334
|
||||
m_PreInfinity: 2
|
||||
m_PostInfinity: 2
|
||||
m_RotationOrder: 4
|
||||
|
||||
@@ -203,6 +203,10 @@ PrefabInstance:
|
||||
propertyPath: actionMapName
|
||||
value: Player2
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 7763498473808654306, guid: 414ae949bae840c4589b38dd91c715e0, type: 3}
|
||||
propertyPath: healActionName
|
||||
value: Heal
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 7763498473808654306, guid: 414ae949bae840c4589b38dd91c715e0, type: 3}
|
||||
propertyPath: controlSchemeName
|
||||
value: Gamepad
|
||||
@@ -400,6 +404,14 @@ PrefabInstance:
|
||||
propertyPath: actionMapName
|
||||
value: Player2
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 7763498473808654306, guid: 414ae949bae840c4589b38dd91c715e0, type: 3}
|
||||
propertyPath: healActionName
|
||||
value: Heal
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 7763498473808654306, guid: 414ae949bae840c4589b38dd91c715e0, type: 3}
|
||||
propertyPath: jumpActionName
|
||||
value: Jump
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 7763498473808654306, guid: 414ae949bae840c4589b38dd91c715e0, type: 3}
|
||||
propertyPath: controlSchemeName
|
||||
value: Gamepad
|
||||
@@ -425,120 +437,6 @@ PrefabInstance:
|
||||
m_AddedGameObjects: []
|
||||
m_AddedComponents: []
|
||||
m_SourcePrefab: {fileID: 100100000, guid: 414ae949bae840c4589b38dd91c715e0, type: 3}
|
||||
--- !u!1 &393625608
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 393625611}
|
||||
- component: {fileID: 393625610}
|
||||
- component: {fileID: 393625609}
|
||||
m_Layer: 0
|
||||
m_Name: Trick_Run01
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!95 &393625609
|
||||
Animator:
|
||||
serializedVersion: 7
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 393625608}
|
||||
m_Enabled: 1
|
||||
m_Avatar: {fileID: 0}
|
||||
m_Controller: {fileID: 9100000, guid: c4f171c0550c83640bad4a8bc02f1c73, type: 2}
|
||||
m_CullingMode: 0
|
||||
m_UpdateMode: 0
|
||||
m_ApplyRootMotion: 0
|
||||
m_LinearVelocityBlending: 0
|
||||
m_StabilizeFeet: 0
|
||||
m_AnimatePhysics: 0
|
||||
m_WarningMessage:
|
||||
m_HasTransformHierarchy: 1
|
||||
m_AllowConstantClipSamplingOptimization: 1
|
||||
m_KeepAnimatorStateOnDisable: 0
|
||||
m_WriteDefaultValuesOnDisable: 0
|
||||
--- !u!212 &393625610
|
||||
SpriteRenderer:
|
||||
serializedVersion: 2
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 393625608}
|
||||
m_Enabled: 1
|
||||
m_CastShadows: 0
|
||||
m_ReceiveShadows: 0
|
||||
m_DynamicOccludee: 1
|
||||
m_StaticShadowCaster: 0
|
||||
m_MotionVectors: 1
|
||||
m_LightProbeUsage: 1
|
||||
m_ReflectionProbeUsage: 1
|
||||
m_RayTracingMode: 0
|
||||
m_RayTraceProcedural: 0
|
||||
m_RayTracingAccelStructBuildFlagsOverride: 0
|
||||
m_RayTracingAccelStructBuildFlags: 1
|
||||
m_SmallMeshCulling: 1
|
||||
m_ForceMeshLod: -1
|
||||
m_MeshLodSelectionBias: 0
|
||||
m_RenderingLayerMask: 1
|
||||
m_RendererPriority: 0
|
||||
m_Materials:
|
||||
- {fileID: 2100000, guid: a97c105638bdf8b4a8650670310a4cd3, type: 2}
|
||||
m_StaticBatchInfo:
|
||||
firstSubMesh: 0
|
||||
subMeshCount: 0
|
||||
m_StaticBatchRoot: {fileID: 0}
|
||||
m_ProbeAnchor: {fileID: 0}
|
||||
m_LightProbeVolumeOverride: {fileID: 0}
|
||||
m_ScaleInLightmap: 1
|
||||
m_ReceiveGI: 1
|
||||
m_PreserveUVs: 0
|
||||
m_IgnoreNormalsForChartDetection: 0
|
||||
m_ImportantGI: 0
|
||||
m_StitchLightmapSeams: 1
|
||||
m_SelectedEditorRenderState: 0
|
||||
m_MinimumChartSize: 4
|
||||
m_AutoUVMaxDistance: 0.5
|
||||
m_AutoUVMaxAngle: 89
|
||||
m_LightmapParameters: {fileID: 0}
|
||||
m_GlobalIlluminationMeshLod: 0
|
||||
m_SortingLayerID: 0
|
||||
m_SortingLayer: 0
|
||||
m_SortingOrder: 0
|
||||
m_MaskInteraction: 0
|
||||
m_Sprite: {fileID: 21300000, guid: 9c5273d0f7687334ba77aa78d87131b9, type: 3}
|
||||
m_Color: {r: 1, g: 1, b: 1, a: 1}
|
||||
m_FlipX: 0
|
||||
m_FlipY: 0
|
||||
m_DrawMode: 0
|
||||
m_Size: {x: 2.26, y: 2.86}
|
||||
m_AdaptiveModeThreshold: 0.5
|
||||
m_SpriteTileMode: 0
|
||||
m_WasSpriteAssigned: 1
|
||||
m_SpriteSortPoint: 0
|
||||
--- !u!4 &393625611
|
||||
Transform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 393625608}
|
||||
serializedVersion: 2
|
||||
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
|
||||
m_LocalPosition: {x: 7.804798, y: -2.2748086, z: 0}
|
||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||
m_ConstrainProportionsScale: 0
|
||||
m_Children: []
|
||||
m_Father: {fileID: 0}
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
--- !u!1 &418512664
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
@@ -1346,7 +1244,7 @@ AudioSource:
|
||||
m_PlayOnAwake: 1
|
||||
m_Volume: 1
|
||||
m_Pitch: 1
|
||||
Loop: 0
|
||||
Loop: 1
|
||||
Mute: 0
|
||||
Spatialize: 0
|
||||
SpatializePostEffects: 0
|
||||
@@ -1495,6 +1393,10 @@ PrefabInstance:
|
||||
propertyPath: m_Name
|
||||
value: Player (1)
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 7763498473808654306, guid: 414ae949bae840c4589b38dd91c715e0, type: 3}
|
||||
propertyPath: healActionName
|
||||
value: Heal
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 8870760143677714522, guid: 414ae949bae840c4589b38dd91c715e0, type: 3}
|
||||
propertyPath: m_Color.b
|
||||
value: 0.6462264
|
||||
@@ -1902,6 +1804,58 @@ Transform:
|
||||
m_Children: []
|
||||
m_Father: {fileID: 0}
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
--- !u!1 &908853548
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 908853550}
|
||||
- component: {fileID: 908853549}
|
||||
m_Layer: 0
|
||||
m_Name: Treat Spawner BL
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!114 &908853549
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 908853548}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: 14b0bf07aa1abc44a8ebd00cecacd6f4, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier: Assembly-CSharp::Spawner
|
||||
objectToSpawn: {fileID: 262983251238298495, guid: 80c527a86ad6fc34dbc73ee80c1f2951, type: 3}
|
||||
spawnInterval: 5
|
||||
maxAlive: 0
|
||||
spawnOnStart: 1
|
||||
repeatSpawns: 1
|
||||
launchForce: 0
|
||||
launchRandomAngle: 0
|
||||
spinSpeed: 0
|
||||
--- !u!4 &908853550
|
||||
Transform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 908853548}
|
||||
serializedVersion: 2
|
||||
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
|
||||
m_LocalPosition: {x: -4.5, y: -2, z: 0}
|
||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||
m_ConstrainProportionsScale: 0
|
||||
m_Children: []
|
||||
m_Father: {fileID: 0}
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
--- !u!1 &1118230342
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
@@ -1938,6 +1892,7 @@ MonoBehaviour:
|
||||
actionMapName: Player
|
||||
moveActionName: Move
|
||||
jumpActionName: Jump
|
||||
healActionName: Heal
|
||||
controlSchemeName:
|
||||
gamepadIndex: -1
|
||||
moveSpeed: 6
|
||||
@@ -2461,6 +2416,10 @@ PrefabInstance:
|
||||
propertyPath: actionMapName
|
||||
value: Player2
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 7763498473808654306, guid: 414ae949bae840c4589b38dd91c715e0, type: 3}
|
||||
propertyPath: healActionName
|
||||
value: Heal
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 7763498473808654306, guid: 414ae949bae840c4589b38dd91c715e0, type: 3}
|
||||
propertyPath: controlSchemeName
|
||||
value: Gamepad
|
||||
@@ -3028,5 +2987,4 @@ SceneRoots:
|
||||
- {fileID: 2100000101}
|
||||
- {fileID: 2200000001}
|
||||
- {fileID: 491328828}
|
||||
- {fileID: 393625611}
|
||||
- {fileID: 738367608}
|
||||
|
||||
@@ -1,8 +1,27 @@
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
|
||||
public class BasketController : MonoBehaviour
|
||||
{
|
||||
public ScoreManager scoreManager;
|
||||
[SerializeField] private Transform basketHoldPoint;
|
||||
[SerializeField] private LayerMask trickDetectMask = ~0;
|
||||
[SerializeField] private float basketSpawnInterval = 3f;
|
||||
private readonly Collider2D[] overlapHits = new Collider2D[8];
|
||||
private BoxCollider2D basketCollider;
|
||||
private TrickController currentTrick;
|
||||
private float nextBasketSpawnTime;
|
||||
|
||||
private void Awake()
|
||||
{
|
||||
basketCollider = GetComponent<BoxCollider2D>();
|
||||
}
|
||||
|
||||
private void FixedUpdate()
|
||||
{
|
||||
RefreshTricksInBasket();
|
||||
TryBasketSpawn();
|
||||
}
|
||||
|
||||
private void OnCollisionEnter2D(Collision2D collision)
|
||||
{
|
||||
@@ -12,12 +31,193 @@ public class BasketController : MonoBehaviour
|
||||
{
|
||||
if (collision.gameObject.GetComponent<TrickController>() != null)
|
||||
{
|
||||
RegisterTrick(collision.gameObject);
|
||||
return;
|
||||
}
|
||||
|
||||
RefreshTricksInBasket();
|
||||
if (currentTrick != null)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
scoreManager.AddPoints(1);
|
||||
|
||||
GameObject.Destroy(collision.gameObject);
|
||||
}
|
||||
}
|
||||
|
||||
private void OnCollisionExit2D(Collision2D collision)
|
||||
{
|
||||
UnregisterTrick(collision.gameObject);
|
||||
}
|
||||
|
||||
private void OnTriggerEnter2D(Collider2D other)
|
||||
{
|
||||
if (!other.CompareTag("Interactable"))
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
if (other.GetComponent<TrickController>() != null)
|
||||
{
|
||||
RegisterTrick(other.gameObject);
|
||||
}
|
||||
}
|
||||
|
||||
private void OnTriggerExit2D(Collider2D other)
|
||||
{
|
||||
UnregisterTrick(other.gameObject);
|
||||
}
|
||||
|
||||
private void RegisterTrick(GameObject obj)
|
||||
{
|
||||
if (obj.TryGetComponent<TrickController>(out var trick))
|
||||
{
|
||||
if (currentTrick != null && currentTrick != trick)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
currentTrick = trick;
|
||||
trick.SetBasketed(true, GetBasketAnchorPosition(trick));
|
||||
nextBasketSpawnTime = Time.time + basketSpawnInterval;
|
||||
}
|
||||
}
|
||||
|
||||
private void UnregisterTrick(GameObject obj)
|
||||
{
|
||||
if (obj == null)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
if (obj.TryGetComponent<TrickController>(out var trick))
|
||||
{
|
||||
if (currentTrick == trick)
|
||||
{
|
||||
currentTrick = null;
|
||||
trick.SetBasketed(false);
|
||||
nextBasketSpawnTime = 0f;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private void RefreshTricksInBasket()
|
||||
{
|
||||
if (basketCollider == null)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
var filter = new ContactFilter2D();
|
||||
filter.SetLayerMask(trickDetectMask);
|
||||
filter.useTriggers = true;
|
||||
|
||||
var hitCount = basketCollider.Overlap(filter, overlapHits);
|
||||
for (var i = 0; i < hitCount; i++)
|
||||
{
|
||||
var hit = overlapHits[i];
|
||||
if (hit == null || !hit.CompareTag("Interactable"))
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
if (hit.TryGetComponent<TrickController>(out var trick))
|
||||
{
|
||||
if (currentTrick == null)
|
||||
{
|
||||
currentTrick = trick;
|
||||
trick.SetBasketed(true, GetBasketAnchorPosition(trick));
|
||||
nextBasketSpawnTime = Time.time + basketSpawnInterval;
|
||||
}
|
||||
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (currentTrick == null)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
if (currentTrick.IsCarried)
|
||||
{
|
||||
currentTrick.SetBasketed(false);
|
||||
currentTrick = null;
|
||||
nextBasketSpawnTime = 0f;
|
||||
return;
|
||||
}
|
||||
|
||||
var stillInside = false;
|
||||
for (var i = 0; i < hitCount; i++)
|
||||
{
|
||||
var hit = overlapHits[i];
|
||||
if (hit == null || !hit.CompareTag("Interactable"))
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
if (hit.TryGetComponent<TrickController>(out var trick) && trick == currentTrick)
|
||||
{
|
||||
stillInside = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (!stillInside)
|
||||
{
|
||||
currentTrick.SetBasketed(false);
|
||||
currentTrick = null;
|
||||
nextBasketSpawnTime = 0f;
|
||||
}
|
||||
}
|
||||
|
||||
private void TryBasketSpawn()
|
||||
{
|
||||
if (currentTrick == null || basketSpawnInterval <= 0f)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
if (Time.time < nextBasketSpawnTime)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
TrickController.TrySpawnAt(currentTrick.transform.position);
|
||||
nextBasketSpawnTime = Time.time + basketSpawnInterval;
|
||||
}
|
||||
|
||||
private Vector2? GetBasketAnchorPosition(TrickController trick)
|
||||
{
|
||||
if (basketHoldPoint != null)
|
||||
{
|
||||
return OffsetForTrickHeight(basketHoldPoint.position, trick);
|
||||
}
|
||||
|
||||
if (basketCollider != null)
|
||||
{
|
||||
return OffsetForTrickHeight(basketCollider.bounds.center, trick);
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
private Vector2 OffsetForTrickHeight(Vector2 anchor, TrickController trick)
|
||||
{
|
||||
if (trick == null)
|
||||
{
|
||||
return anchor;
|
||||
}
|
||||
|
||||
var renderer = trick.GetComponent<SpriteRenderer>();
|
||||
if (renderer == null)
|
||||
{
|
||||
return anchor;
|
||||
}
|
||||
|
||||
anchor.y += renderer.bounds.size.y * 0.5f;
|
||||
return anchor;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,10 @@
|
||||
using UnityEngine;
|
||||
|
||||
public class PlayerAnimationController : MonoBehaviour
|
||||
{
|
||||
// Update is called once per frame
|
||||
void Update()
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,2 @@
|
||||
fileFormatVersion: 2
|
||||
guid: fdb391b004c27a64da8f6922aab5512e
|
||||
@@ -18,6 +18,7 @@ public class PlayerPickupController : MonoBehaviour
|
||||
[SerializeField] private float throwUpwardForce = 0f;
|
||||
[SerializeField] private float throwTriggerThreshold = 0.6f;
|
||||
[SerializeField] private float dropClearance = 0.2f;
|
||||
[SerializeField] private float holdToSpawnTime = 3f;
|
||||
|
||||
[Header("Setup")]
|
||||
public Transform holdPoint; // Empty GameObject above head
|
||||
@@ -33,6 +34,9 @@ public class PlayerPickupController : MonoBehaviour
|
||||
private PlayerStressController playerStressController;
|
||||
private bool isChargingThrow;
|
||||
private float throwChargeStartTime;
|
||||
private float holdStartTime;
|
||||
private bool spawnedDuringHold;
|
||||
private float nextHoldSpawnTime;
|
||||
|
||||
private void OnEnable()
|
||||
{
|
||||
@@ -113,6 +117,21 @@ public class PlayerPickupController : MonoBehaviour
|
||||
return;
|
||||
}
|
||||
|
||||
if (Time.time >= nextHoldSpawnTime)
|
||||
{
|
||||
if (heldObject == null)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
if (!TrickController.TrySpawnFromPrefabAt(heldObject.transform.position))
|
||||
{
|
||||
TrickController.TrySpawnAt(heldObject.transform.position);
|
||||
}
|
||||
spawnedDuringHold = true;
|
||||
nextHoldSpawnTime = Time.time + holdToSpawnTime;
|
||||
}
|
||||
|
||||
var gamepad = GetGamepad();
|
||||
if (gamepad == null)
|
||||
{
|
||||
@@ -159,12 +178,20 @@ public class PlayerPickupController : MonoBehaviour
|
||||
}
|
||||
|
||||
heldObject = col.gameObject;
|
||||
holdStartTime = Time.time;
|
||||
spawnedDuringHold = false;
|
||||
nextHoldSpawnTime = holdStartTime + holdToSpawnTime;
|
||||
|
||||
// Parent the object to the HoldPoint and reset its local position
|
||||
heldObject.transform.SetParent(holdPoint);
|
||||
heldObject.transform.localPosition = Vector3.zero;
|
||||
heldObject.transform.localRotation = Quaternion.identity;
|
||||
|
||||
if (trick != null)
|
||||
{
|
||||
trick.SetCarried(true);
|
||||
}
|
||||
|
||||
// Disable physics so it doesn't fall or collide with the player
|
||||
if (heldObject.TryGetComponent<Rigidbody2D>(out Rigidbody2D rb))
|
||||
{
|
||||
@@ -181,11 +208,6 @@ public class PlayerPickupController : MonoBehaviour
|
||||
rb.angularVelocity = 0f;
|
||||
}
|
||||
|
||||
if (trick != null)
|
||||
{
|
||||
trick.SetCarried(true);
|
||||
}
|
||||
|
||||
if (playerController != null)
|
||||
{
|
||||
playerController.enabled = false;
|
||||
@@ -205,7 +227,7 @@ public class PlayerPickupController : MonoBehaviour
|
||||
}
|
||||
}
|
||||
|
||||
void DropObject(bool applyThrow)
|
||||
public void DropObject(bool applyThrow)
|
||||
{
|
||||
// Re-enable physics
|
||||
if (heldBody != null)
|
||||
@@ -260,6 +282,8 @@ public class PlayerPickupController : MonoBehaviour
|
||||
heldObject = null;
|
||||
heldBody = null;
|
||||
isChargingThrow = false;
|
||||
spawnedDuringHold = false;
|
||||
nextHoldSpawnTime = 0f;
|
||||
}
|
||||
|
||||
private Gamepad GetGamepad()
|
||||
|
||||
@@ -10,7 +10,7 @@ public class PlayerPlatformerController : MonoBehaviour
|
||||
[SerializeField] private string actionMapName = "Player";
|
||||
[SerializeField] private string moveActionName = "Move";
|
||||
[SerializeField] private string jumpActionName = "Jump";
|
||||
[SerializeField] private string healActionName = "Crouch";
|
||||
[SerializeField] private string healActionName = "Heal";
|
||||
[SerializeField] private string controlSchemeName = "";
|
||||
[SerializeField] private int gamepadIndex = -1;
|
||||
[SerializeField] private float moveSpeed = 6f;
|
||||
@@ -19,6 +19,8 @@ public class PlayerPlatformerController : MonoBehaviour
|
||||
[SerializeField] private float groundCheckDistance = 0.05f;
|
||||
|
||||
private PlayerStressController playerStressController;
|
||||
private PlayerPickupController playerPickupController;
|
||||
private Animator animator;
|
||||
|
||||
private Rigidbody2D body;
|
||||
private BoxCollider2D bodyCollider;
|
||||
@@ -28,12 +30,17 @@ public class PlayerPlatformerController : MonoBehaviour
|
||||
private InputAction healAction;
|
||||
public float LastMoveX { get; private set; }
|
||||
private bool deviceFilterEnabled;
|
||||
private int healCoolDownTicks = 15;
|
||||
private int currentHealCoolDown = 0;
|
||||
private bool canHeal = true;
|
||||
|
||||
private void Awake()
|
||||
{
|
||||
body = GetComponent<Rigidbody2D>();
|
||||
bodyCollider = GetComponent<BoxCollider2D>();
|
||||
playerStressController = GetComponent<PlayerStressController>();
|
||||
playerPickupController = GetComponent<PlayerPickupController>();
|
||||
animator = GetComponent<Animator>();
|
||||
}
|
||||
|
||||
private void OnEnable()
|
||||
@@ -56,10 +63,12 @@ public class PlayerPlatformerController : MonoBehaviour
|
||||
var map = runtimeActions.FindActionMap(actionMapName, true);
|
||||
moveAction = map.FindAction(moveActionName, true);
|
||||
jumpAction = map.FindAction(jumpActionName, true);
|
||||
healAction = map.FindAction(healActionName, true);
|
||||
|
||||
moveAction.Enable();
|
||||
jumpAction.Enable();
|
||||
jumpAction.performed += OnJumpPerformed;
|
||||
healAction.Enable();
|
||||
}
|
||||
|
||||
private void OnDisable()
|
||||
@@ -75,6 +84,11 @@ public class PlayerPlatformerController : MonoBehaviour
|
||||
moveAction.Disable();
|
||||
}
|
||||
|
||||
if (healAction != null)
|
||||
{
|
||||
healAction.Disable();
|
||||
}
|
||||
|
||||
if (runtimeActions != null)
|
||||
{
|
||||
runtimeActions.Disable();
|
||||
@@ -86,6 +100,21 @@ public class PlayerPlatformerController : MonoBehaviour
|
||||
|
||||
private void FixedUpdate()
|
||||
{
|
||||
if(IsGrounded())
|
||||
{
|
||||
animator.SetBool("isJumping", false);
|
||||
}
|
||||
|
||||
if (healAction == null) return;
|
||||
|
||||
currentHealCoolDown++;
|
||||
|
||||
if (currentHealCoolDown >= healCoolDownTicks)
|
||||
{
|
||||
currentHealCoolDown = 0;
|
||||
canHeal = true;
|
||||
}
|
||||
|
||||
if (moveAction == null)
|
||||
{
|
||||
return;
|
||||
@@ -93,6 +122,28 @@ public class PlayerPlatformerController : MonoBehaviour
|
||||
|
||||
if (playerStressController.isPanicking) return;
|
||||
|
||||
if (healAction.IsPressed())
|
||||
{
|
||||
animator.SetBool("isBreathing", true);
|
||||
|
||||
if (playerPickupController.heldObject != null)
|
||||
{
|
||||
playerPickupController.DropObject(false);
|
||||
}
|
||||
|
||||
if (canHeal)
|
||||
{
|
||||
playerStressController.ReduceStress(3f);
|
||||
canHeal = false;
|
||||
}
|
||||
|
||||
return;
|
||||
}
|
||||
else
|
||||
{
|
||||
animator.SetBool("isBreathing", false);
|
||||
}
|
||||
|
||||
var input = moveAction.ReadValue<Vector2>();
|
||||
if (Mathf.Abs(input.x) > 0.01f)
|
||||
{
|
||||
@@ -101,11 +152,28 @@ public class PlayerPlatformerController : MonoBehaviour
|
||||
var velocity = body.linearVelocity;
|
||||
velocity.x = input.x * moveSpeed;
|
||||
body.linearVelocity = velocity;
|
||||
|
||||
if(velocity.x != 0)
|
||||
{
|
||||
animator.SetBool("isRunning", true);
|
||||
if (velocity.x > 0 && IsGrounded())
|
||||
{
|
||||
transform.localScale = new Vector3(.25f, .25f, .25f);
|
||||
}
|
||||
else
|
||||
{
|
||||
transform.localScale = new Vector3(-.25f, .25f, .25f);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
animator.SetBool("isRunning", false);
|
||||
}
|
||||
}
|
||||
|
||||
private void OnJumpPerformed(InputAction.CallbackContext context)
|
||||
{
|
||||
if (playerStressController.isPanicking) return;
|
||||
if (playerStressController.isPanicking || healAction.IsPressed()) return;
|
||||
|
||||
if (!IsGrounded())
|
||||
{
|
||||
@@ -116,6 +184,8 @@ public class PlayerPlatformerController : MonoBehaviour
|
||||
velocity.y = 0f;
|
||||
body.linearVelocity = velocity;
|
||||
body.AddForce(Vector2.up * jumpImpulse, ForceMode2D.Impulse);
|
||||
|
||||
animator.SetBool("isJumping", true);
|
||||
}
|
||||
|
||||
private bool ShouldFilterDevices()
|
||||
|
||||
@@ -7,7 +7,8 @@ using UnityEngine;
|
||||
public class PlayerStressController : MonoBehaviour
|
||||
{
|
||||
public PlayerPickupController pickupController;
|
||||
|
||||
private Animator animator;
|
||||
|
||||
[Header("Stress Settings")]
|
||||
public float currentStress = 0f;
|
||||
public float maxStress = 100f;
|
||||
@@ -25,6 +26,7 @@ public class PlayerStressController : MonoBehaviour
|
||||
|
||||
void Start()
|
||||
{
|
||||
animator = GetComponent<Animator>();
|
||||
// Start the repeating loop
|
||||
StartCoroutine(StressCheckLoop());
|
||||
}
|
||||
@@ -76,6 +78,8 @@ public class PlayerStressController : MonoBehaviour
|
||||
{
|
||||
|
||||
isPanicking = true;
|
||||
animator.SetBool("isCollapsed", true);
|
||||
|
||||
Debug.Log("Player is freaking out man!");
|
||||
// Add effects like screen shake or slowing down the player here
|
||||
OnPlayerPanic?.Invoke(); // Trigger the panic event
|
||||
|
||||
@@ -5,6 +5,8 @@ public class TrickCollisionManager : MonoBehaviour
|
||||
[SerializeField] private string trickLayerName = "Trick";
|
||||
[SerializeField] private string playerLayerName = "Player";
|
||||
[SerializeField] private string treatLayerName = "Treat";
|
||||
[SerializeField] private string destroyTag = "Destroy";
|
||||
|
||||
private bool initialized;
|
||||
|
||||
private void Awake()
|
||||
@@ -43,4 +45,10 @@ public class TrickCollisionManager : MonoBehaviour
|
||||
|
||||
Physics2D.IgnoreLayerCollision(trickLayer, otherLayer, true);
|
||||
}
|
||||
private void onTriggerEnter2D(Collider2D destroy){
|
||||
if (destroy.CompareTag(destroyTag))
|
||||
{
|
||||
Destroy(gameObject);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -11,6 +11,8 @@ public class TrickController : MonoBehaviour
|
||||
private static readonly List<TrickController> ActiveTricks = new List<TrickController>();
|
||||
private static PlayerPlatformerController[] cachedPlayers = Array.Empty<PlayerPlatformerController>();
|
||||
private static float nextPlayerCacheTime;
|
||||
private static bool hasCanonicalScale;
|
||||
private static Vector3 canonicalScale;
|
||||
public static int ActiveCount => ActiveTricks.Count;
|
||||
|
||||
[SerializeField] private string treatTag = "Interactable";
|
||||
@@ -30,6 +32,12 @@ public class TrickController : MonoBehaviour
|
||||
[SerializeField] private float jumpChancePerSecond = 0.5f;
|
||||
[SerializeField] private float jumpArcChance = 0.5f;
|
||||
[SerializeField] private float jumpArcHorizontalImpulse = 2f;
|
||||
[SerializeField] private float basketSeekRadius = 8f;
|
||||
[SerializeField] private float basketSeekWeight = 0.9f;
|
||||
[SerializeField] private float basketMinHeight = 0.5f;
|
||||
[SerializeField] private float basketRefreshInterval = 0.6f;
|
||||
[SerializeField] private float basketJumpChance = 0.35f;
|
||||
[SerializeField] private float basketJumpHorizontalRange = 0.8f;
|
||||
[SerializeField] private LayerMask groundMask = ~0;
|
||||
[SerializeField] private float groundCheckDistance = 0.05f;
|
||||
[SerializeField] private float despawnMinX = -12f;
|
||||
@@ -39,14 +47,17 @@ public class TrickController : MonoBehaviour
|
||||
[SerializeField] private float throwControlLockTime = 0.35f;
|
||||
[SerializeField] private float wallCheckDistance = 0.1f;
|
||||
[SerializeField] private float wallAvoidDuration = 0.6f;
|
||||
[SerializeField] private AudioSource trickEatSound;
|
||||
[SerializeField] private float wallAvoidCooldown = 0.2f;
|
||||
|
||||
private Rigidbody2D body;
|
||||
private Transform target;
|
||||
private float nextTargetTime;
|
||||
private Transform basketTarget;
|
||||
private float nextBasketTime;
|
||||
private Vector2 wanderDirection;
|
||||
private float nextWanderTime;
|
||||
private bool isCarried;
|
||||
private bool isBasketed;
|
||||
private float nextConsumeTime;
|
||||
private float desiredXVelocity;
|
||||
private float nextJumpTime;
|
||||
@@ -55,6 +66,21 @@ public class TrickController : MonoBehaviour
|
||||
private readonly RaycastHit2D[] wallHits = new RaycastHit2D[4];
|
||||
private float wallAvoidUntil;
|
||||
private float wallAvoidDirection;
|
||||
private float nextWallAvoidTime;
|
||||
private RigidbodyType2D basketBodyType;
|
||||
private float basketGravityScale;
|
||||
private bool basketSimulated;
|
||||
private bool hasBasketAnchor;
|
||||
private Vector2 basketAnchorPosition;
|
||||
[SerializeField] private string basketSortingLayer = "";
|
||||
[SerializeField] private int basketSortingOrder = -10;
|
||||
private SpriteRenderer cachedRenderer;
|
||||
private string originalSortingLayer;
|
||||
private int originalSortingOrder;
|
||||
private Vector3 originalLocalScale;
|
||||
|
||||
public bool IsCarried => isCarried;
|
||||
public bool IsBasketed => isBasketed;
|
||||
|
||||
private void Awake()
|
||||
{
|
||||
@@ -64,6 +90,13 @@ public class TrickController : MonoBehaviour
|
||||
body.freezeRotation = true;
|
||||
body.collisionDetectionMode = CollisionDetectionMode2D.Continuous;
|
||||
body.interpolation = RigidbodyInterpolation2D.Interpolate;
|
||||
cachedRenderer = GetComponent<SpriteRenderer>();
|
||||
originalLocalScale = transform.localScale;
|
||||
if (!hasCanonicalScale)
|
||||
{
|
||||
canonicalScale = transform.localScale;
|
||||
hasCanonicalScale = true;
|
||||
}
|
||||
}
|
||||
|
||||
private void OnEnable()
|
||||
@@ -89,6 +122,11 @@ public class TrickController : MonoBehaviour
|
||||
return;
|
||||
}
|
||||
|
||||
if (isBasketed)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
var position = transform.position;
|
||||
if (position.x < despawnMinX || position.x > despawnMaxX || position.y < despawnMinY || position.y > despawnMaxY)
|
||||
{
|
||||
@@ -112,6 +150,12 @@ public class TrickController : MonoBehaviour
|
||||
nextTargetTime = Time.time + targetRefreshInterval;
|
||||
}
|
||||
|
||||
if (Time.time >= nextBasketTime)
|
||||
{
|
||||
basketTarget = FindNearestBasketAbove();
|
||||
nextBasketTime = Time.time + basketRefreshInterval;
|
||||
}
|
||||
|
||||
if (Time.time >= nextWanderTime)
|
||||
{
|
||||
wanderDirection = Random.insideUnitCircle.normalized;
|
||||
@@ -132,6 +176,19 @@ public class TrickController : MonoBehaviour
|
||||
return;
|
||||
}
|
||||
|
||||
if (isBasketed)
|
||||
{
|
||||
if (hasBasketAnchor)
|
||||
{
|
||||
transform.position = basketAnchorPosition;
|
||||
}
|
||||
var held = body.linearVelocity;
|
||||
held.x = 0f;
|
||||
held.y = 0f;
|
||||
body.linearVelocity = held;
|
||||
return;
|
||||
}
|
||||
|
||||
if (Time.time < movementLockUntil)
|
||||
{
|
||||
return;
|
||||
@@ -157,6 +214,15 @@ public class TrickController : MonoBehaviour
|
||||
desiredX += wanderDirection.x * wanderWeight;
|
||||
}
|
||||
|
||||
if (!hasTarget && basketTarget != null)
|
||||
{
|
||||
var basketDelta = (Vector2)basketTarget.position - (Vector2)transform.position;
|
||||
if (basketDelta.y >= basketMinHeight && basketDelta.magnitude <= basketSeekRadius)
|
||||
{
|
||||
desiredX += Mathf.Sign(basketDelta.x) * basketSeekWeight;
|
||||
}
|
||||
}
|
||||
|
||||
// No trick-avoidance bias.
|
||||
|
||||
if (Mathf.Abs(desiredX) < 0.01f)
|
||||
@@ -164,11 +230,15 @@ public class TrickController : MonoBehaviour
|
||||
desiredX = wanderDirection.x * 0.2f;
|
||||
}
|
||||
|
||||
var wallDirection = GetWallAvoidDirection(desiredX);
|
||||
if (wallDirection != 0f)
|
||||
if (Time.time >= nextWallAvoidTime)
|
||||
{
|
||||
wallAvoidDirection = wallDirection;
|
||||
wallAvoidUntil = Time.time + wallAvoidDuration;
|
||||
var wallDirection = GetWallAvoidDirection(desiredX);
|
||||
if (wallDirection != 0f)
|
||||
{
|
||||
wallAvoidDirection = wallDirection;
|
||||
wallAvoidUntil = Time.time + wallAvoidDuration;
|
||||
nextWallAvoidTime = Time.time + wallAvoidDuration + wallAvoidCooldown;
|
||||
}
|
||||
}
|
||||
|
||||
if (Time.time < wallAvoidUntil && Mathf.Abs(wallAvoidDirection) > 0.01f)
|
||||
@@ -209,6 +279,14 @@ public class TrickController : MonoBehaviour
|
||||
{
|
||||
continue;
|
||||
}
|
||||
if (candidate.GetComponent<TrickController>() != null)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
if (candidate.GetComponent<PlayerPlatformerController>() != null)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
if (!candidate.TryGetComponent<Collider2D>(out var collider) || !collider.enabled)
|
||||
{
|
||||
@@ -226,6 +304,48 @@ public class TrickController : MonoBehaviour
|
||||
return best;
|
||||
}
|
||||
|
||||
private Transform FindNearestBasketAbove()
|
||||
{
|
||||
var baskets = FindObjectsByType<BasketController>(FindObjectsSortMode.None);
|
||||
if (baskets == null || baskets.Length == 0)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
Transform best = null;
|
||||
var bestDistance = float.MaxValue;
|
||||
var origin = transform.position;
|
||||
for (var i = 0; i < baskets.Length; i++)
|
||||
{
|
||||
var basket = baskets[i];
|
||||
if (basket == null || !basket.gameObject.activeInHierarchy)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
var basketPos = basket.transform.position;
|
||||
var delta = (Vector2)basketPos - (Vector2)origin;
|
||||
if (delta.y < basketMinHeight)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
var distance = delta.magnitude;
|
||||
if (distance > basketSeekRadius)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
if (distance < bestDistance)
|
||||
{
|
||||
bestDistance = distance;
|
||||
best = basket.transform;
|
||||
}
|
||||
}
|
||||
|
||||
return best;
|
||||
}
|
||||
|
||||
private void TryConsumeTreat()
|
||||
{
|
||||
if (isCarried)
|
||||
@@ -255,29 +375,136 @@ public class TrickController : MonoBehaviour
|
||||
{
|
||||
target = null;
|
||||
}
|
||||
trickEatSound.Play();
|
||||
SpawnTrick(spawnPosition);
|
||||
nextConsumeTime = Time.time + consumeCooldown;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
private void SpawnTrick(Vector3 position)
|
||||
private bool SpawnTrick(Vector3 position)
|
||||
{
|
||||
if (maxTricks > 0 && ActiveTricks.Count >= maxTricks)
|
||||
{
|
||||
return;
|
||||
return false;
|
||||
}
|
||||
|
||||
if (trickPrefab != null)
|
||||
{
|
||||
Instantiate(trickPrefab, position, Quaternion.identity);
|
||||
return;
|
||||
var instance = Instantiate(trickPrefab, position, Quaternion.identity);
|
||||
if (instance != null)
|
||||
{
|
||||
instance.ResetRuntimeState(canonicalScale);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
Instantiate(gameObject, position, Quaternion.identity);
|
||||
var clone = Instantiate(gameObject, position, Quaternion.identity);
|
||||
if (clone.TryGetComponent<TrickController>(out var spawned))
|
||||
{
|
||||
spawned.ResetRuntimeState(canonicalScale);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
private void ResetRuntimeState(Vector3? forcedScale = null)
|
||||
{
|
||||
isCarried = false;
|
||||
isBasketed = false;
|
||||
hasBasketAnchor = false;
|
||||
movementLockUntil = 0f;
|
||||
wallAvoidUntil = 0f;
|
||||
wallAvoidDirection = 0f;
|
||||
if (forcedScale.HasValue)
|
||||
{
|
||||
transform.localScale = forcedScale.Value;
|
||||
}
|
||||
if (cachedRenderer != null)
|
||||
{
|
||||
if (!string.IsNullOrWhiteSpace(basketSortingLayer))
|
||||
{
|
||||
cachedRenderer.sortingLayerName = originalSortingLayer;
|
||||
}
|
||||
cachedRenderer.sortingOrder = originalSortingOrder;
|
||||
}
|
||||
|
||||
body.simulated = true;
|
||||
body.bodyType = RigidbodyType2D.Dynamic;
|
||||
body.gravityScale = 1f;
|
||||
body.linearVelocity = Vector2.zero;
|
||||
body.angularVelocity = 0f;
|
||||
if (TryGetComponent<Collider2D>(out var collider))
|
||||
{
|
||||
collider.enabled = true;
|
||||
}
|
||||
}
|
||||
|
||||
public static bool TrySpawnAt(Vector3 position)
|
||||
{
|
||||
if (ActiveTricks.Count == 0)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
TrickController candidate = null;
|
||||
TrickController fallback = null;
|
||||
for (var i = 0; i < ActiveTricks.Count; i++)
|
||||
{
|
||||
var trick = ActiveTricks[i];
|
||||
if (trick == null)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
if (fallback == null)
|
||||
{
|
||||
fallback = trick;
|
||||
}
|
||||
|
||||
if (!trick.isCarried && !trick.isBasketed)
|
||||
{
|
||||
if (trick.TryGetComponent<Collider2D>(out var collider) && collider.enabled)
|
||||
{
|
||||
candidate = trick;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (candidate == null)
|
||||
{
|
||||
candidate = fallback;
|
||||
}
|
||||
|
||||
return candidate != null && candidate.SpawnTrick(position);
|
||||
}
|
||||
|
||||
public static bool TrySpawnFromPrefabAt(Vector3 position)
|
||||
{
|
||||
if (ActiveTricks.Count == 0)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
for (var i = 0; i < ActiveTricks.Count; i++)
|
||||
{
|
||||
var trick = ActiveTricks[i];
|
||||
if (trick == null)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
if (trick.trickPrefab == null)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
return trick.SpawnTrick(position);
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
private float GetAvoidPlayerDirection()
|
||||
{
|
||||
if (Time.time >= nextPlayerCacheTime)
|
||||
@@ -322,7 +549,7 @@ public class TrickController : MonoBehaviour
|
||||
|
||||
private void TryJump(bool isMoving, float jumpDirection)
|
||||
{
|
||||
if (!isMoving || Time.time < nextJumpTime)
|
||||
if (Time.time < nextJumpTime)
|
||||
{
|
||||
return;
|
||||
}
|
||||
@@ -332,20 +559,43 @@ public class TrickController : MonoBehaviour
|
||||
return;
|
||||
}
|
||||
|
||||
if (body.linearVelocity.y > 0.01f)
|
||||
var wantsBasketJump = false;
|
||||
var basketDir = 0f;
|
||||
if (basketTarget != null)
|
||||
{
|
||||
return;
|
||||
var delta = (Vector2)basketTarget.position - (Vector2)transform.position;
|
||||
if (delta.y >= basketMinHeight && Mathf.Abs(delta.x) <= basketJumpHorizontalRange)
|
||||
{
|
||||
if (Random.value < basketJumpChance)
|
||||
{
|
||||
wantsBasketJump = true;
|
||||
basketDir = Mathf.Sign(delta.x);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
var chance = jumpChancePerSecond * Time.fixedDeltaTime;
|
||||
if (Random.value > chance)
|
||||
if (!wantsBasketJump)
|
||||
{
|
||||
if (!isMoving)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
var chance = jumpChancePerSecond * Time.fixedDeltaTime;
|
||||
if (Random.value > chance)
|
||||
{
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
if (body.linearVelocity.y > 0.01f)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
var velocity = body.linearVelocity;
|
||||
velocity.y = 0f;
|
||||
var jumpDir = Mathf.Sign(jumpDirection);
|
||||
var jumpDir = wantsBasketJump ? basketDir : Mathf.Sign(jumpDirection);
|
||||
if (jumpDir == 0f)
|
||||
{
|
||||
jumpDir = Random.value < 0.5f ? -1f : 1f;
|
||||
@@ -450,6 +700,10 @@ public class TrickController : MonoBehaviour
|
||||
public void SetCarried(bool carried)
|
||||
{
|
||||
isCarried = carried;
|
||||
if (carried && isBasketed)
|
||||
{
|
||||
SetBasketed(false);
|
||||
}
|
||||
if (carried)
|
||||
{
|
||||
target = null;
|
||||
@@ -477,6 +731,62 @@ public class TrickController : MonoBehaviour
|
||||
}
|
||||
}
|
||||
|
||||
public void SetBasketed(bool basketed, Vector2? anchorPosition = null)
|
||||
{
|
||||
if (isBasketed == basketed)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
isBasketed = basketed;
|
||||
if (basketed)
|
||||
{
|
||||
if (cachedRenderer != null)
|
||||
{
|
||||
originalSortingLayer = cachedRenderer.sortingLayerName;
|
||||
originalSortingOrder = cachedRenderer.sortingOrder;
|
||||
if (!string.IsNullOrWhiteSpace(basketSortingLayer))
|
||||
{
|
||||
cachedRenderer.sortingLayerName = basketSortingLayer;
|
||||
}
|
||||
cachedRenderer.sortingOrder = basketSortingOrder;
|
||||
}
|
||||
if (anchorPosition.HasValue)
|
||||
{
|
||||
hasBasketAnchor = true;
|
||||
basketAnchorPosition = anchorPosition.Value;
|
||||
}
|
||||
else
|
||||
{
|
||||
hasBasketAnchor = false;
|
||||
}
|
||||
basketBodyType = body.bodyType;
|
||||
basketGravityScale = body.gravityScale;
|
||||
basketSimulated = body.simulated;
|
||||
body.simulated = true;
|
||||
body.bodyType = RigidbodyType2D.Kinematic;
|
||||
body.gravityScale = 0f;
|
||||
body.linearVelocity = Vector2.zero;
|
||||
body.angularVelocity = 0f;
|
||||
nextJumpTime = Time.time + 0.1f;
|
||||
}
|
||||
else
|
||||
{
|
||||
if (cachedRenderer != null)
|
||||
{
|
||||
if (!string.IsNullOrWhiteSpace(basketSortingLayer))
|
||||
{
|
||||
cachedRenderer.sortingLayerName = originalSortingLayer;
|
||||
}
|
||||
cachedRenderer.sortingOrder = originalSortingOrder;
|
||||
}
|
||||
hasBasketAnchor = false;
|
||||
body.simulated = basketSimulated;
|
||||
body.bodyType = basketBodyType;
|
||||
body.gravityScale = basketGravityScale;
|
||||
}
|
||||
}
|
||||
|
||||
public void OnThrown()
|
||||
{
|
||||
movementLockUntil = Time.time + throwControlLockTime;
|
||||
|
||||
@@ -17,12 +17,12 @@ EditorBuildSettings:
|
||||
- enabled: 1
|
||||
path: Assets/Scenes/Win.unity
|
||||
guid: 4130885cdd041af4c8b7861d46bbcf11
|
||||
- enabled: 1
|
||||
path: Assets/Scenes/Lose.unity
|
||||
guid: d554758d849cd094e9fe7db190ef082e
|
||||
- enabled: 1
|
||||
path: Assets/Scenes/Credits.unity
|
||||
guid: 08e6b38f452419e4480fc1510dc9a2de
|
||||
- enabled: 1
|
||||
path: Assets/Scenes/Lose.unity
|
||||
guid: d554758d849cd094e9fe7db190ef082e
|
||||
m_configObjects:
|
||||
com.unity.input.settings.actions: {fileID: -944628639613478452, guid: 2bcd2660ca9b64942af0de543d8d7100, type: 3}
|
||||
m_UseUCBPForAssetBundles: 0
|
||||
|
||||