add ckg
plantilla base para movimiento básico
This commit is contained in:
@@ -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
|
||||
Reference in New Issue
Block a user