Small changes (Orginized scripts into assembly definitions)
This commit is contained in:
parent
a40308bcbc
commit
81862a21f0
|
@ -3686,12 +3686,20 @@ PrefabInstance:
|
|||
objectReference: {fileID: 0}
|
||||
m_RemovedComponents: []
|
||||
m_RemovedGameObjects: []
|
||||
m_AddedGameObjects: []
|
||||
m_AddedGameObjects:
|
||||
- targetCorrespondingSourceObject: {fileID: 3032075919872812610, guid: ec5007446d8bbca48bf02b3a7e752da1, type: 3}
|
||||
insertIndex: -1
|
||||
addedObject: {fileID: 4910321061857220296}
|
||||
m_AddedComponents:
|
||||
- targetCorrespondingSourceObject: {fileID: 809911508645467208, guid: ec5007446d8bbca48bf02b3a7e752da1, type: 3}
|
||||
insertIndex: -1
|
||||
addedObject: {fileID: 1566837126}
|
||||
m_SourcePrefab: {fileID: 100100000, guid: ec5007446d8bbca48bf02b3a7e752da1, type: 3}
|
||||
--- !u!4 &1683288374126251322 stripped
|
||||
Transform:
|
||||
m_CorrespondingSourceObject: {fileID: 3032075919872812610, guid: ec5007446d8bbca48bf02b3a7e752da1, type: 3}
|
||||
m_PrefabInstance: {fileID: 1683288374126251321}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
--- !u!1001 &4158834148864819266
|
||||
PrefabInstance:
|
||||
m_ObjectHideFlags: 0
|
||||
|
@ -3819,7 +3827,7 @@ PrefabInstance:
|
|||
serializedVersion: 2
|
||||
m_Modification:
|
||||
serializedVersion: 3
|
||||
m_TransformParent: {fileID: 0}
|
||||
m_TransformParent: {fileID: 1683288374126251322}
|
||||
m_Modifications:
|
||||
- target: {fileID: 144529238244638330, guid: 0248db69242a3dd47898c6742b6c9f60, type: 3}
|
||||
propertyPath: m_LocalPosition.x
|
||||
|
@ -3839,15 +3847,15 @@ PrefabInstance:
|
|||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 144529238244638330, guid: 0248db69242a3dd47898c6742b6c9f60, type: 3}
|
||||
propertyPath: m_LocalRotation.x
|
||||
value: 0
|
||||
value: -0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 144529238244638330, guid: 0248db69242a3dd47898c6742b6c9f60, type: 3}
|
||||
propertyPath: m_LocalRotation.y
|
||||
value: 0
|
||||
value: -0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 144529238244638330, guid: 0248db69242a3dd47898c6742b6c9f60, type: 3}
|
||||
propertyPath: m_LocalRotation.z
|
||||
value: 0
|
||||
value: -0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 144529238244638330, guid: 0248db69242a3dd47898c6742b6c9f60, type: 3}
|
||||
propertyPath: m_LocalEulerAnglesHint.x
|
||||
|
@ -3878,6 +3886,11 @@ PrefabInstance:
|
|||
m_AddedGameObjects: []
|
||||
m_AddedComponents: []
|
||||
m_SourcePrefab: {fileID: 100100000, guid: 0248db69242a3dd47898c6742b6c9f60, type: 3}
|
||||
--- !u!4 &4910321061857220296 stripped
|
||||
Transform:
|
||||
m_CorrespondingSourceObject: {fileID: 144529238244638330, guid: 0248db69242a3dd47898c6742b6c9f60, type: 3}
|
||||
m_PrefabInstance: {fileID: 4910321061857220295}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
--- !u!1001 &5796191506433166633
|
||||
PrefabInstance:
|
||||
m_ObjectHideFlags: 0
|
||||
|
@ -4750,7 +4763,6 @@ SceneRoots:
|
|||
- {fileID: 1600052934}
|
||||
- {fileID: 480860136}
|
||||
- {fileID: 150061137}
|
||||
- {fileID: 4910321061857220295}
|
||||
- {fileID: 8530121857647845872}
|
||||
- {fileID: 5796191506433166633}
|
||||
- {fileID: 1872712131}
|
||||
|
|
|
@ -0,0 +1,8 @@
|
|||
fileFormatVersion: 2
|
||||
guid: dcdaf56f7266f3744a9f772f7f9773b9
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
|
@ -0,0 +1,17 @@
|
|||
{
|
||||
"name": "Project.Scripts.Animation",
|
||||
"rootNamespace": "",
|
||||
"references": [
|
||||
"GUID:1eb4e3e6c04cdc848bab71651b1e2ecd",
|
||||
"GUID:f4c364e1215051e4dbc6c0bc8fb49793"
|
||||
],
|
||||
"includePlatforms": [],
|
||||
"excludePlatforms": [],
|
||||
"allowUnsafeCode": false,
|
||||
"overrideReferences": false,
|
||||
"precompiledReferences": [],
|
||||
"autoReferenced": true,
|
||||
"defineConstraints": [],
|
||||
"versionDefines": [],
|
||||
"noEngineReferences": false
|
||||
}
|
|
@ -0,0 +1,7 @@
|
|||
fileFormatVersion: 2
|
||||
guid: ddd4dba7c768b564a879069c52854fc5
|
||||
AssemblyDefinitionImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
|
@ -0,0 +1,8 @@
|
|||
fileFormatVersion: 2
|
||||
guid: c118035e86e90a547a27bee6c7f6e09e
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
|
@ -0,0 +1,16 @@
|
|||
{
|
||||
"name": "Project.Scripts.Blood",
|
||||
"rootNamespace": "",
|
||||
"references": [
|
||||
"GUID:6055be8ebefd69e48b49212b09b47b2f"
|
||||
],
|
||||
"includePlatforms": [],
|
||||
"excludePlatforms": [],
|
||||
"allowUnsafeCode": false,
|
||||
"overrideReferences": false,
|
||||
"precompiledReferences": [],
|
||||
"autoReferenced": true,
|
||||
"defineConstraints": [],
|
||||
"versionDefines": [],
|
||||
"noEngineReferences": false
|
||||
}
|
|
@ -0,0 +1,7 @@
|
|||
fileFormatVersion: 2
|
||||
guid: 1eb4e3e6c04cdc848bab71651b1e2ecd
|
||||
AssemblyDefinitionImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
|
@ -1,6 +1,6 @@
|
|||
using System;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using Unity.Mathematics;
|
||||
|
||||
public static class FloatExtensions
|
||||
{
|
||||
|
@ -25,5 +25,5 @@ public static class FloatExtensions
|
|||
/// <summary>
|
||||
/// Just clamps the value between two numbers (Easier to write)
|
||||
/// </summary>
|
||||
public static float Clamp(this float input, float min, float max) => math.clamp(input, min, max);
|
||||
public static float Clamp(this float input, float min, float max) => Math.Clamp(input, min, max);
|
||||
}
|
||||
|
|
|
@ -0,0 +1,16 @@
|
|||
{
|
||||
"name": "Project.Scripts.Extensions",
|
||||
"rootNamespace": "",
|
||||
"references": [
|
||||
"GUID:4307f53044263cf4b835bd812fc161a4"
|
||||
],
|
||||
"includePlatforms": [],
|
||||
"excludePlatforms": [],
|
||||
"allowUnsafeCode": false,
|
||||
"overrideReferences": false,
|
||||
"precompiledReferences": [],
|
||||
"autoReferenced": true,
|
||||
"defineConstraints": [],
|
||||
"versionDefines": [],
|
||||
"noEngineReferences": false
|
||||
}
|
|
@ -0,0 +1,7 @@
|
|||
fileFormatVersion: 2
|
||||
guid: f0aa6e1ec272fc041a727a9dfb7c1e67
|
||||
AssemblyDefinitionImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
|
@ -0,0 +1,8 @@
|
|||
fileFormatVersion: 2
|
||||
guid: fff9e78ab4c04ec41b625b57f54c46be
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
|
@ -0,0 +1,22 @@
|
|||
{
|
||||
"name": "Project.Scripts.HeathSystem",
|
||||
"rootNamespace": "",
|
||||
"references": [
|
||||
"GUID:6055be8ebefd69e48b49212b09b47b2f",
|
||||
"GUID:f0aa6e1ec272fc041a727a9dfb7c1e67",
|
||||
"GUID:75469ad4d38634e559750d17036d5f7c",
|
||||
"GUID:42d1898a72cfe6848ae89835fb20acd2",
|
||||
"GUID:ddd4dba7c768b564a879069c52854fc5",
|
||||
"GUID:f4c364e1215051e4dbc6c0bc8fb49793",
|
||||
"GUID:1eb4e3e6c04cdc848bab71651b1e2ecd"
|
||||
],
|
||||
"includePlatforms": [],
|
||||
"excludePlatforms": [],
|
||||
"allowUnsafeCode": false,
|
||||
"overrideReferences": false,
|
||||
"precompiledReferences": [],
|
||||
"autoReferenced": true,
|
||||
"defineConstraints": [],
|
||||
"versionDefines": [],
|
||||
"noEngineReferences": false
|
||||
}
|
|
@ -0,0 +1,7 @@
|
|||
fileFormatVersion: 2
|
||||
guid: 2ea4a18a75f268848b43865100892489
|
||||
AssemblyDefinitionImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
|
@ -1,10 +1,12 @@
|
|||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
using UnityEngine.InputSystem;
|
||||
using System.Linq;
|
||||
using UnityUtils;
|
||||
|
||||
//using System.Collections;
|
||||
//using System.Collections.Generic;
|
||||
//using UnityEngine;
|
||||
//using UnityEngine.InputSystem;
|
||||
//using System.Linq;
|
||||
//using UnityUtils;
|
||||
/*
|
||||
* Screw this whip attack. Hard coded code. I hate it...
|
||||
*
|
||||
public class RopeWhipAttack : MonoBehaviour
|
||||
{
|
||||
[SerializeField] PlayerAnimationHandler animationHandler;
|
||||
|
@ -73,3 +75,4 @@ public class RopeWhipAttack : MonoBehaviour
|
|||
return angle;
|
||||
}
|
||||
}
|
||||
*/
|
|
@ -2,7 +2,6 @@ using System;
|
|||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using TMPro;
|
||||
using Unity.VisualScripting;
|
||||
using UnityEngine;
|
||||
|
||||
|
@ -77,7 +76,7 @@ public class AudioManager : MonoBehaviour
|
|||
|
||||
|
||||
audioSource.Play();
|
||||
yield return new WaitUntil(() => audioSource.gameObject.IsDestroyed() || !audioSource.isPlaying);
|
||||
yield return new WaitUntil(() => audioSource.gameObject == null || !audioSource.isPlaying);
|
||||
|
||||
try
|
||||
{
|
||||
|
@ -107,7 +106,7 @@ public class AudioManager : MonoBehaviour
|
|||
StopAllCoroutines();
|
||||
foreach (SoundSource item in AliveSources)
|
||||
{
|
||||
if (item.IsUnityNull() || item.source.IsUnityNull()) continue;
|
||||
if (item == null || item.source == null) continue;
|
||||
|
||||
item.source.Stop();
|
||||
Destroy(item.source.gameObject);
|
||||
|
|
|
@ -0,0 +1,3 @@
|
|||
{
|
||||
"name": "Project.Scripts.Manager.Audio"
|
||||
}
|
|
@ -0,0 +1,7 @@
|
|||
fileFormatVersion: 2
|
||||
guid: 0ba5c175a7b2c8345a4e996560a9d0ab
|
||||
AssemblyDefinitionImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
|
@ -0,0 +1,20 @@
|
|||
{
|
||||
"name": "Project.Scripts.Manager",
|
||||
"rootNamespace": "",
|
||||
"references": [
|
||||
"GUID:6055be8ebefd69e48b49212b09b47b2f",
|
||||
"GUID:0ba5c175a7b2c8345a4e996560a9d0ab",
|
||||
"GUID:2ea4a18a75f268848b43865100892489",
|
||||
"GUID:055e16077a1232f4780a04598b3bfe00",
|
||||
"GUID:1031dfc67c8f1a645b71d679ac3bf7db"
|
||||
],
|
||||
"includePlatforms": [],
|
||||
"excludePlatforms": [],
|
||||
"allowUnsafeCode": false,
|
||||
"overrideReferences": false,
|
||||
"precompiledReferences": [],
|
||||
"autoReferenced": true,
|
||||
"defineConstraints": [],
|
||||
"versionDefines": [],
|
||||
"noEngineReferences": false
|
||||
}
|
|
@ -0,0 +1,7 @@
|
|||
fileFormatVersion: 2
|
||||
guid: c0e1b40f519e6e84b8f4af9930403ecb
|
||||
AssemblyDefinitionImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
|
@ -0,0 +1,19 @@
|
|||
{
|
||||
"name": "Project.Scripts.Manager.Rumble",
|
||||
"rootNamespace": "",
|
||||
"references": [
|
||||
"GUID:75469ad4d38634e559750d17036d5f7c",
|
||||
"GUID:f4c364e1215051e4dbc6c0bc8fb49793",
|
||||
"GUID:42d1898a72cfe6848ae89835fb20acd2",
|
||||
"GUID:f0aa6e1ec272fc041a727a9dfb7c1e67"
|
||||
],
|
||||
"includePlatforms": [],
|
||||
"excludePlatforms": [],
|
||||
"allowUnsafeCode": false,
|
||||
"overrideReferences": false,
|
||||
"precompiledReferences": [],
|
||||
"autoReferenced": true,
|
||||
"defineConstraints": [],
|
||||
"versionDefines": [],
|
||||
"noEngineReferences": false
|
||||
}
|
|
@ -0,0 +1,7 @@
|
|||
fileFormatVersion: 2
|
||||
guid: 055e16077a1232f4780a04598b3bfe00
|
||||
AssemblyDefinitionImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
|
@ -0,0 +1,20 @@
|
|||
{
|
||||
"name": "Project.Scripts.Misc",
|
||||
"rootNamespace": "",
|
||||
"references": [
|
||||
"GUID:75469ad4d38634e559750d17036d5f7c",
|
||||
"GUID:2ea4a18a75f268848b43865100892489",
|
||||
"GUID:f4c364e1215051e4dbc6c0bc8fb49793",
|
||||
"GUID:42d1898a72cfe6848ae89835fb20acd2",
|
||||
"GUID:0ba5c175a7b2c8345a4e996560a9d0ab"
|
||||
],
|
||||
"includePlatforms": [],
|
||||
"excludePlatforms": [],
|
||||
"allowUnsafeCode": false,
|
||||
"overrideReferences": false,
|
||||
"precompiledReferences": [],
|
||||
"autoReferenced": true,
|
||||
"defineConstraints": [],
|
||||
"versionDefines": [],
|
||||
"noEngineReferences": false
|
||||
}
|
|
@ -0,0 +1,7 @@
|
|||
fileFormatVersion: 2
|
||||
guid: 1031dfc67c8f1a645b71d679ac3bf7db
|
||||
AssemblyDefinitionImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
|
@ -9,6 +9,8 @@ public class NetworkedGameSetup : NetworkBehaviour
|
|||
{
|
||||
[SerializeField] private GameObject PlayerPrefab;
|
||||
|
||||
private RopeSimulator RopeSim;
|
||||
|
||||
private void Start()
|
||||
{
|
||||
DontDestroyOnLoad(this);
|
||||
|
@ -17,15 +19,26 @@ public class NetworkedGameSetup : NetworkBehaviour
|
|||
|
||||
private void SceneLoaded(string sceneName, LoadSceneMode loadSceneMode, List<ulong> clientsCompleted, List<ulong> clientsTimedOut)
|
||||
{
|
||||
if (IsHost && sceneName == "Multiplayer")
|
||||
{
|
||||
for (int i = 0; i < clientsCompleted.Count; i++)
|
||||
{
|
||||
GameObject player = Instantiate(PlayerPrefab, Vector2.up * 3, Quaternion.identity);
|
||||
player.GetComponent<NetworkObject>().SpawnAsPlayerObject(clientsCompleted[i], true);
|
||||
}
|
||||
StartSetupProcedure(clientsCompleted);
|
||||
}
|
||||
|
||||
private void StartSetupProcedure(List<ulong> playerIds)
|
||||
{
|
||||
SpawnPlayers(playerIds);
|
||||
}
|
||||
|
||||
private void SpawnPlayers(List<ulong> playerIds)
|
||||
{
|
||||
NetworkManager.Singleton.SceneManager.OnLoadEventCompleted -= SceneLoaded;
|
||||
|
||||
// Assuming only 2 palyers
|
||||
if (IsHost)
|
||||
{
|
||||
for (int i = 0; i < playerIds.Count; i++)
|
||||
{
|
||||
GameObject player = Instantiate(PlayerPrefab, Vector2.up * 3, Quaternion.identity);
|
||||
player.GetComponent<NetworkObject>().SpawnAsPlayerObject(playerIds[i], true);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -8,7 +8,8 @@
|
|||
"GUID:3b8ed52f1b5c64994af4c4e0aa4b6c4b",
|
||||
"GUID:1491147abca9d7d4bb7105af628b223e",
|
||||
"GUID:75469ad4d38634e559750d17036d5f7c",
|
||||
"GUID:dfa0fc7c5444edd619a15e6f8c8f242a"
|
||||
"GUID:dfa0fc7c5444edd619a15e6f8c8f242a",
|
||||
"GUID:42d1898a72cfe6848ae89835fb20acd2"
|
||||
],
|
||||
"includePlatforms": [],
|
||||
"excludePlatforms": [],
|
||||
|
|
|
@ -1,24 +0,0 @@
|
|||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
|
||||
public class FootStepSounder : MonoBehaviour
|
||||
{
|
||||
[SerializeField] private float StepInterval = 0.5f;
|
||||
[SerializeField] private float Volume = 0.25f;
|
||||
|
||||
private float movedDist = 0;
|
||||
private Vector3 prevPos;
|
||||
|
||||
// Update is called once per frame
|
||||
void Update()
|
||||
{
|
||||
movedDist += Vector3.Distance(transform.position, prevPos);
|
||||
if (movedDist % StepInterval < 0.2f)
|
||||
{
|
||||
AudioManager.PlaySound("Footstep_" + UnityEngine.Random.Range(1, 6), transform.position).volume = Volume;
|
||||
}
|
||||
|
||||
prevPos = transform.position;
|
||||
}
|
||||
}
|
|
@ -1,11 +0,0 @@
|
|||
fileFormatVersion: 2
|
||||
guid: d4d58ce9310f45c42af5d8003f1a832c
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
|
@ -0,0 +1,8 @@
|
|||
fileFormatVersion: 2
|
||||
guid: 8c01cc5261334ad488bcf76ce50e5bcc
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
|
@ -0,0 +1,16 @@
|
|||
{
|
||||
"name": "Project.Scripts.Player.Input",
|
||||
"rootNamespace": "",
|
||||
"references": [
|
||||
"GUID:75469ad4d38634e559750d17036d5f7c"
|
||||
],
|
||||
"includePlatforms": [],
|
||||
"excludePlatforms": [],
|
||||
"allowUnsafeCode": false,
|
||||
"overrideReferences": false,
|
||||
"precompiledReferences": [],
|
||||
"autoReferenced": true,
|
||||
"defineConstraints": [],
|
||||
"versionDefines": [],
|
||||
"noEngineReferences": false
|
||||
}
|
|
@ -0,0 +1,7 @@
|
|||
fileFormatVersion: 2
|
||||
guid: f4c364e1215051e4dbc6c0bc8fb49793
|
||||
AssemblyDefinitionImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
|
@ -0,0 +1,8 @@
|
|||
fileFormatVersion: 2
|
||||
guid: 9a6310ed209ed4b4ba19dd35c8f6150f
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
|
@ -16,7 +16,7 @@ public class PlayerMovement : MonoBehaviour
|
|||
|
||||
[Header("Whipping")]
|
||||
[SerializeField]
|
||||
RopeWhipAttack whipAttack;
|
||||
//RopeWhipAttack whipAttack;
|
||||
public float whipSmashSpeed = 2f;
|
||||
public float whipSmashDamageMult = 2f;
|
||||
|
||||
|
@ -63,21 +63,21 @@ public class PlayerMovement : MonoBehaviour
|
|||
|
||||
private void FixedUpdate()
|
||||
{
|
||||
if (whipAttack.IsBeingWhipped)
|
||||
{
|
||||
//float sign = Vector2.Dot((whipAttack.joint.position - whipAttack.otherPlayerAttack.joint.position).normalized, movement.normalized);
|
||||
//if (whipAttack.IsBeingWhipped)
|
||||
//{
|
||||
// //float sign = Vector2.Dot((whipAttack.joint.position - whipAttack.otherPlayerAttack.joint.position).normalized, movement.normalized);
|
||||
|
||||
Vector2 ropeDir = whipAttack.otherPlayerAttack.joint.position - whipAttack.joint.position;
|
||||
Vector2 tangent = new Vector2(-ropeDir.y, ropeDir.x).normalized;
|
||||
// Vector2 ropeDir = whipAttack.otherPlayerAttack.joint.position - whipAttack.joint.position;
|
||||
// Vector2 tangent = new Vector2(-ropeDir.y, ropeDir.x).normalized;
|
||||
|
||||
rb.AddForce(Vector2.Dot(playerInput.movement, tangent) * tangent * whipMoveSpeed);
|
||||
rb.velocity = Vector2.ClampMagnitude(rb.velocity, maxWhipMoveSpeed);
|
||||
}
|
||||
else if (whipAttack.IsWhippingOtherPlayer)
|
||||
{
|
||||
playerInput.movement = Vector2.zero;
|
||||
}
|
||||
else
|
||||
// rb.AddForce(Vector2.Dot(playerInput.movement, tangent) * tangent * whipMoveSpeed);
|
||||
// rb.velocity = Vector2.ClampMagnitude(rb.velocity, maxWhipMoveSpeed);
|
||||
//}
|
||||
//else if (whipAttack.IsWhippingOtherPlayer)
|
||||
//{
|
||||
// playerInput.movement = Vector2.zero;
|
||||
//}
|
||||
//else
|
||||
{
|
||||
rb.AddForce(playerInput.movement * moveSpeed);
|
||||
}
|
|
@ -0,0 +1,22 @@
|
|||
{
|
||||
"name": "Project.Scripts.Player.Movement",
|
||||
"rootNamespace": "",
|
||||
"references": [
|
||||
"GUID:75469ad4d38634e559750d17036d5f7c",
|
||||
"GUID:0ba5c175a7b2c8345a4e996560a9d0ab",
|
||||
"GUID:42d1898a72cfe6848ae89835fb20acd2",
|
||||
"GUID:ddd4dba7c768b564a879069c52854fc5",
|
||||
"GUID:2ea4a18a75f268848b43865100892489",
|
||||
"GUID:ab47f305e1cd6654ca0ff5d6c7942d09",
|
||||
"GUID:f4c364e1215051e4dbc6c0bc8fb49793"
|
||||
],
|
||||
"includePlatforms": [],
|
||||
"excludePlatforms": [],
|
||||
"allowUnsafeCode": false,
|
||||
"overrideReferences": false,
|
||||
"precompiledReferences": [],
|
||||
"autoReferenced": true,
|
||||
"defineConstraints": [],
|
||||
"versionDefines": [],
|
||||
"noEngineReferences": false
|
||||
}
|
|
@ -0,0 +1,7 @@
|
|||
fileFormatVersion: 2
|
||||
guid: 5746422f3e8049a42aa33040daade640
|
||||
AssemblyDefinitionImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
|
@ -0,0 +1,8 @@
|
|||
fileFormatVersion: 2
|
||||
guid: 08d70a5a2fcb19549b7108ea3f4acb09
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
|
@ -0,0 +1,20 @@
|
|||
{
|
||||
"name": "Project.scripts.player",
|
||||
"rootNamespace": "",
|
||||
"references": [
|
||||
"GUID:6055be8ebefd69e48b49212b09b47b2f",
|
||||
"GUID:1eb4e3e6c04cdc848bab71651b1e2ecd",
|
||||
"GUID:f0aa6e1ec272fc041a727a9dfb7c1e67",
|
||||
"GUID:75469ad4d38634e559750d17036d5f7c",
|
||||
"GUID:2ea4a18a75f268848b43865100892489"
|
||||
],
|
||||
"includePlatforms": [],
|
||||
"excludePlatforms": [],
|
||||
"allowUnsafeCode": false,
|
||||
"overrideReferences": false,
|
||||
"precompiledReferences": [],
|
||||
"autoReferenced": true,
|
||||
"defineConstraints": [],
|
||||
"versionDefines": [],
|
||||
"noEngineReferences": false
|
||||
}
|
|
@ -0,0 +1,7 @@
|
|||
fileFormatVersion: 2
|
||||
guid: ab47f305e1cd6654ca0ff5d6c7942d09
|
||||
AssemblyDefinitionImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
|
@ -0,0 +1,19 @@
|
|||
{
|
||||
"name": "Project.Scripts.Rope",
|
||||
"rootNamespace": "",
|
||||
"references": [
|
||||
"GUID:75469ad4d38634e559750d17036d5f7c",
|
||||
"GUID:6055be8ebefd69e48b49212b09b47b2f",
|
||||
"GUID:f4c364e1215051e4dbc6c0bc8fb49793",
|
||||
"GUID:ddd4dba7c768b564a879069c52854fc5"
|
||||
],
|
||||
"includePlatforms": [],
|
||||
"excludePlatforms": [],
|
||||
"allowUnsafeCode": false,
|
||||
"overrideReferences": false,
|
||||
"precompiledReferences": [],
|
||||
"autoReferenced": true,
|
||||
"defineConstraints": [],
|
||||
"versionDefines": [],
|
||||
"noEngineReferences": false
|
||||
}
|
|
@ -0,0 +1,7 @@
|
|||
fileFormatVersion: 2
|
||||
guid: 42d1898a72cfe6848ae89835fb20acd2
|
||||
AssemblyDefinitionImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
|
@ -3,7 +3,6 @@ using System.Collections;
|
|||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using UnityEngine;
|
||||
using UnityUtils;
|
||||
|
||||
public class RopeSimulator : MonoBehaviour
|
||||
{
|
||||
|
@ -192,7 +191,12 @@ public class RopeSimulator : MonoBehaviour
|
|||
|
||||
private void RebuildRopeColliders()
|
||||
{
|
||||
ropeCollidersParent.DestroyChildren();
|
||||
// ropeCollidersParent.DestroyChildren(); Did this to avoid unityutils
|
||||
for (int i = 0; i < ropeCollidersParent.childCount; i++)
|
||||
{
|
||||
Destroy(ropeCollidersParent.GetChild(i));
|
||||
}
|
||||
|
||||
foreach (var point in rope.points)
|
||||
{
|
||||
GameObject ropeCollider = new GameObject("Rope Collider");
|
||||
|
|
|
@ -0,0 +1,8 @@
|
|||
fileFormatVersion: 2
|
||||
guid: 7468ee70bf910be41bf2bb639c4f50f7
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
|
@ -0,0 +1,24 @@
|
|||
{
|
||||
"name": "Project.Scripts.Upgrades",
|
||||
"rootNamespace": "",
|
||||
"references": [
|
||||
"GUID:6055be8ebefd69e48b49212b09b47b2f",
|
||||
"GUID:75469ad4d38634e559750d17036d5f7c",
|
||||
"GUID:1eb4e3e6c04cdc848bab71651b1e2ecd",
|
||||
"GUID:42d1898a72cfe6848ae89835fb20acd2",
|
||||
"GUID:f4c364e1215051e4dbc6c0bc8fb49793",
|
||||
"GUID:0ba5c175a7b2c8345a4e996560a9d0ab",
|
||||
"GUID:5746422f3e8049a42aa33040daade640",
|
||||
"GUID:2ea4a18a75f268848b43865100892489",
|
||||
"GUID:c0e1b40f519e6e84b8f4af9930403ecb"
|
||||
],
|
||||
"includePlatforms": [],
|
||||
"excludePlatforms": [],
|
||||
"allowUnsafeCode": false,
|
||||
"overrideReferences": false,
|
||||
"precompiledReferences": [],
|
||||
"autoReferenced": true,
|
||||
"defineConstraints": [],
|
||||
"versionDefines": [],
|
||||
"noEngineReferences": false
|
||||
}
|
|
@ -0,0 +1,7 @@
|
|||
fileFormatVersion: 2
|
||||
guid: ff1c299121c93f34ca827a253fc30a61
|
||||
AssemblyDefinitionImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
Loading…
Reference in New Issue