add ckg
plantilla base para movimiento básico
This commit is contained in:
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 19cf24659db29c041a9fd368250bdd9f
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: a0fcf3c0b64e88a4abfba4fe8886c70a
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
Binary file not shown.
@@ -0,0 +1,15 @@
|
||||
fileFormatVersion: 2
|
||||
guid: bcf4ccd7323d33741b3158a07516493b
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
AssetOrigin:
|
||||
serializedVersion: 1
|
||||
productId: 40995
|
||||
packageName: Game Kit Controller - Shooter Melee Adventure Creator 3D + 2.5D
|
||||
packageVersion: 3.77g
|
||||
assetPath: Assets/Game Kit Controller/Integrations/External Audio Systems/Documentation/GKC
|
||||
- External Audio Systems Integration.pdf
|
||||
uploadId: 814740
|
||||
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: f8ab4f4545f289b44a8a4f81f73317ff
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: c73c742925e607240ab02d9b3c10c6b5
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,34 @@
|
||||
#if GAME_KIT_CONTROLLER_USE_WWISE
|
||||
using UnityEngine;
|
||||
|
||||
namespace GameKitController.Audio
|
||||
{
|
||||
public class WwiseExternalAudioPlayer : MonoBehaviour, IExternalAudioPlayer
|
||||
{
|
||||
public void Play(AudioElement audioElement, GameObject gameObj)
|
||||
{
|
||||
AkSoundEngine.PostEvent(audioElement.audioEventName, gameObj);
|
||||
}
|
||||
|
||||
public void PlayOneShot(AudioElement audioElement, GameObject gameObj, float volumeScale = 1.0f)
|
||||
{
|
||||
AkSoundEngine.PostEvent(audioElement.audioEventName, gameObj);
|
||||
}
|
||||
|
||||
public void Stop(AudioElement audioElement, GameObject gameObj)
|
||||
{
|
||||
AkSoundEngine.StopAll(gameObj);
|
||||
}
|
||||
|
||||
public void Pause(AudioElement audioElement, GameObject gameObj)
|
||||
{
|
||||
AkSoundEngine.StopAll(gameObj);
|
||||
}
|
||||
|
||||
public void UnPause(AudioElement audioElement, GameObject gameObj)
|
||||
{
|
||||
AkSoundEngine.PostEvent(audioElement.audioEventName, gameObj);
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif
|
||||
@@ -0,0 +1,10 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 50326d7b17c34c2d9817afc1c144543a
|
||||
timeCreated: 1667565343
|
||||
AssetOrigin:
|
||||
serializedVersion: 1
|
||||
productId: 40995
|
||||
packageName: Game Kit Controller - Shooter Melee Adventure Creator 3D + 2.5D
|
||||
packageVersion: 3.77g
|
||||
assetPath: Assets/Game Kit Controller/Integrations/External Audio Systems/Wwise/Scripts/WwiseExternalAudioPlayer.cs
|
||||
uploadId: 814740
|
||||
8
Assets/Game Kit Controller/Integrations/Makinom_ORK.meta
Normal file
8
Assets/Game Kit Controller/Integrations/Makinom_ORK.meta
Normal file
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 879f88eae15ea884cae0fbe005cc280d
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 1bc642ff9f0b3de46ac04c3822bf3167
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
Binary file not shown.
@@ -0,0 +1,15 @@
|
||||
fileFormatVersion: 2
|
||||
guid: e845c4d61a95fe244a576c16f0e3fef4
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
AssetOrigin:
|
||||
serializedVersion: 1
|
||||
productId: 40995
|
||||
packageName: Game Kit Controller - Shooter Melee Adventure Creator 3D + 2.5D
|
||||
packageVersion: 3.77g
|
||||
assetPath: Assets/Game Kit Controller/Integrations/Makinom_ORK/Documentation/GKC
|
||||
- ORK Framework Integration.pdf
|
||||
uploadId: 814740
|
||||
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 28bb9c19173a4494f91696324142ef43
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
Binary file not shown.
@@ -0,0 +1,15 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 8ca0020274db16640a43831a12872d87
|
||||
NativeFormatImporter:
|
||||
externalObjects: {}
|
||||
mainObjectFileID: 11400000
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
AssetOrigin:
|
||||
serializedVersion: 1
|
||||
productId: 40995
|
||||
packageName: Game Kit Controller - Shooter Melee Adventure Creator 3D + 2.5D
|
||||
packageVersion: 3.77g
|
||||
assetPath: Assets/Game Kit Controller/Integrations/Makinom_ORK/Schematics/DialogueSimpleTest.asset
|
||||
uploadId: 814740
|
||||
Binary file not shown.
@@ -0,0 +1,15 @@
|
||||
fileFormatVersion: 2
|
||||
guid: e51059e072b21be4ebf1f4f7acf96367
|
||||
NativeFormatImporter:
|
||||
externalObjects: {}
|
||||
mainObjectFileID: 11400000
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
AssetOrigin:
|
||||
serializedVersion: 1
|
||||
productId: 40995
|
||||
packageName: Game Kit Controller - Shooter Melee Adventure Creator 3D + 2.5D
|
||||
packageVersion: 3.77g
|
||||
assetPath: Assets/Game Kit Controller/Integrations/Makinom_ORK/Schematics/SpawnPlayerGKC_ORK.asset
|
||||
uploadId: 814740
|
||||
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: bb21d76c81c860a418d2db2c71758664
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 02bae3080974b774888bc466b21d0094
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,79 @@
|
||||
#if UNITY_EDITOR && GAME_KIT_CONTROLLER_USE_ORK
|
||||
using GamingIsLove.Makinom;
|
||||
using GamingIsLove.Makinom.Editor;
|
||||
using GamingIsLove.ORKFramework;
|
||||
using UnityEditor;
|
||||
using UnityEngine;
|
||||
|
||||
namespace GameKitController.Integrations.ORKFramework.Editor
|
||||
{
|
||||
[CustomPropertyDrawer (typeof(GKC_ORKStat))]
|
||||
public class GKC_ORKStatDrawer : PropertyDrawer
|
||||
{
|
||||
private SerializedProperty transferMode;
|
||||
private SerializedProperty gkcStat;
|
||||
private SerializedProperty orkStat;
|
||||
|
||||
private playerStatsSystem mainPlayerStatsSystem;
|
||||
|
||||
private readonly string[] _transferModeOptionsDisplayNames = new string[] {
|
||||
"None",
|
||||
"ORK to GKC",
|
||||
"GKC to ORK",
|
||||
"Both",
|
||||
};
|
||||
|
||||
private const string MissingPlayerStatsSystemMessage = "This GameObject needs a Player Stats System component to display the GKC Stats list here.";
|
||||
|
||||
public override float GetPropertyHeight (SerializedProperty property, GUIContent label)
|
||||
{
|
||||
return EditorGUIUtility.singleLineHeight * 3;
|
||||
}
|
||||
|
||||
public override void OnGUI (Rect position, SerializedProperty property, GUIContent label)
|
||||
{
|
||||
if (!Maki.Initialized) {
|
||||
Maki.Initialize (MakinomAssetHelper.LoadProjectAsset());
|
||||
}
|
||||
|
||||
if (!ORK.Initialized) {
|
||||
ORK.Initialize ();
|
||||
}
|
||||
|
||||
if (mainPlayerStatsSystem == null) {
|
||||
mainPlayerStatsSystem = ((MonoBehaviour) property.serializedObject.targetObject).gameObject.GetComponent<playerStatsSystem>();
|
||||
|
||||
if (mainPlayerStatsSystem == null) {
|
||||
EditorGUI.HelpBox (position, MissingPlayerStatsSystemMessage, MessageType.Error);
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
EditorGUI.BeginProperty (position, label, property);
|
||||
|
||||
var indent = EditorGUI.indentLevel;
|
||||
EditorGUI.indentLevel = 0;
|
||||
|
||||
transferMode = property.FindPropertyRelative ("transferMode");
|
||||
gkcStat = property.FindPropertyRelative ("gkcStat");
|
||||
orkStat = property.FindPropertyRelative ("orkStat");
|
||||
|
||||
var y = position.y;
|
||||
var mapModeRect = new Rect (position.x, y, position.width, EditorGUIUtility.singleLineHeight);
|
||||
y += EditorGUIUtility.singleLineHeight;
|
||||
var gkcStatRect = new Rect (position.x, y, position.width, EditorGUIUtility.singleLineHeight);
|
||||
y += EditorGUIUtility.singleLineHeight;
|
||||
var orkStatRect = new Rect (position.x, y, position.width, EditorGUIUtility.singleLineHeight);
|
||||
|
||||
transferMode.intValue = EditorGUI.Popup (mapModeRect, "Transfer Mode", transferMode.intValue, _transferModeOptionsDisplayNames);
|
||||
gkcStat.intValue = EditorGUI.Popup (gkcStatRect, "GKC Stat", gkcStat.intValue, mainPlayerStatsSystem.getStatsNames().ToArray());
|
||||
orkStat.intValue = EditorGUI.Popup (orkStatRect, "ORK Stat", orkStat.intValue, ORK.StatusValues.GetNames().ToArray());
|
||||
|
||||
EditorGUI.indentLevel = indent;
|
||||
|
||||
EditorGUI.EndProperty ();
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif
|
||||
@@ -0,0 +1,18 @@
|
||||
fileFormatVersion: 2
|
||||
guid: d500a6c8ccbe67549b098767dd7e59f8
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
AssetOrigin:
|
||||
serializedVersion: 1
|
||||
productId: 40995
|
||||
packageName: Game Kit Controller - Shooter Melee Adventure Creator 3D + 2.5D
|
||||
packageVersion: 3.77g
|
||||
assetPath: Assets/Game Kit Controller/Integrations/Makinom_ORK/Scripts/Editor/GKC_ORKStatDrawer.cs
|
||||
uploadId: 814740
|
||||
@@ -0,0 +1,14 @@
|
||||
#if GAME_KIT_CONTROLLER_USE_ORK
|
||||
using System;
|
||||
|
||||
namespace GameKitController.Integrations.ORKFramework
|
||||
{
|
||||
[Serializable]
|
||||
public class GKC_ORKStat
|
||||
{
|
||||
public GKC_ORKTransferMode transferMode = GKC_ORKTransferMode.OrkToGkc;
|
||||
public int gkcStat;
|
||||
public int orkStat;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
@@ -0,0 +1,18 @@
|
||||
fileFormatVersion: 2
|
||||
guid: e86fe7de020e2eb478ee1eb50ad5ed3f
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
AssetOrigin:
|
||||
serializedVersion: 1
|
||||
productId: 40995
|
||||
packageName: Game Kit Controller - Shooter Melee Adventure Creator 3D + 2.5D
|
||||
packageVersion: 3.77g
|
||||
assetPath: Assets/Game Kit Controller/Integrations/Makinom_ORK/Scripts/GKC_ORKStat.cs
|
||||
uploadId: 814740
|
||||
@@ -0,0 +1,141 @@
|
||||
#if GAME_KIT_CONTROLLER_USE_ORK
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using GamingIsLove.ORKFramework;
|
||||
using UnityEngine;
|
||||
|
||||
namespace GameKitController.Integrations.ORKFramework
|
||||
{
|
||||
public class GKC_ORKStatsBridge : MonoBehaviour
|
||||
{
|
||||
public playerStatsSystem mainPlayerStatsSystem;
|
||||
public externalStatsManager externalStatsManager;
|
||||
public GameObject combatantGameObject;
|
||||
|
||||
[Space]
|
||||
public List<GKC_ORKStat> GKC_ORKStats;
|
||||
|
||||
private Combatant _combatant;
|
||||
|
||||
private void OnEnable ()
|
||||
{
|
||||
StartCoroutine (OnEnableCoroutine ());
|
||||
}
|
||||
|
||||
private IEnumerator OnEnableCoroutine ()
|
||||
{
|
||||
while (_combatant == null) {
|
||||
_combatant = ORKComponentHelper.GetCombatant(combatantGameObject);
|
||||
yield return null;
|
||||
}
|
||||
|
||||
RegisterOrkStatusValuesEventHandlers ();
|
||||
RegisterGkcStatusValuesEventHandlers ();
|
||||
}
|
||||
|
||||
private void OnDisable ()
|
||||
{
|
||||
GetCombatantIfNull ();
|
||||
|
||||
if (_combatant == null) {
|
||||
return;
|
||||
}
|
||||
|
||||
UnregisterOrkStatusValuesEventHandlers ();
|
||||
UnregisterGkcStatusValuesEventHandlers ();
|
||||
}
|
||||
|
||||
private void GetCombatantIfNull ()
|
||||
{
|
||||
if (_combatant == null) {
|
||||
_combatant = ORKComponentHelper.GetCombatant(combatantGameObject);
|
||||
}
|
||||
}
|
||||
|
||||
public void RegisterOrkStatusValuesEventHandlers ()
|
||||
{
|
||||
foreach (var statInfo in mainPlayerStatsSystem.statInfoList) {
|
||||
if (!statInfo.useEventToSendValueOnUpdateStatExternally) {
|
||||
statInfo.useEventToSendValueOnUpdateStatExternally = true;
|
||||
}
|
||||
}
|
||||
|
||||
for (var i = 0; i < ORK.StatusValues.Count; i++) {
|
||||
_combatant.Status[i].ValueChanged += OnOrkStatusValueChanged;
|
||||
}
|
||||
}
|
||||
|
||||
public void UnregisterOrkStatusValuesEventHandlers ()
|
||||
{
|
||||
for (var i = 0; i < ORK.StatusValues.Count; i++) {
|
||||
_combatant.Status[i].ValueChanged -= OnOrkStatusValueChanged;
|
||||
}
|
||||
}
|
||||
|
||||
public void RegisterGkcStatusValuesEventHandlers ()
|
||||
{
|
||||
foreach (var statInfo in mainPlayerStatsSystem.statInfoList) {
|
||||
if (!statInfo.useEventToSendValueOnUpdateStat) {
|
||||
statInfo.useEventToSendValueOnUpdateStat = true;
|
||||
}
|
||||
|
||||
statInfo.eventToSendValueOnUpdateStat.AddListener(OnGkcStatusValueChanged);
|
||||
}
|
||||
}
|
||||
|
||||
public void UnregisterGkcStatusValuesEventHandlers ()
|
||||
{
|
||||
foreach (var statInfo in mainPlayerStatsSystem.statInfoList) {
|
||||
statInfo.eventToSendValueOnUpdateStat.RemoveListener(OnGkcStatusValueChanged);
|
||||
}
|
||||
}
|
||||
|
||||
public void OnOrkStatusValueChanged (Combatant combatant, StatusValue statusValue, int change)
|
||||
{
|
||||
foreach (var gkcOrkStat in GKC_ORKStats) {
|
||||
if (gkcOrkStat.transferMode != GKC_ORKTransferMode.OrkToGkc && gkcOrkStat.transferMode != GKC_ORKTransferMode.Both) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (gkcOrkStat.orkStat == statusValue.ID) {
|
||||
if (AreGkcOrkStatValuesEqual (gkcOrkStat)) {
|
||||
return;
|
||||
}
|
||||
|
||||
var newValue = _combatant.Status[gkcOrkStat.orkStat].GetValue ();
|
||||
externalStatsManager.updateStatValueExternally (gkcOrkStat.gkcStat, newValue);
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public void OnGkcStatusValueChanged (int statId, float newValue)
|
||||
{
|
||||
foreach (var gkcOrkStat in GKC_ORKStats) {
|
||||
if (gkcOrkStat.transferMode != GKC_ORKTransferMode.GkcToOrk && gkcOrkStat.transferMode != GKC_ORKTransferMode.Both) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (gkcOrkStat.gkcStat == statId) {
|
||||
if (AreGkcOrkStatValuesEqual (gkcOrkStat)) {
|
||||
return;
|
||||
}
|
||||
|
||||
_combatant.Status[gkcOrkStat.orkStat].SetValue ((int) newValue, false, true, true, false, false, null);
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public bool AreGkcOrkStatValuesEqual (GKC_ORKStat gkcOrkStat)
|
||||
{
|
||||
if (_combatant.Status[gkcOrkStat.orkStat].GetValue () ==
|
||||
(int) mainPlayerStatsSystem.getStatValueByIndex (gkcOrkStat.gkcStat)) {
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif
|
||||
@@ -0,0 +1,18 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 474f473906b26e540946308bf6a2c626
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
AssetOrigin:
|
||||
serializedVersion: 1
|
||||
productId: 40995
|
||||
packageName: Game Kit Controller - Shooter Melee Adventure Creator 3D + 2.5D
|
||||
packageVersion: 3.77g
|
||||
assetPath: Assets/Game Kit Controller/Integrations/Makinom_ORK/Scripts/GKC_ORKStatsBridge.cs
|
||||
uploadId: 814740
|
||||
@@ -0,0 +1,12 @@
|
||||
#if GAME_KIT_CONTROLLER_USE_ORK
|
||||
namespace GameKitController.Integrations.ORKFramework
|
||||
{
|
||||
public enum GKC_ORKTransferMode
|
||||
{
|
||||
None,
|
||||
OrkToGkc,
|
||||
GkcToOrk,
|
||||
Both,
|
||||
}
|
||||
}
|
||||
#endif
|
||||
@@ -0,0 +1,10 @@
|
||||
fileFormatVersion: 2
|
||||
guid: fc18911a227c4448b17148f36b9578e6
|
||||
timeCreated: 1674006154
|
||||
AssetOrigin:
|
||||
serializedVersion: 1
|
||||
productId: 40995
|
||||
packageName: Game Kit Controller - Shooter Melee Adventure Creator 3D + 2.5D
|
||||
packageVersion: 3.77g
|
||||
assetPath: Assets/Game Kit Controller/Integrations/Makinom_ORK/Scripts/GKC_ORKTransferMode.cs
|
||||
uploadId: 814740
|
||||
@@ -0,0 +1,20 @@
|
||||
#if GAME_KIT_CONTROLLER_USE_MAKINOM
|
||||
using GamingIsLove.Makinom;
|
||||
using UnityEngine;
|
||||
|
||||
namespace GameKitController.Integrations.Makinom
|
||||
{
|
||||
public class PauseGameHandlerMakinom : MonoBehaviour
|
||||
{
|
||||
public void PauseGame()
|
||||
{
|
||||
Maki.Game.PauseGame(true, true, false);
|
||||
}
|
||||
|
||||
public void ResumeGame()
|
||||
{
|
||||
Maki.Game.PauseGame(false, true, false);
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif
|
||||
@@ -0,0 +1,18 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 15a31018307f5a04d8b2bf4d01565a26
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
AssetOrigin:
|
||||
serializedVersion: 1
|
||||
productId: 40995
|
||||
packageName: Game Kit Controller - Shooter Melee Adventure Creator 3D + 2.5D
|
||||
packageVersion: 3.77g
|
||||
assetPath: Assets/Game Kit Controller/Integrations/Makinom_ORK/Scripts/PauseGameHandlerMakinom.cs
|
||||
uploadId: 814740
|
||||
@@ -0,0 +1,41 @@
|
||||
#if GAME_KIT_CONTROLLER_USE_MAKINOM
|
||||
using UnityEngine;
|
||||
|
||||
namespace GameKitController.Integrations.Makinom
|
||||
{
|
||||
public class PausePlayerControllerAndCamera_ControlBehaviour : MonoBehaviour
|
||||
{
|
||||
private pauseOrResumePlayerControllerAndCameraSystem _pauseResumeController;
|
||||
private bool _isQuitting;
|
||||
|
||||
private void Awake()
|
||||
{
|
||||
_pauseResumeController = GetComponent<pauseOrResumePlayerControllerAndCameraSystem>();
|
||||
}
|
||||
|
||||
private void OnEnable()
|
||||
{
|
||||
if (_pauseResumeController == null)
|
||||
return;
|
||||
|
||||
_pauseResumeController.pauseOrPlayPlayerComponents(false);
|
||||
}
|
||||
|
||||
private void OnDisable()
|
||||
{
|
||||
if (_isQuitting)
|
||||
return;
|
||||
|
||||
if (_pauseResumeController == null)
|
||||
return;
|
||||
|
||||
_pauseResumeController.pauseOrPlayPlayerComponents(true);
|
||||
}
|
||||
|
||||
private void OnApplicationQuit()
|
||||
{
|
||||
_isQuitting = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif
|
||||
@@ -0,0 +1,18 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 040f1c3ab5f3c7540a23b1fb9762e103
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
AssetOrigin:
|
||||
serializedVersion: 1
|
||||
productId: 40995
|
||||
packageName: Game Kit Controller - Shooter Melee Adventure Creator 3D + 2.5D
|
||||
packageVersion: 3.77g
|
||||
assetPath: Assets/Game Kit Controller/Integrations/Makinom_ORK/Scripts/PausePlayerControllerAndCamera_ControlBehaviour.cs
|
||||
uploadId: 814740
|
||||
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: b528caa89ed44044cbce88f9839d35b5
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 5635966e1ac9e154a9fccf10cfe69385
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,144 @@
|
||||
%YAML 1.1
|
||||
%TAG !u! tag:unity3d.com,2011:
|
||||
--- !u!21 &2100000
|
||||
Material:
|
||||
serializedVersion: 8
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_Name: CableCollorMaterial
|
||||
m_Shader: {fileID: 4800000, guid: 933532a4fcc9baf4fa0491de14d08ed7, type: 3}
|
||||
m_Parent: {fileID: 0}
|
||||
m_ModifiedSerializedProperties: 0
|
||||
m_ValidKeywords:
|
||||
- _ENVIRONMENTREFLECTIONS_OFF
|
||||
m_InvalidKeywords:
|
||||
- _GLOSSYREFLECTIONS_OFF
|
||||
m_LightmapFlags: 4
|
||||
m_EnableInstancingVariants: 0
|
||||
m_DoubleSidedGI: 0
|
||||
m_CustomRenderQueue: -1
|
||||
stringTagMap:
|
||||
RenderType: Opaque
|
||||
disabledShaderPasses:
|
||||
- MOTIONVECTORS
|
||||
m_LockedProperties:
|
||||
m_SavedProperties:
|
||||
serializedVersion: 3
|
||||
m_TexEnvs:
|
||||
- _BaseMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _BumpMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _DetailAlbedoMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _DetailMask:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _DetailNormalMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _EmissionMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _MainTex:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _MetallicGlossMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _OcclusionMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _ParallaxMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _SpecGlossMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _TerrainHolesTexture:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- unity_Lightmaps:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- unity_LightmapsInd:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- unity_ShadowMasks:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
m_Ints: []
|
||||
m_Floats:
|
||||
- _AddPrecomputedVelocity: 0
|
||||
- _AlphaClip: 0
|
||||
- _AlphaToMask: 0
|
||||
- _Blend: 0
|
||||
- _BlendModePreserveSpecular: 1
|
||||
- _BumpScale: 1
|
||||
- _ClearCoatMask: 0
|
||||
- _ClearCoatSmoothness: 0
|
||||
- _Cull: 2
|
||||
- _Cutoff: 0.5
|
||||
- _DetailAlbedoMapScale: 1
|
||||
- _DetailNormalMapScale: 1
|
||||
- _DstBlend: 0
|
||||
- _DstBlendAlpha: 0
|
||||
- _EnvironmentReflections: 0
|
||||
- _GlossMapScale: 0
|
||||
- _Glossiness: 0
|
||||
- _GlossyReflections: 0
|
||||
- _Metallic: 0
|
||||
- _Mode: 0
|
||||
- _OcclusionStrength: 1
|
||||
- _Parallax: 0.005
|
||||
- _QueueOffset: 0
|
||||
- _ReceiveShadows: 1
|
||||
- _Smoothness: 0
|
||||
- _SmoothnessTextureChannel: 0
|
||||
- _SpecularHighlights: 1
|
||||
- _SrcBlend: 1
|
||||
- _SrcBlendAlpha: 1
|
||||
- _Surface: 0
|
||||
- _UVSec: 0
|
||||
- _WorkflowMode: 1
|
||||
- _ZWrite: 1
|
||||
m_Colors:
|
||||
- _BaseColor: {r: 1, g: 1, b: 1, a: 1}
|
||||
- _Color: {r: 1, g: 1, b: 1, a: 1}
|
||||
- _EmissionColor: {r: 0, g: 0, b: 0, a: 1}
|
||||
- _SpecColor: {r: 0.19999996, g: 0.19999996, b: 0.19999996, a: 1}
|
||||
m_BuildTextureStacks: []
|
||||
m_AllowLocking: 1
|
||||
--- !u!114 &2197530889677350752
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 11
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 0}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: d0353a89b1f911e48b9e16bdc9f2e058, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
version: 10
|
||||
@@ -0,0 +1,15 @@
|
||||
fileFormatVersion: 2
|
||||
guid: ee2702eda221efc4e81f60de171762cd
|
||||
NativeFormatImporter:
|
||||
externalObjects: {}
|
||||
mainObjectFileID: 2100000
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
AssetOrigin:
|
||||
serializedVersion: 1
|
||||
productId: 40995
|
||||
packageName: Game Kit Controller - Shooter Melee Adventure Creator 3D + 2.5D
|
||||
packageVersion: 3.77g
|
||||
assetPath: Assets/Game Kit Controller/Integrations/Physic Cables/Materials/CableCollorMaterial.mat
|
||||
uploadId: 814740
|
||||
@@ -0,0 +1,144 @@
|
||||
%YAML 1.1
|
||||
%TAG !u! tag:unity3d.com,2011:
|
||||
--- !u!114 &-4423330913207586668
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 11
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 0}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: d0353a89b1f911e48b9e16bdc9f2e058, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
version: 10
|
||||
--- !u!21 &2100000
|
||||
Material:
|
||||
serializedVersion: 8
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_Name: CableConnectorMaterial
|
||||
m_Shader: {fileID: 4800000, guid: 933532a4fcc9baf4fa0491de14d08ed7, type: 3}
|
||||
m_Parent: {fileID: 0}
|
||||
m_ModifiedSerializedProperties: 0
|
||||
m_ValidKeywords:
|
||||
- _ENVIRONMENTREFLECTIONS_OFF
|
||||
m_InvalidKeywords:
|
||||
- _GLOSSYREFLECTIONS_OFF
|
||||
m_LightmapFlags: 4
|
||||
m_EnableInstancingVariants: 0
|
||||
m_DoubleSidedGI: 0
|
||||
m_CustomRenderQueue: -1
|
||||
stringTagMap:
|
||||
RenderType: Opaque
|
||||
disabledShaderPasses:
|
||||
- MOTIONVECTORS
|
||||
m_LockedProperties:
|
||||
m_SavedProperties:
|
||||
serializedVersion: 3
|
||||
m_TexEnvs:
|
||||
- _BaseMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _BumpMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _DetailAlbedoMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _DetailMask:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _DetailNormalMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _EmissionMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _MainTex:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _MetallicGlossMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _OcclusionMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _ParallaxMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _SpecGlossMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _TerrainHolesTexture:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- unity_Lightmaps:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- unity_LightmapsInd:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- unity_ShadowMasks:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
m_Ints: []
|
||||
m_Floats:
|
||||
- _AddPrecomputedVelocity: 0
|
||||
- _AlphaClip: 0
|
||||
- _AlphaToMask: 0
|
||||
- _Blend: 0
|
||||
- _BlendModePreserveSpecular: 1
|
||||
- _BumpScale: 1
|
||||
- _ClearCoatMask: 0
|
||||
- _ClearCoatSmoothness: 0
|
||||
- _Cull: 2
|
||||
- _Cutoff: 0.5
|
||||
- _DetailAlbedoMapScale: 1
|
||||
- _DetailNormalMapScale: 1
|
||||
- _DstBlend: 0
|
||||
- _DstBlendAlpha: 0
|
||||
- _EnvironmentReflections: 0
|
||||
- _GlossMapScale: 0
|
||||
- _Glossiness: 0
|
||||
- _GlossyReflections: 0
|
||||
- _Metallic: 0.1
|
||||
- _Mode: 0
|
||||
- _OcclusionStrength: 1
|
||||
- _Parallax: 0.005
|
||||
- _QueueOffset: 0
|
||||
- _ReceiveShadows: 1
|
||||
- _Smoothness: 0
|
||||
- _SmoothnessTextureChannel: 0
|
||||
- _SpecularHighlights: 1
|
||||
- _SrcBlend: 1
|
||||
- _SrcBlendAlpha: 1
|
||||
- _Surface: 0
|
||||
- _UVSec: 0
|
||||
- _WorkflowMode: 1
|
||||
- _ZWrite: 1
|
||||
m_Colors:
|
||||
- _BaseColor: {r: 0.2641509, g: 0.2641509, b: 0.2641509, a: 1}
|
||||
- _Color: {r: 0.26415086, g: 0.26415086, b: 0.26415086, a: 1}
|
||||
- _EmissionColor: {r: 0, g: 0, b: 0, a: 1}
|
||||
- _SpecColor: {r: 0.19999996, g: 0.19999996, b: 0.19999996, a: 1}
|
||||
m_BuildTextureStacks: []
|
||||
m_AllowLocking: 1
|
||||
@@ -0,0 +1,15 @@
|
||||
fileFormatVersion: 2
|
||||
guid: a108ce5805859d6489998f2c29fe2a0b
|
||||
NativeFormatImporter:
|
||||
externalObjects: {}
|
||||
mainObjectFileID: 2100000
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
AssetOrigin:
|
||||
serializedVersion: 1
|
||||
productId: 40995
|
||||
packageName: Game Kit Controller - Shooter Melee Adventure Creator 3D + 2.5D
|
||||
packageVersion: 3.77g
|
||||
assetPath: Assets/Game Kit Controller/Integrations/Physic Cables/Materials/CableConnectorMaterial.mat
|
||||
uploadId: 814740
|
||||
@@ -0,0 +1,145 @@
|
||||
%YAML 1.1
|
||||
%TAG !u! tag:unity3d.com,2011:
|
||||
--- !u!114 &-8286635030667259856
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 11
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 0}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: d0353a89b1f911e48b9e16bdc9f2e058, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
version: 10
|
||||
--- !u!21 &2100000
|
||||
Material:
|
||||
serializedVersion: 8
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_Name: CableMainMaterial
|
||||
m_Shader: {fileID: 4800000, guid: 933532a4fcc9baf4fa0491de14d08ed7, type: 3}
|
||||
m_Parent: {fileID: 0}
|
||||
m_ModifiedSerializedProperties: 0
|
||||
m_ValidKeywords:
|
||||
- _ENVIRONMENTREFLECTIONS_OFF
|
||||
- _SMOOTHNESS_TEXTURE_ALBEDO_CHANNEL_A
|
||||
m_InvalidKeywords:
|
||||
- _GLOSSYREFLECTIONS_OFF
|
||||
m_LightmapFlags: 4
|
||||
m_EnableInstancingVariants: 0
|
||||
m_DoubleSidedGI: 0
|
||||
m_CustomRenderQueue: -1
|
||||
stringTagMap:
|
||||
RenderType: Opaque
|
||||
disabledShaderPasses:
|
||||
- MOTIONVECTORS
|
||||
m_LockedProperties:
|
||||
m_SavedProperties:
|
||||
serializedVersion: 3
|
||||
m_TexEnvs:
|
||||
- _BaseMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _BumpMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _DetailAlbedoMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _DetailMask:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _DetailNormalMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _EmissionMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _MainTex:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _MetallicGlossMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _OcclusionMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _ParallaxMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _SpecGlossMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _TerrainHolesTexture:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- unity_Lightmaps:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- unity_LightmapsInd:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- unity_ShadowMasks:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
m_Ints: []
|
||||
m_Floats:
|
||||
- _AddPrecomputedVelocity: 0
|
||||
- _AlphaClip: 0
|
||||
- _AlphaToMask: 0
|
||||
- _Blend: 0
|
||||
- _BlendModePreserveSpecular: 1
|
||||
- _BumpScale: 1
|
||||
- _ClearCoatMask: 0
|
||||
- _ClearCoatSmoothness: 0
|
||||
- _Cull: 2
|
||||
- _Cutoff: 0.499
|
||||
- _DetailAlbedoMapScale: 1
|
||||
- _DetailNormalMapScale: 1
|
||||
- _DstBlend: 0
|
||||
- _DstBlendAlpha: 0
|
||||
- _EnvironmentReflections: 0
|
||||
- _GlossMapScale: 0
|
||||
- _Glossiness: 0
|
||||
- _GlossyReflections: 0
|
||||
- _Metallic: 0
|
||||
- _Mode: 0
|
||||
- _OcclusionStrength: 1
|
||||
- _Parallax: 0.005
|
||||
- _QueueOffset: 0
|
||||
- _ReceiveShadows: 1
|
||||
- _Smoothness: 0
|
||||
- _SmoothnessTextureChannel: 1
|
||||
- _SpecularHighlights: 1
|
||||
- _SrcBlend: 1
|
||||
- _SrcBlendAlpha: 1
|
||||
- _Surface: 0
|
||||
- _UVSec: 0
|
||||
- _WorkflowMode: 1
|
||||
- _ZWrite: 1
|
||||
m_Colors:
|
||||
- _BaseColor: {r: 0.31132075, g: 0.31132075, b: 0.31132075, a: 1}
|
||||
- _Color: {r: 0.31132072, g: 0.31132072, b: 0.31132072, a: 1}
|
||||
- _EmissionColor: {r: 0, g: 0, b: 0, a: 1}
|
||||
- _SpecColor: {r: 0.11320752, g: 0.11320752, b: 0.11320752, a: 1}
|
||||
m_BuildTextureStacks: []
|
||||
m_AllowLocking: 1
|
||||
@@ -0,0 +1,15 @@
|
||||
fileFormatVersion: 2
|
||||
guid: c8622eef919c0fe43a986c7e1869984d
|
||||
NativeFormatImporter:
|
||||
externalObjects: {}
|
||||
mainObjectFileID: 2100000
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
AssetOrigin:
|
||||
serializedVersion: 1
|
||||
productId: 40995
|
||||
packageName: Game Kit Controller - Shooter Melee Adventure Creator 3D + 2.5D
|
||||
packageVersion: 3.77g
|
||||
assetPath: Assets/Game Kit Controller/Integrations/Physic Cables/Materials/CableMainMaterial.mat
|
||||
uploadId: 814740
|
||||
@@ -0,0 +1,138 @@
|
||||
%YAML 1.1
|
||||
%TAG !u! tag:unity3d.com,2011:
|
||||
--- !u!21 &2100000
|
||||
Material:
|
||||
serializedVersion: 8
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_Name: CablePinsMaterial
|
||||
m_Shader: {fileID: 4800000, guid: 933532a4fcc9baf4fa0491de14d08ed7, type: 3}
|
||||
m_Parent: {fileID: 0}
|
||||
m_ModifiedSerializedProperties: 0
|
||||
m_ValidKeywords: []
|
||||
m_InvalidKeywords: []
|
||||
m_LightmapFlags: 4
|
||||
m_EnableInstancingVariants: 0
|
||||
m_DoubleSidedGI: 0
|
||||
m_CustomRenderQueue: -1
|
||||
stringTagMap:
|
||||
RenderType: Opaque
|
||||
disabledShaderPasses:
|
||||
- MOTIONVECTORS
|
||||
m_LockedProperties:
|
||||
m_SavedProperties:
|
||||
serializedVersion: 3
|
||||
m_TexEnvs:
|
||||
- _BaseMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _BumpMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _DetailAlbedoMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _DetailMask:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _DetailNormalMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _EmissionMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _MainTex:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _MetallicGlossMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _OcclusionMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _ParallaxMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- _SpecGlossMap:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- unity_Lightmaps:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- unity_LightmapsInd:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
- unity_ShadowMasks:
|
||||
m_Texture: {fileID: 0}
|
||||
m_Scale: {x: 1, y: 1}
|
||||
m_Offset: {x: 0, y: 0}
|
||||
m_Ints: []
|
||||
m_Floats:
|
||||
- _AddPrecomputedVelocity: 0
|
||||
- _AlphaClip: 0
|
||||
- _AlphaToMask: 0
|
||||
- _Blend: 0
|
||||
- _BlendModePreserveSpecular: 1
|
||||
- _BumpScale: 1
|
||||
- _ClearCoatMask: 0
|
||||
- _ClearCoatSmoothness: 0
|
||||
- _Cull: 2
|
||||
- _Cutoff: 0.5
|
||||
- _DetailAlbedoMapScale: 1
|
||||
- _DetailNormalMapScale: 1
|
||||
- _DstBlend: 0
|
||||
- _DstBlendAlpha: 0
|
||||
- _EnvironmentReflections: 1
|
||||
- _GlossMapScale: 1
|
||||
- _Glossiness: 0.5
|
||||
- _GlossyReflections: 1
|
||||
- _Metallic: 0
|
||||
- _Mode: 0
|
||||
- _OcclusionStrength: 1
|
||||
- _Parallax: 0.02
|
||||
- _QueueOffset: 0
|
||||
- _ReceiveShadows: 1
|
||||
- _Smoothness: 0.5
|
||||
- _SmoothnessTextureChannel: 0
|
||||
- _SpecularHighlights: 1
|
||||
- _SrcBlend: 1
|
||||
- _SrcBlendAlpha: 1
|
||||
- _Surface: 0
|
||||
- _UVSec: 0
|
||||
- _WorkflowMode: 1
|
||||
- _ZWrite: 1
|
||||
m_Colors:
|
||||
- _BaseColor: {r: 1, g: 0.8847848, b: 0, a: 1}
|
||||
- _Color: {r: 1, g: 0.8847848, b: 0, a: 1}
|
||||
- _EmissionColor: {r: 0, g: 0, b: 0, a: 1}
|
||||
- _SpecColor: {r: 0.19999996, g: 0.19999996, b: 0.19999996, a: 1}
|
||||
m_BuildTextureStacks: []
|
||||
m_AllowLocking: 1
|
||||
--- !u!114 &4835520577995526649
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 11
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 0}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: d0353a89b1f911e48b9e16bdc9f2e058, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
version: 10
|
||||
@@ -0,0 +1,15 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 27c68346d1596ed45b0aa847634eccf5
|
||||
NativeFormatImporter:
|
||||
externalObjects: {}
|
||||
mainObjectFileID: 2100000
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
AssetOrigin:
|
||||
serializedVersion: 1
|
||||
productId: 40995
|
||||
packageName: Game Kit Controller - Shooter Melee Adventure Creator 3D + 2.5D
|
||||
packageVersion: 3.77g
|
||||
assetPath: Assets/Game Kit Controller/Integrations/Physic Cables/Materials/CablePinsMaterial.mat
|
||||
uploadId: 814740
|
||||
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 9c8635c90d1a5a241b3bbe19905d80d8
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
BIN
Assets/Game Kit Controller/Integrations/Physic Cables/Models/famale.fbx
LFS
Normal file
BIN
Assets/Game Kit Controller/Integrations/Physic Cables/Models/famale.fbx
LFS
Normal file
Binary file not shown.
@@ -0,0 +1,113 @@
|
||||
fileFormatVersion: 2
|
||||
guid: ecb2163229c2cd942b171f583d807064
|
||||
ModelImporter:
|
||||
serializedVersion: 21300
|
||||
internalIDToNameTable: []
|
||||
externalObjects: {}
|
||||
materials:
|
||||
materialImportMode: 2
|
||||
materialName: 0
|
||||
materialSearch: 1
|
||||
materialLocation: 1
|
||||
animations:
|
||||
legacyGenerateAnimations: 4
|
||||
bakeSimulation: 0
|
||||
resampleCurves: 1
|
||||
optimizeGameObjects: 0
|
||||
removeConstantScaleCurves: 1
|
||||
motionNodeName:
|
||||
rigImportErrors:
|
||||
rigImportWarnings:
|
||||
animationImportErrors:
|
||||
animationImportWarnings:
|
||||
animationRetargetingWarnings:
|
||||
animationDoRetargetingWarnings: 0
|
||||
importAnimatedCustomProperties: 0
|
||||
importConstraints: 0
|
||||
animationCompression: 1
|
||||
animationRotationError: 0.5
|
||||
animationPositionError: 0.5
|
||||
animationScaleError: 0.5
|
||||
animationWrapMode: 0
|
||||
extraExposedTransformPaths: []
|
||||
extraUserProperties: []
|
||||
clipAnimations: []
|
||||
isReadable: 0
|
||||
meshes:
|
||||
lODScreenPercentages: []
|
||||
globalScale: 1
|
||||
meshCompression: 0
|
||||
addColliders: 0
|
||||
useSRGBMaterialColor: 1
|
||||
sortHierarchyByName: 1
|
||||
importVisibility: 1
|
||||
importBlendShapes: 1
|
||||
importCameras: 1
|
||||
importLights: 1
|
||||
nodeNameCollisionStrategy: 1
|
||||
fileIdsGeneration: 2
|
||||
swapUVChannels: 0
|
||||
generateSecondaryUV: 0
|
||||
useFileUnits: 1
|
||||
keepQuads: 0
|
||||
weldVertices: 1
|
||||
bakeAxisConversion: 0
|
||||
preserveHierarchy: 0
|
||||
skinWeightsMode: 0
|
||||
maxBonesPerVertex: 4
|
||||
minBoneWeight: 0.001
|
||||
optimizeBones: 1
|
||||
meshOptimizationFlags: -1
|
||||
indexFormat: 0
|
||||
secondaryUVAngleDistortion: 8
|
||||
secondaryUVAreaDistortion: 15.000001
|
||||
secondaryUVHardAngle: 88
|
||||
secondaryUVMarginMethod: 1
|
||||
secondaryUVMinLightmapResolution: 40
|
||||
secondaryUVMinObjectScale: 1
|
||||
secondaryUVPackMargin: 4
|
||||
useFileScale: 1
|
||||
tangentSpace:
|
||||
normalSmoothAngle: 60
|
||||
normalImportMode: 0
|
||||
tangentImportMode: 3
|
||||
normalCalculationMode: 4
|
||||
legacyComputeAllNormalsFromSmoothingGroupsWhenMeshHasBlendShapes: 0
|
||||
blendShapeNormalImportMode: 1
|
||||
normalSmoothingSource: 0
|
||||
referencedClips: []
|
||||
importAnimation: 1
|
||||
humanDescription:
|
||||
serializedVersion: 3
|
||||
human: []
|
||||
skeleton: []
|
||||
armTwist: 0.5
|
||||
foreArmTwist: 0.5
|
||||
upperLegTwist: 0.5
|
||||
legTwist: 0.5
|
||||
armStretch: 0.05
|
||||
legStretch: 0.05
|
||||
feetSpacing: 0
|
||||
globalScale: 1
|
||||
rootMotionBoneName:
|
||||
hasTranslationDoF: 0
|
||||
hasExtraRoot: 0
|
||||
skeletonHasParents: 1
|
||||
lastHumanDescriptionAvatarSource: {instanceID: 0}
|
||||
autoGenerateAvatarMappingIfUnspecified: 1
|
||||
animationType: 2
|
||||
humanoidOversampling: 1
|
||||
avatarSetup: 0
|
||||
addHumanoidExtraRootOnlyWhenUsingAvatar: 1
|
||||
remapMaterialsIfMaterialImportModeIsNone: 0
|
||||
additionalBone: 0
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
AssetOrigin:
|
||||
serializedVersion: 1
|
||||
productId: 40995
|
||||
packageName: Game Kit Controller - Shooter Melee Adventure Creator 3D + 2.5D
|
||||
packageVersion: 3.77g
|
||||
assetPath: Assets/Game Kit Controller/Integrations/Physic Cables/Models/famale.fbx
|
||||
uploadId: 814740
|
||||
BIN
Assets/Game Kit Controller/Integrations/Physic Cables/Models/male.fbx
LFS
Normal file
BIN
Assets/Game Kit Controller/Integrations/Physic Cables/Models/male.fbx
LFS
Normal file
Binary file not shown.
@@ -0,0 +1,113 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 1e0f46d67423a8044bb95d9efdf1f633
|
||||
ModelImporter:
|
||||
serializedVersion: 21300
|
||||
internalIDToNameTable: []
|
||||
externalObjects: {}
|
||||
materials:
|
||||
materialImportMode: 2
|
||||
materialName: 0
|
||||
materialSearch: 1
|
||||
materialLocation: 1
|
||||
animations:
|
||||
legacyGenerateAnimations: 4
|
||||
bakeSimulation: 0
|
||||
resampleCurves: 1
|
||||
optimizeGameObjects: 0
|
||||
removeConstantScaleCurves: 1
|
||||
motionNodeName:
|
||||
rigImportErrors:
|
||||
rigImportWarnings:
|
||||
animationImportErrors:
|
||||
animationImportWarnings:
|
||||
animationRetargetingWarnings:
|
||||
animationDoRetargetingWarnings: 0
|
||||
importAnimatedCustomProperties: 0
|
||||
importConstraints: 0
|
||||
animationCompression: 1
|
||||
animationRotationError: 0.5
|
||||
animationPositionError: 0.5
|
||||
animationScaleError: 0.5
|
||||
animationWrapMode: 0
|
||||
extraExposedTransformPaths: []
|
||||
extraUserProperties: []
|
||||
clipAnimations: []
|
||||
isReadable: 0
|
||||
meshes:
|
||||
lODScreenPercentages: []
|
||||
globalScale: 1
|
||||
meshCompression: 0
|
||||
addColliders: 0
|
||||
useSRGBMaterialColor: 1
|
||||
sortHierarchyByName: 1
|
||||
importVisibility: 1
|
||||
importBlendShapes: 1
|
||||
importCameras: 1
|
||||
importLights: 1
|
||||
nodeNameCollisionStrategy: 1
|
||||
fileIdsGeneration: 2
|
||||
swapUVChannels: 0
|
||||
generateSecondaryUV: 0
|
||||
useFileUnits: 1
|
||||
keepQuads: 0
|
||||
weldVertices: 1
|
||||
bakeAxisConversion: 0
|
||||
preserveHierarchy: 0
|
||||
skinWeightsMode: 0
|
||||
maxBonesPerVertex: 4
|
||||
minBoneWeight: 0.001
|
||||
optimizeBones: 1
|
||||
meshOptimizationFlags: -1
|
||||
indexFormat: 0
|
||||
secondaryUVAngleDistortion: 8
|
||||
secondaryUVAreaDistortion: 15.000001
|
||||
secondaryUVHardAngle: 88
|
||||
secondaryUVMarginMethod: 1
|
||||
secondaryUVMinLightmapResolution: 40
|
||||
secondaryUVMinObjectScale: 1
|
||||
secondaryUVPackMargin: 4
|
||||
useFileScale: 1
|
||||
tangentSpace:
|
||||
normalSmoothAngle: 60
|
||||
normalImportMode: 0
|
||||
tangentImportMode: 3
|
||||
normalCalculationMode: 4
|
||||
legacyComputeAllNormalsFromSmoothingGroupsWhenMeshHasBlendShapes: 0
|
||||
blendShapeNormalImportMode: 1
|
||||
normalSmoothingSource: 0
|
||||
referencedClips: []
|
||||
importAnimation: 1
|
||||
humanDescription:
|
||||
serializedVersion: 3
|
||||
human: []
|
||||
skeleton: []
|
||||
armTwist: 0.5
|
||||
foreArmTwist: 0.5
|
||||
upperLegTwist: 0.5
|
||||
legTwist: 0.5
|
||||
armStretch: 0.05
|
||||
legStretch: 0.05
|
||||
feetSpacing: 0
|
||||
globalScale: 1
|
||||
rootMotionBoneName:
|
||||
hasTranslationDoF: 0
|
||||
hasExtraRoot: 0
|
||||
skeletonHasParents: 1
|
||||
lastHumanDescriptionAvatarSource: {instanceID: 0}
|
||||
autoGenerateAvatarMappingIfUnspecified: 1
|
||||
animationType: 2
|
||||
humanoidOversampling: 1
|
||||
avatarSetup: 0
|
||||
addHumanoidExtraRootOnlyWhenUsingAvatar: 1
|
||||
remapMaterialsIfMaterialImportModeIsNone: 0
|
||||
additionalBone: 0
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
AssetOrigin:
|
||||
serializedVersion: 1
|
||||
productId: 40995
|
||||
packageName: Game Kit Controller - Shooter Melee Adventure Creator 3D + 2.5D
|
||||
packageVersion: 3.77g
|
||||
assetPath: Assets/Game Kit Controller/Integrations/Physic Cables/Models/male.fbx
|
||||
uploadId: 814740
|
||||
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: ba2869732a2eac747800398dbf00e369
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 6b878fc9d784fbe438680ddb9cdf8cd8
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
Binary file not shown.
@@ -0,0 +1,14 @@
|
||||
fileFormatVersion: 2
|
||||
guid: f14595a1b104ad34f80d16428fd4469a
|
||||
PrefabImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
AssetOrigin:
|
||||
serializedVersion: 1
|
||||
productId: 40995
|
||||
packageName: Game Kit Controller - Shooter Melee Adventure Creator 3D + 2.5D
|
||||
packageVersion: 3.77g
|
||||
assetPath: Assets/Game Kit Controller/Integrations/Physic Cables/Prefabs/Base/CableConnectParticleSystem.prefab
|
||||
uploadId: 814740
|
||||
Binary file not shown.
@@ -0,0 +1,14 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 5ec67d8807350db46a3a2b3c0aa93b2d
|
||||
PrefabImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
AssetOrigin:
|
||||
serializedVersion: 1
|
||||
productId: 40995
|
||||
packageName: Game Kit Controller - Shooter Melee Adventure Creator 3D + 2.5D
|
||||
packageVersion: 3.77g
|
||||
assetPath: Assets/Game Kit Controller/Integrations/Physic Cables/Prefabs/Base/CableContactFamale.prefab
|
||||
uploadId: 814740
|
||||
Binary file not shown.
@@ -0,0 +1,14 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 620b9596c45af7d459cd03cf3528ad57
|
||||
PrefabImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
AssetOrigin:
|
||||
serializedVersion: 1
|
||||
productId: 40995
|
||||
packageName: Game Kit Controller - Shooter Melee Adventure Creator 3D + 2.5D
|
||||
packageVersion: 3.77g
|
||||
assetPath: Assets/Game Kit Controller/Integrations/Physic Cables/Prefabs/Base/CableContactMale.prefab
|
||||
uploadId: 814740
|
||||
Binary file not shown.
@@ -0,0 +1,14 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 29e68962e221f9b45aacdfcabbbb717d
|
||||
PrefabImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
AssetOrigin:
|
||||
serializedVersion: 1
|
||||
productId: 40995
|
||||
packageName: Game Kit Controller - Shooter Melee Adventure Creator 3D + 2.5D
|
||||
packageVersion: 3.77g
|
||||
assetPath: Assets/Game Kit Controller/Integrations/Physic Cables/Prefabs/CableContactFemale.prefab
|
||||
uploadId: 814740
|
||||
Binary file not shown.
@@ -0,0 +1,14 @@
|
||||
fileFormatVersion: 2
|
||||
guid: c28fd434fef751b4e9cdd9ee4f9aea8f
|
||||
PrefabImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
AssetOrigin:
|
||||
serializedVersion: 1
|
||||
productId: 40995
|
||||
packageName: Game Kit Controller - Shooter Melee Adventure Creator 3D + 2.5D
|
||||
packageVersion: 3.77g
|
||||
assetPath: Assets/Game Kit Controller/Integrations/Physic Cables/Prefabs/PhysicCableFF.prefab
|
||||
uploadId: 814740
|
||||
Binary file not shown.
@@ -0,0 +1,14 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 34b8c2a25945c58408a1875d782c611d
|
||||
PrefabImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
AssetOrigin:
|
||||
serializedVersion: 1
|
||||
productId: 40995
|
||||
packageName: Game Kit Controller - Shooter Melee Adventure Creator 3D + 2.5D
|
||||
packageVersion: 3.77g
|
||||
assetPath: Assets/Game Kit Controller/Integrations/Physic Cables/Prefabs/PhysicCableMF.prefab
|
||||
uploadId: 814740
|
||||
Binary file not shown.
@@ -0,0 +1,14 @@
|
||||
fileFormatVersion: 2
|
||||
guid: f786ade4c966e6949b63640d6856d568
|
||||
PrefabImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
AssetOrigin:
|
||||
serializedVersion: 1
|
||||
productId: 40995
|
||||
packageName: Game Kit Controller - Shooter Melee Adventure Creator 3D + 2.5D
|
||||
packageVersion: 3.77g
|
||||
assetPath: Assets/Game Kit Controller/Integrations/Physic Cables/Prefabs/PhysicCableMM.prefab
|
||||
uploadId: 814740
|
||||
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 36a8b1c97ff41e3478f643577b68f9f8
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,129 @@
|
||||
using System.Collections;
|
||||
using UnityEngine;
|
||||
|
||||
namespace HPhysic
|
||||
{
|
||||
[RequireComponent (typeof (Rigidbody))]
|
||||
public class Connector : MonoBehaviour
|
||||
{
|
||||
public ConType ConnectionType { get; private set; } = ConType.Male;
|
||||
|
||||
[SerializeField] private bool makeConnectionKinematic = false;
|
||||
private bool _wasConnectionKinematic;
|
||||
|
||||
[SerializeField] private bool hideInteractableWhenIsConnected = false;
|
||||
|
||||
[field: SerializeField] public Connector ConnectedTo { get; private set; }
|
||||
|
||||
|
||||
[Header ("Object to set")]
|
||||
public Transform connectionPoint;
|
||||
|
||||
|
||||
private FixedJoint _fixedJoint;
|
||||
public Rigidbody Rigidbody { get; private set; }
|
||||
|
||||
public Vector3 ConnectionPosition => connectionPoint ? connectionPoint.position : transform.position;
|
||||
public Quaternion ConnectionRotation => connectionPoint ? connectionPoint.rotation : transform.rotation;
|
||||
public Quaternion RotationOffset => connectionPoint ? connectionPoint.localRotation : Quaternion.Euler (Vector3.zero);
|
||||
public Vector3 ConnectedOutOffset => connectionPoint ? connectionPoint.right : transform.right;
|
||||
|
||||
public bool IsConnected => ConnectedTo != null;
|
||||
|
||||
public enum ConType { Male, Female }
|
||||
|
||||
private void Awake ()
|
||||
{
|
||||
Rigidbody = gameObject.GetComponent<Rigidbody> ();
|
||||
}
|
||||
|
||||
private void Start ()
|
||||
{
|
||||
if (ConnectedTo != null) {
|
||||
Connector t = ConnectedTo;
|
||||
ConnectedTo = null;
|
||||
Connect (t);
|
||||
}
|
||||
}
|
||||
|
||||
private void OnDisable () => Disconnect ();
|
||||
|
||||
public void SetAsConnectedTo (Connector secondConnector)
|
||||
{
|
||||
ConnectedTo = secondConnector;
|
||||
|
||||
_wasConnectionKinematic = secondConnector.Rigidbody.isKinematic;
|
||||
|
||||
UpdateInteractableWhenIsConnected ();
|
||||
}
|
||||
|
||||
public void Connect (Connector secondConnector)
|
||||
{
|
||||
if (secondConnector == null) {
|
||||
Debug.LogWarning ("Attempt to connect null");
|
||||
return;
|
||||
}
|
||||
|
||||
if (IsConnected) {
|
||||
Disconnect (secondConnector);
|
||||
}
|
||||
|
||||
secondConnector.transform.rotation = ConnectionRotation * secondConnector.RotationOffset;
|
||||
secondConnector.transform.position = ConnectionPosition - (secondConnector.ConnectionPosition - secondConnector.transform.position);
|
||||
|
||||
_fixedJoint = gameObject.AddComponent<FixedJoint> ();
|
||||
|
||||
_fixedJoint.connectedBody = secondConnector.Rigidbody;
|
||||
|
||||
secondConnector.SetAsConnectedTo (this);
|
||||
|
||||
_wasConnectionKinematic = secondConnector.Rigidbody.isKinematic;
|
||||
|
||||
if (makeConnectionKinematic) {
|
||||
secondConnector.Rigidbody.isKinematic = true;
|
||||
}
|
||||
|
||||
ConnectedTo = secondConnector;
|
||||
|
||||
// disable outline on select
|
||||
UpdateInteractableWhenIsConnected ();
|
||||
}
|
||||
|
||||
public void Disconnect (Connector onlyThis = null)
|
||||
{
|
||||
if (ConnectedTo == null || onlyThis != null && onlyThis != ConnectedTo) {
|
||||
return;
|
||||
}
|
||||
|
||||
Destroy (_fixedJoint);
|
||||
|
||||
// important to dont make recusrion
|
||||
Connector toDisconect = ConnectedTo;
|
||||
|
||||
ConnectedTo = null;
|
||||
|
||||
if (makeConnectionKinematic) {
|
||||
toDisconect.Rigidbody.isKinematic = _wasConnectionKinematic;
|
||||
}
|
||||
|
||||
toDisconect.Disconnect (this);
|
||||
|
||||
// enable outline on select
|
||||
UpdateInteractableWhenIsConnected ();
|
||||
}
|
||||
|
||||
private void UpdateInteractableWhenIsConnected ()
|
||||
{
|
||||
if (hideInteractableWhenIsConnected) {
|
||||
if (TryGetComponent (out Collider collider)) {
|
||||
collider.enabled = !IsConnected;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public bool CanConnect (Connector secondConnector) =>
|
||||
this != secondConnector
|
||||
&& !this.IsConnected && !secondConnector.IsConnected
|
||||
&& this.ConnectionType != secondConnector.ConnectionType;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,18 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 890cf3fa6d7260842a21ef8f5fb2f85a
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
AssetOrigin:
|
||||
serializedVersion: 1
|
||||
productId: 40995
|
||||
packageName: Game Kit Controller - Shooter Melee Adventure Creator 3D + 2.5D
|
||||
packageVersion: 3.77g
|
||||
assetPath: Assets/Game Kit Controller/Integrations/Physic Cables/Scripts/Connector.cs
|
||||
uploadId: 814740
|
||||
@@ -0,0 +1,7 @@
|
||||
namespace HInteractions
|
||||
{
|
||||
public interface IObjectHolder
|
||||
{
|
||||
Interactable SelectedObject { get; }
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,18 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 68631ca83c20f134c8c58fe11017b845
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
AssetOrigin:
|
||||
serializedVersion: 1
|
||||
productId: 40995
|
||||
packageName: Game Kit Controller - Shooter Melee Adventure Creator 3D + 2.5D
|
||||
packageVersion: 3.77g
|
||||
assetPath: Assets/Game Kit Controller/Integrations/Physic Cables/Scripts/IObjectHolder.cs
|
||||
uploadId: 814740
|
||||
@@ -0,0 +1,27 @@
|
||||
using UnityEngine;
|
||||
|
||||
namespace HInteractions
|
||||
{
|
||||
[DisallowMultipleComponent]
|
||||
public class Interactable : MonoBehaviour
|
||||
{
|
||||
public bool ShowPointerOnInterract { get; private set; } = true;
|
||||
|
||||
public bool IsSelected { get; private set; }
|
||||
|
||||
protected virtual void Awake ()
|
||||
{
|
||||
Deselect ();
|
||||
}
|
||||
|
||||
public virtual void Select ()
|
||||
{
|
||||
IsSelected = true;
|
||||
}
|
||||
|
||||
public virtual void Deselect ()
|
||||
{
|
||||
IsSelected = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,18 @@
|
||||
fileFormatVersion: 2
|
||||
guid: f85334871a376e74dac58628d938cba0
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
AssetOrigin:
|
||||
serializedVersion: 1
|
||||
productId: 40995
|
||||
packageName: Game Kit Controller - Shooter Melee Adventure Creator 3D + 2.5D
|
||||
packageVersion: 3.77g
|
||||
assetPath: Assets/Game Kit Controller/Integrations/Physic Cables/Scripts/Interactable.cs
|
||||
uploadId: 814740
|
||||
@@ -0,0 +1,59 @@
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
|
||||
namespace HInteractions
|
||||
{
|
||||
[RequireComponent (typeof (Rigidbody))]
|
||||
public class Liftable : Interactable
|
||||
{
|
||||
[field: SerializeField] public bool IsLift { get; private set; } = false;
|
||||
[field: SerializeField] public Vector3 LiftDirectionOffset { get; private set; } = Vector3.zero;
|
||||
|
||||
public Rigidbody Rigidbody { get; protected set; }
|
||||
public IObjectHolder ObjectHolder { get; protected set; }
|
||||
|
||||
private readonly List<(GameObject obj, int defaultLayer)> _defaultLayers = new List<(GameObject obj, int defaultLayer)> ();
|
||||
|
||||
protected override void Awake ()
|
||||
{
|
||||
base.Awake ();
|
||||
|
||||
Rigidbody = GetComponent<Rigidbody> ();
|
||||
}
|
||||
|
||||
public virtual void PickUp (IObjectHolder holder, int layer)
|
||||
{
|
||||
if (IsLift)
|
||||
return;
|
||||
|
||||
ObjectHolder = holder;
|
||||
|
||||
// save layers
|
||||
_defaultLayers.Clear ();
|
||||
foreach (Collider col in gameObject.GetComponentsInChildren<Collider> ())
|
||||
_defaultLayers.Add ((col.gameObject, col.gameObject.layer));
|
||||
|
||||
// set
|
||||
Rigidbody.useGravity = false;
|
||||
Rigidbody.interpolation = RigidbodyInterpolation.Interpolate;
|
||||
foreach ((GameObject obj, int defaultLayer) item in _defaultLayers)
|
||||
item.obj.layer = layer;
|
||||
|
||||
IsLift = true;
|
||||
}
|
||||
public virtual void Drop ()
|
||||
{
|
||||
if (!IsLift)
|
||||
return;
|
||||
|
||||
ObjectHolder = null;
|
||||
|
||||
Rigidbody.useGravity = true;
|
||||
Rigidbody.interpolation = RigidbodyInterpolation.None;
|
||||
foreach ((GameObject obj, int defaultLayer) item in _defaultLayers)
|
||||
item.obj.layer = item.defaultLayer;
|
||||
|
||||
IsLift = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,18 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 9ef0207d4aaff9d4caff8b520d1bd121
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
AssetOrigin:
|
||||
serializedVersion: 1
|
||||
productId: 40995
|
||||
packageName: Game Kit Controller - Shooter Melee Adventure Creator 3D + 2.5D
|
||||
packageVersion: 3.77g
|
||||
assetPath: Assets/Game Kit Controller/Integrations/Physic Cables/Scripts/Liftable.cs
|
||||
uploadId: 814740
|
||||
@@ -0,0 +1,613 @@
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
using UnityEngine.Events;
|
||||
|
||||
namespace HPhysic
|
||||
{
|
||||
public class PhysicCable : MonoBehaviour
|
||||
{
|
||||
[Header ("Main Settings")]
|
||||
[Space]
|
||||
|
||||
[SerializeField] private int numberOfPoints = 3;
|
||||
[SerializeField] private float space = 0.3f;
|
||||
[SerializeField] private float size = 0.3f;
|
||||
|
||||
[Space]
|
||||
[Header ("Physics Settings")]
|
||||
[Space]
|
||||
|
||||
[SerializeField] private float springForce = 200;
|
||||
public float dragValueOnCablePieces = 0;
|
||||
public float damperOnCablePieces = 0.2f;
|
||||
|
||||
public float cablePointMass = 0.1f;
|
||||
public float cableExtremesMass = 1;
|
||||
|
||||
[Space]
|
||||
[Header ("Break Settings")]
|
||||
[Space]
|
||||
|
||||
public bool cableBreakEnabled = true;
|
||||
public bool cableCanBreakOnlyIfConnected = true;
|
||||
public float minTimeToBreak = 1;
|
||||
|
||||
public bool canBeBrokenExternallyEnabled = true;
|
||||
|
||||
[Space]
|
||||
[Header ("Disconnect Cable Elements")]
|
||||
[Space]
|
||||
|
||||
public bool disconnectCableWhenLongEnoughEnabled = true;
|
||||
[SerializeField] private float brakeLengthMultiplier = 2f;
|
||||
[SerializeField] private float minBrakeTime = 1f;
|
||||
|
||||
[Space]
|
||||
[Header ("Cable Elements")]
|
||||
[Space]
|
||||
|
||||
public GameObject start;
|
||||
public GameObject end;
|
||||
public GameObject connector0;
|
||||
public GameObject point0;
|
||||
|
||||
[Space]
|
||||
[Header ("Debug")]
|
||||
[Space]
|
||||
|
||||
public bool isConnected;
|
||||
|
||||
public bool cableBroken;
|
||||
|
||||
public float cableLength;
|
||||
|
||||
public bool startConnected;
|
||||
|
||||
public bool endConnected;
|
||||
|
||||
[Space]
|
||||
|
||||
public List<int> brokenPointsIndex = new List<int> ();
|
||||
|
||||
public List<Transform> points;
|
||||
public List<Transform> connectors;
|
||||
|
||||
[Space]
|
||||
[Header ("Events Settings")]
|
||||
[Space]
|
||||
|
||||
public UnityEvent eventOnBreak;
|
||||
|
||||
public UnityEvent eventOnBreakFromTension;
|
||||
|
||||
[Space]
|
||||
|
||||
public bool useEventToDisconnectBothPoints;
|
||||
public UnityEvent eventToDisconnectBothPoints;
|
||||
|
||||
|
||||
private const string cloneText = "Part";
|
||||
|
||||
private Connector startConnector;
|
||||
private Connector endConnector;
|
||||
|
||||
private float brakeLength;
|
||||
private float timeToBrake = 1f;
|
||||
|
||||
float timeToBreak = 1;
|
||||
|
||||
public Connector StartConnector => startConnector;
|
||||
public Connector EndConnector => endConnector;
|
||||
public IReadOnlyList<Transform> Points => points;
|
||||
|
||||
|
||||
private void Start ()
|
||||
{
|
||||
startConnector = start.GetComponent<Connector> ();
|
||||
endConnector = end.GetComponent<Connector> ();
|
||||
|
||||
brakeLength = space * numberOfPoints * brakeLengthMultiplier + 2f;
|
||||
|
||||
points = new List<Transform> ();
|
||||
|
||||
connectors = new List<Transform> ();
|
||||
|
||||
points.Add (start.transform);
|
||||
points.Add (point0.transform);
|
||||
|
||||
connectors.Add (connector0.transform);
|
||||
|
||||
for (int i = 1; i < numberOfPoints; i++) {
|
||||
|
||||
Transform conn = GetConnector (i);
|
||||
|
||||
if (conn == null) {
|
||||
Debug.LogWarning ("Dont found connector number " + i);
|
||||
} else {
|
||||
connectors.Add (conn);
|
||||
}
|
||||
|
||||
Transform point = GetPoint (i);
|
||||
|
||||
if (conn == null) {
|
||||
Debug.LogWarning ("Dont found point number " + i);
|
||||
} else {
|
||||
points.Add (point);
|
||||
}
|
||||
}
|
||||
|
||||
Transform endConn = GetConnector (numberOfPoints);
|
||||
|
||||
if (endConn == null) {
|
||||
Debug.LogWarning ("Dont found connector number " + numberOfPoints);
|
||||
} else {
|
||||
connectors.Add (endConn);
|
||||
}
|
||||
|
||||
points.Add (end.transform);
|
||||
}
|
||||
|
||||
private void Update ()
|
||||
{
|
||||
cableLength = 0f;
|
||||
|
||||
isConnected = startConnected || endConnected;
|
||||
|
||||
//startConnector.IsConnected || endConnector.IsConnected;
|
||||
|
||||
int numOfParts = connectors.Count;
|
||||
|
||||
Transform lastPoint = points [0];
|
||||
|
||||
for (int i = 0; i < numOfParts; i++) {
|
||||
bool canCheckPoinResult = true;
|
||||
|
||||
if (cableBroken) {
|
||||
if (brokenPointsIndex.Contains (i + 1)) {
|
||||
canCheckPoinResult = false;
|
||||
}
|
||||
}
|
||||
|
||||
Transform nextPoint = points [i + 1];
|
||||
|
||||
Transform connector = connectors [i].transform;
|
||||
|
||||
connector.position = CountConPos (lastPoint.position, nextPoint.position);
|
||||
|
||||
if (lastPoint.position == nextPoint.position || nextPoint.position == connector.position || !canCheckPoinResult) {
|
||||
connector.localScale = Vector3.zero;
|
||||
|
||||
} else {
|
||||
connector.rotation = Quaternion.LookRotation (nextPoint.position - connector.position);
|
||||
connector.localScale = CountSizeOfCon (lastPoint.position, nextPoint.position);
|
||||
}
|
||||
|
||||
if (isConnected || !cableCanBreakOnlyIfConnected) {
|
||||
cableLength += (lastPoint.position - nextPoint.position).magnitude;
|
||||
}
|
||||
|
||||
lastPoint = nextPoint;
|
||||
}
|
||||
|
||||
if (cableBreakEnabled && !cableBroken) {
|
||||
if (isConnected || !cableCanBreakOnlyIfConnected) {
|
||||
if (cableLength > brakeLength) {
|
||||
timeToBreak -= Time.deltaTime;
|
||||
|
||||
if (timeToBreak < 0f) {
|
||||
|
||||
timeToBreak = minTimeToBreak;
|
||||
|
||||
cableBroken = true;
|
||||
|
||||
eventOnBreakFromTension.Invoke ();
|
||||
|
||||
checkEventOnBreak ();
|
||||
}
|
||||
} else {
|
||||
timeToBreak = minTimeToBreak;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (disconnectCableWhenLongEnoughEnabled) {
|
||||
if (isConnected) {
|
||||
if (cableLength > brakeLength) {
|
||||
timeToBrake -= Time.deltaTime;
|
||||
|
||||
if (timeToBrake < 0f) {
|
||||
//startConnector.Disconnect ();
|
||||
|
||||
//endConnector.Disconnect ();
|
||||
|
||||
timeToBrake = minBrakeTime;
|
||||
|
||||
checkEventToDisconnectBothPoints ();
|
||||
}
|
||||
} else {
|
||||
timeToBrake = minBrakeTime;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public void setStartConnectedState (bool state)
|
||||
{
|
||||
startConnected = state;
|
||||
}
|
||||
|
||||
public void setEndConnectedState (bool state)
|
||||
{
|
||||
endConnected = state;
|
||||
}
|
||||
|
||||
|
||||
public void UpdatePointsFromEditor ()
|
||||
{
|
||||
UpdatePoints ();
|
||||
|
||||
updatValuesFromEditor ();
|
||||
|
||||
updateComponent ();
|
||||
}
|
||||
|
||||
private void UpdatePoints ()
|
||||
{
|
||||
if (!start || !end || !point0 || !connector0) {
|
||||
Debug.LogWarning ("Can't update because one of objects to set is null!");
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
// delete old
|
||||
int length = transform.childCount;
|
||||
|
||||
for (int i = 0; i < length; i++) {
|
||||
if (transform.GetChild (i).name.StartsWith (cloneText)) {
|
||||
|
||||
GKC_Utils.checkUnpackPrefabToDestroyObject (gameObject, transform.GetChild (i).gameObject);
|
||||
|
||||
length--;
|
||||
|
||||
i--;
|
||||
}
|
||||
}
|
||||
|
||||
// set new
|
||||
Vector3 lastPos = start.transform.position;
|
||||
|
||||
Rigidbody lastBody = start.GetComponent<Rigidbody> ();
|
||||
|
||||
for (int i = 0; i < numberOfPoints; i++) {
|
||||
GameObject cConnector = i == 0 ? connector0 : CreateNewCon (i);
|
||||
|
||||
GameObject cPoint = i == 0 ? point0 : CreateNewPoint (i);
|
||||
|
||||
Vector3 newPos = CountNewPointPos (lastPos);
|
||||
|
||||
cPoint.transform.position = newPos;
|
||||
|
||||
cPoint.transform.localScale = Vector3.one * size;
|
||||
|
||||
cPoint.transform.rotation = transform.rotation;
|
||||
|
||||
|
||||
SetSpring (cPoint.GetComponent<SpringJoint> (), lastBody);
|
||||
|
||||
lastBody = cPoint.GetComponent<Rigidbody> ();
|
||||
|
||||
cConnector.transform.position = CountConPos (lastPos, newPos);
|
||||
|
||||
cConnector.transform.localScale = CountSizeOfCon (lastPos, newPos);
|
||||
|
||||
cConnector.transform.rotation = CountRoationOfCon (lastPos, newPos);
|
||||
|
||||
lastPos = newPos;
|
||||
}
|
||||
|
||||
Vector3 endPos = CountNewPointPos (lastPos);
|
||||
|
||||
end.transform.position = endPos;
|
||||
|
||||
SpringJoint lastBodySpringJoint = lastBody.gameObject.AddComponent<SpringJoint> ();
|
||||
|
||||
//if (lastBodySpringJoint == null) {
|
||||
// lastBodySpringJoint = lastBody.gameObject.AddComponent<SpringJoint> ();
|
||||
//}
|
||||
|
||||
SetSpring (lastBodySpringJoint, end.GetComponent<Rigidbody> ());
|
||||
|
||||
GameObject endConnector = CreateNewCon (numberOfPoints);
|
||||
|
||||
endConnector.transform.position = CountConPos (lastPos, endPos);
|
||||
|
||||
endConnector.transform.rotation = CountRoationOfCon (lastPos, endPos);
|
||||
}
|
||||
|
||||
void updatValuesFromEditor ()
|
||||
{
|
||||
Component [] components = GetComponentsInChildren (typeof (Rigidbody));
|
||||
|
||||
foreach (Rigidbody child in components) {
|
||||
child.linearDamping = dragValueOnCablePieces;
|
||||
|
||||
child.mass = cablePointMass;
|
||||
}
|
||||
|
||||
Rigidbody startRigidbody = start.GetComponent<Rigidbody> ();
|
||||
|
||||
if (startRigidbody != null) {
|
||||
startRigidbody.mass = cableExtremesMass;
|
||||
}
|
||||
|
||||
Rigidbody endRigidbody = end.GetComponent<Rigidbody> ();
|
||||
|
||||
if (endRigidbody != null) {
|
||||
endRigidbody.mass = cableExtremesMass;
|
||||
}
|
||||
|
||||
components = GetComponentsInChildren (typeof (SpringJoint));
|
||||
|
||||
foreach (SpringJoint child in components) {
|
||||
child.spring = springForce;
|
||||
|
||||
child.damper = damperOnCablePieces;
|
||||
}
|
||||
|
||||
updateComponent ();
|
||||
}
|
||||
|
||||
Vector3 CountNewPointPos (Vector3 lastPos)
|
||||
{
|
||||
return lastPos + transform.forward * space;
|
||||
}
|
||||
|
||||
public void AddPointFromEditor ()
|
||||
{
|
||||
AddPoint ();
|
||||
|
||||
updateComponent ();
|
||||
}
|
||||
|
||||
private void AddPoint ()
|
||||
{
|
||||
Transform lastprevPoint = GetPoint (numberOfPoints - 1);
|
||||
|
||||
if (lastprevPoint == null) {
|
||||
Debug.LogWarning ("Dont found point number " + (numberOfPoints - 1));
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
Rigidbody endRB = end.GetComponent<Rigidbody> ();
|
||||
|
||||
foreach (var spring in lastprevPoint.GetComponents<SpringJoint> ()) {
|
||||
if (spring.connectedBody == endRB) {
|
||||
DestroyImmediate (spring);
|
||||
}
|
||||
}
|
||||
|
||||
GameObject cPoint = CreateNewPoint (numberOfPoints);
|
||||
GameObject cConnector = CreateNewCon (numberOfPoints + 1);
|
||||
|
||||
cPoint.transform.position = end.transform.position;
|
||||
cPoint.transform.rotation = end.transform.rotation;
|
||||
cPoint.transform.localScale = Vector3.one * size;
|
||||
|
||||
SetSpring (cPoint.GetComponent<SpringJoint> (), lastprevPoint.GetComponent<Rigidbody> ());
|
||||
|
||||
SpringJoint cPointSpringJoint = cPoint.gameObject.AddComponent<SpringJoint> ();
|
||||
|
||||
//if (cPointSpringJoint == null) {
|
||||
// cPointSpringJoint = cPoint.gameObject.AddComponent<SpringJoint> ();
|
||||
//}
|
||||
|
||||
SetSpring (cPointSpringJoint, endRB);
|
||||
|
||||
// fix end
|
||||
end.transform.position += end.transform.forward * space;
|
||||
|
||||
cConnector.transform.position = CountConPos (cPoint.transform.position, end.transform.position);
|
||||
cConnector.transform.localScale = CountSizeOfCon (cPoint.transform.position, end.transform.position);
|
||||
cConnector.transform.rotation = CountRoationOfCon (cPoint.transform.position, end.transform.position);
|
||||
|
||||
numberOfPoints++;
|
||||
}
|
||||
|
||||
public void RemovePointFromEditor ()
|
||||
{
|
||||
RemovePoint ();
|
||||
|
||||
updateComponent ();
|
||||
}
|
||||
|
||||
private void RemovePoint ()
|
||||
{
|
||||
if (numberOfPoints < 2) {
|
||||
Debug.LogWarning ("Cable can't be shorter then 1");
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
Transform lastprevPoint = GetPoint (numberOfPoints - 1);
|
||||
|
||||
if (lastprevPoint == null) {
|
||||
Debug.LogWarning ("Dont found point number " + (numberOfPoints - 1));
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
Transform lastprevCon = GetConnector (numberOfPoints);
|
||||
|
||||
if (lastprevCon == null) {
|
||||
Debug.LogWarning ("Dont found connector number " + (numberOfPoints));
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
Transform lastlastprevPoint = GetPoint (numberOfPoints - 2);
|
||||
|
||||
if (lastlastprevPoint == null) {
|
||||
Debug.LogWarning ("Dont found point number " + (numberOfPoints - 2));
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
Rigidbody endRB = end.GetComponent<Rigidbody> ();
|
||||
|
||||
SpringJoint lastlastprevPointSpringJoint = lastlastprevPoint.gameObject.AddComponent<SpringJoint> ();
|
||||
|
||||
//if (lastlastprevPointSpringJoint == null) {
|
||||
// lastlastprevPointSpringJoint = lastlastprevPoint.gameObject.AddComponent<SpringJoint> ();
|
||||
//}
|
||||
|
||||
SetSpring (lastlastprevPointSpringJoint, endRB);
|
||||
|
||||
end.transform.position = lastprevPoint.position;
|
||||
end.transform.rotation = lastprevPoint.rotation;
|
||||
|
||||
GKC_Utils.checkUnpackPrefabToDestroyObject (gameObject, lastprevPoint.gameObject);
|
||||
GKC_Utils.checkUnpackPrefabToDestroyObject (gameObject, lastprevCon.gameObject);
|
||||
|
||||
numberOfPoints--;
|
||||
}
|
||||
|
||||
|
||||
private Vector3 CountConPos (Vector3 start, Vector3 end) => (start + end) / 2f;
|
||||
private Vector3 CountSizeOfCon (Vector3 start, Vector3 end) => new Vector3 (size, size, (start - end).magnitude / 2f);
|
||||
private Quaternion CountRoationOfCon (Vector3 start, Vector3 end) => Quaternion.LookRotation (end - start, Vector3.right);
|
||||
private string ConnectorName (int index) => $"{cloneText}_{index}_Conn";
|
||||
private string PointName (int index) => $"{cloneText}_{index}_Point";
|
||||
private Transform GetConnector (int index) => index > 0 ? transform.Find (ConnectorName (index)) : connector0.transform;
|
||||
private Transform GetPoint (int index) => index > 0 ? transform.Find (PointName (index)) : point0.transform;
|
||||
|
||||
|
||||
public void SetSpring (SpringJoint spring, Rigidbody connectedBody)
|
||||
{
|
||||
spring.connectedBody = connectedBody;
|
||||
spring.spring = springForce;
|
||||
spring.damper = damperOnCablePieces;
|
||||
spring.autoConfigureConnectedAnchor = false;
|
||||
spring.anchor = Vector3.zero;
|
||||
spring.connectedAnchor = Vector3.zero;
|
||||
spring.minDistance = space;
|
||||
spring.maxDistance = space;
|
||||
}
|
||||
private GameObject CreateNewPoint (int index)
|
||||
{
|
||||
GameObject temp = Instantiate (point0);
|
||||
|
||||
temp.name = PointName (index);
|
||||
|
||||
temp.transform.parent = transform;
|
||||
|
||||
return temp;
|
||||
}
|
||||
|
||||
private GameObject CreateNewCon (int index)
|
||||
{
|
||||
GameObject temp = Instantiate (connector0);
|
||||
|
||||
temp.name = ConnectorName (index);
|
||||
|
||||
temp.transform.parent = transform;
|
||||
|
||||
return temp;
|
||||
}
|
||||
|
||||
public void breakRandomPoint ()
|
||||
{
|
||||
bool randomPointFound = false;
|
||||
|
||||
int counter = 0;
|
||||
|
||||
int randomPointIndex = -1;
|
||||
|
||||
while (!randomPointFound) {
|
||||
randomPointIndex = Random.Range (1, numberOfPoints - 1);
|
||||
|
||||
if (!cableBroken) {
|
||||
randomPointFound = true;
|
||||
}
|
||||
|
||||
if (!brokenPointsIndex.Contains (randomPointIndex)) {
|
||||
randomPointFound = true;
|
||||
}
|
||||
|
||||
counter++;
|
||||
|
||||
if (counter > 100) {
|
||||
randomPointFound = true;
|
||||
|
||||
randomPointIndex = -1;
|
||||
}
|
||||
}
|
||||
|
||||
if (randomPointIndex > -1) {
|
||||
SpringJoint currentSpringJoint = points [randomPointIndex].GetComponent<SpringJoint> ();
|
||||
|
||||
if (currentSpringJoint != null) {
|
||||
Destroy (currentSpringJoint);
|
||||
}
|
||||
|
||||
brokenPointsIndex.Add (randomPointIndex);
|
||||
|
||||
cableBroken = true;
|
||||
|
||||
checkEventOnBreak ();
|
||||
}
|
||||
}
|
||||
|
||||
public void breakPoint (Transform pointTransform)
|
||||
{
|
||||
if (canBeBrokenExternallyEnabled) {
|
||||
int currentIndex = points.IndexOf (pointTransform);
|
||||
|
||||
if (currentIndex > -1) {
|
||||
SpringJoint currentSpringJoint = points [currentIndex].GetComponent<SpringJoint> ();
|
||||
|
||||
if (currentSpringJoint != null) {
|
||||
Destroy (currentSpringJoint);
|
||||
}
|
||||
|
||||
brokenPointsIndex.Add (currentIndex);
|
||||
|
||||
cableBroken = true;
|
||||
|
||||
checkEventOnBreak ();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public void breakAllPoints ()
|
||||
{
|
||||
if (canBeBrokenExternallyEnabled) {
|
||||
int pointsCount = points.Count;
|
||||
|
||||
for (int i = 0; i < pointsCount; i++) {
|
||||
breakPoint (points [i]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public void checkEventToDisconnectBothPoints ()
|
||||
{
|
||||
if (useEventToDisconnectBothPoints) {
|
||||
eventToDisconnectBothPoints.Invoke ();
|
||||
}
|
||||
}
|
||||
|
||||
public void checkEventOnBreak ()
|
||||
{
|
||||
eventOnBreak.Invoke ();
|
||||
}
|
||||
|
||||
public void updateComponent ()
|
||||
{
|
||||
GKC_Utils.updateComponent (this);
|
||||
|
||||
GKC_Utils.updateDirtyScene ("Update Info Physics Cable" + gameObject.name, gameObject);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,18 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 8a73ca4efb287e142b4032b0fac4fb79
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
AssetOrigin:
|
||||
serializedVersion: 1
|
||||
productId: 40995
|
||||
packageName: Game Kit Controller - Shooter Melee Adventure Creator 3D + 2.5D
|
||||
packageVersion: 3.77g
|
||||
assetPath: Assets/Game Kit Controller/Integrations/Physic Cables/Scripts/PhysicCable.cs
|
||||
uploadId: 814740
|
||||
@@ -0,0 +1,42 @@
|
||||
using System.Collections;
|
||||
using UnityEngine;
|
||||
using HInteractions;
|
||||
|
||||
namespace HPhysic
|
||||
{
|
||||
[RequireComponent (typeof (Connector))]
|
||||
public class PhysicCableCon : Liftable
|
||||
{
|
||||
private Connector _connector;
|
||||
|
||||
protected override void Awake ()
|
||||
{
|
||||
base.Awake ();
|
||||
|
||||
_connector = gameObject.GetComponent<Connector> ();
|
||||
}
|
||||
|
||||
public override void PickUp (IObjectHolder holder, int layer)
|
||||
{
|
||||
base.PickUp (holder, layer);
|
||||
|
||||
if (_connector.ConnectedTo)
|
||||
_connector.Disconnect ();
|
||||
}
|
||||
|
||||
public override void Drop ()
|
||||
{
|
||||
if (ObjectHolder.SelectedObject && ObjectHolder.SelectedObject.TryGetComponent (out Connector secondConnector)) {
|
||||
if (_connector.CanConnect (secondConnector)) {
|
||||
secondConnector.Connect (_connector);
|
||||
} else if (!secondConnector.IsConnected) {
|
||||
transform.rotation = secondConnector.ConnectionRotation * _connector.RotationOffset;
|
||||
|
||||
transform.position = (secondConnector.ConnectionPosition + secondConnector.ConnectedOutOffset * 0.2f) - (_connector.ConnectionPosition - _connector.transform.position);
|
||||
}
|
||||
}
|
||||
|
||||
base.Drop ();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,18 @@
|
||||
fileFormatVersion: 2
|
||||
guid: c5481f564cd754547b202b32a524a988
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
AssetOrigin:
|
||||
serializedVersion: 1
|
||||
productId: 40995
|
||||
packageName: Game Kit Controller - Shooter Melee Adventure Creator 3D + 2.5D
|
||||
packageVersion: 3.77g
|
||||
assetPath: Assets/Game Kit Controller/Integrations/Physic Cables/Scripts/PhysicCableCon.cs
|
||||
uploadId: 814740
|
||||
@@ -0,0 +1,55 @@
|
||||
using UnityEngine;
|
||||
using System.Collections;
|
||||
|
||||
#if UNITY_EDITOR
|
||||
using UnityEditor;
|
||||
|
||||
namespace HPhysic
|
||||
{
|
||||
[CustomEditor (typeof (PhysicCable))]
|
||||
public class PhysicCableEditor : Editor
|
||||
{
|
||||
PhysicCable manager;
|
||||
|
||||
void OnEnable ()
|
||||
{
|
||||
manager = (PhysicCable)target;
|
||||
}
|
||||
|
||||
public override void OnInspectorGUI ()
|
||||
{
|
||||
DrawDefaultInspector ();
|
||||
|
||||
EditorGUILayout.Space ();
|
||||
|
||||
GUILayout.Label ("EDITOR BUTTONS", EditorStyles.boldLabel);
|
||||
|
||||
|
||||
EditorGUILayout.Space ();
|
||||
|
||||
if (GUILayout.Button ("Update Points & Values")) {
|
||||
if (!Application.isPlaying) {
|
||||
manager.UpdatePointsFromEditor ();
|
||||
}
|
||||
}
|
||||
EditorGUILayout.Space ();
|
||||
|
||||
if (GUILayout.Button ("Add Point")) {
|
||||
if (!Application.isPlaying) {
|
||||
manager.AddPointFromEditor ();
|
||||
}
|
||||
}
|
||||
|
||||
EditorGUILayout.Space ();
|
||||
|
||||
if (GUILayout.Button ("Remove Point")) {
|
||||
if (!Application.isPlaying) {
|
||||
manager.RemovePointFromEditor ();
|
||||
}
|
||||
}
|
||||
|
||||
EditorGUILayout.Space ();
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif
|
||||
@@ -0,0 +1,18 @@
|
||||
fileFormatVersion: 2
|
||||
guid: d683a7afdc244914daa9c5dbd4b9f9e6
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
AssetOrigin:
|
||||
serializedVersion: 1
|
||||
productId: 40995
|
||||
packageName: Game Kit Controller - Shooter Melee Adventure Creator 3D + 2.5D
|
||||
packageVersion: 3.77g
|
||||
assetPath: Assets/Game Kit Controller/Integrations/Physic Cables/Scripts/PhysicCableEditor.cs
|
||||
uploadId: 814740
|
||||
8
Assets/Game Kit Controller/Integrations/Rewired.meta
Normal file
8
Assets/Game Kit Controller/Integrations/Rewired.meta
Normal file
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 77cef0026955f024aa0a3ea6a66e8682
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: f85c505243ebe5b4c8ad32fda185b769
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
Binary file not shown.
@@ -0,0 +1,15 @@
|
||||
fileFormatVersion: 2
|
||||
guid: c8bb8ecd21b620e4b88114cedb89132f
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
AssetOrigin:
|
||||
serializedVersion: 1
|
||||
productId: 40995
|
||||
packageName: Game Kit Controller - Shooter Melee Adventure Creator 3D + 2.5D
|
||||
packageVersion: 3.77g
|
||||
assetPath: Assets/Game Kit Controller/Integrations/Rewired/Documentation/GKC -
|
||||
Rewired Integration.pdf
|
||||
uploadId: 814740
|
||||
Reference in New Issue
Block a user