1.我修改了Fungus内部脚本,使得游戏可以监听手柄按键A或者键盘J键来经行下一句。
2.我发现了Fungus的外部接入接口,使得我可以自定义对话结束后的操作。位置在Block内部
This commit is contained in:
parent
9f8a25379e
commit
78c7a17509
@ -1,9 +1,10 @@
|
||||
{
|
||||
"name": "Fungus",
|
||||
"rootNamespace": "",
|
||||
"references": [
|
||||
"GUID:6055be8ebefd69e48b49212b09b47b2f"
|
||||
"GUID:6055be8ebefd69e48b49212b09b47b2f",
|
||||
"GUID:75469ad4d38634e559750d17036d5f7c"
|
||||
],
|
||||
"optionalUnityReferences": [],
|
||||
"includePlatforms": [],
|
||||
"excludePlatforms": [],
|
||||
"allowUnsafeCode": false,
|
||||
@ -11,5 +12,6 @@
|
||||
"precompiledReferences": [],
|
||||
"autoReferenced": true,
|
||||
"defineConstraints": [],
|
||||
"versionDefines": []
|
||||
"versionDefines": [],
|
||||
"noEngineReferences": false
|
||||
}
|
@ -0,0 +1,7 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 81dbcde0f90df4e9ba9ca2794490e57a
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
@ -0,0 +1,7 @@
|
||||
fileFormatVersion: 2
|
||||
guid: fd02c799f3f5c4c83b2fc26c105a3821
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
3
Assets/Fungus/NewAssemblyReference.asmref
Normal file
3
Assets/Fungus/NewAssemblyReference.asmref
Normal file
@ -0,0 +1,3 @@
|
||||
{
|
||||
"reference": "GUID:75469ad4d38634e559750d17036d5f7c"
|
||||
}
|
7
Assets/Fungus/NewAssemblyReference.asmref.meta
Normal file
7
Assets/Fungus/NewAssemblyReference.asmref.meta
Normal file
@ -0,0 +1,7 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 8d7727f59cbba0c4aa01dac243acd821
|
||||
AssemblyDefinitionReferenceImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
@ -3,6 +3,9 @@
|
||||
|
||||
using UnityEngine;
|
||||
using UnityEngine.EventSystems;
|
||||
//我加的,引入新的输入系统,来监听下一步的指令
|
||||
using UnityEngine.InputSystem;
|
||||
//
|
||||
|
||||
namespace Fungus
|
||||
{
|
||||
@ -18,7 +21,10 @@ namespace Fungus
|
||||
/// <summary> Click anywhere on Say Dialog to advance. </summary>
|
||||
ClickOnDialog,
|
||||
/// <summary> Click on continue button to advance. </summary>
|
||||
ClickOnButton
|
||||
ClickOnButton,
|
||||
ClikeAsMyself
|
||||
/// <summary> 我自己设计的点击模式,用来响应键盘按键和鼠标 </summary>
|
||||
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@ -47,12 +53,15 @@ namespace Fungus
|
||||
protected StandaloneInputModule currentStandaloneInputModule;
|
||||
|
||||
protected Writer writer;
|
||||
private Gamepad gamepad;
|
||||
|
||||
|
||||
protected virtual void Awake()
|
||||
{
|
||||
writer = GetComponent<Writer>();
|
||||
|
||||
CheckEventSystem();
|
||||
gamepad = Gamepad.current;
|
||||
}
|
||||
|
||||
// There must be an Event System in the scene for Say and Menu input to work.
|
||||
@ -112,6 +121,22 @@ namespace Fungus
|
||||
dialogClickedFlag = false;
|
||||
}
|
||||
break;
|
||||
case ClickMode.ClikeAsMyself:
|
||||
if(gamepad!=null)
|
||||
{
|
||||
if(gamepad.aButton.wasPressedThisFrame || Input.GetKeyDown(KeyCode.J))
|
||||
{
|
||||
SetNextLineFlag();
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if(Input.GetKeyDown(KeyCode.J))
|
||||
{
|
||||
SetNextLineFlag();
|
||||
}
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
if (ignoreClickTimer > 0f)
|
||||
|
@ -109,6 +109,7 @@ namespace Fungus
|
||||
protected virtual void OnDestroy()
|
||||
{
|
||||
activeSayDialogs.Remove(this);
|
||||
|
||||
}
|
||||
|
||||
protected virtual Writer GetWriter()
|
||||
@ -534,6 +535,7 @@ namespace Fungus
|
||||
{
|
||||
fadeWhenDone = true;
|
||||
GetWriter().Stop();
|
||||
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -19,7 +19,6 @@ public class NormalInvestableItems : Interactive
|
||||
|
||||
public override void OnCall()
|
||||
{
|
||||
|
||||
Debug.Log("我触发了"+ gameObject.name +"的对话");
|
||||
Flowchart.BroadcastFungusMessage("谈论" + gameObject.name);
|
||||
}
|
||||
|
@ -98,3 +98,243 @@ C# parse time : 206ms
|
||||
candidates check time : 42ms
|
||||
console write time : 0ms
|
||||
|
||||
[api-updater (non-obsolete-error-filter)] 2021/7/6 10:03:37 : Starting D:/unity3.7/Unity/Editor/Data/Tools/ScriptUpdater/APIUpdater.NonObsoleteApiUpdaterDetector.exe
|
||||
[api-updater (non-obsolete-error-filter)]
|
||||
----------------------------------
|
||||
jit/startup time : 1595.2895ms
|
||||
moved types parse time: 92ms
|
||||
candidates parse time : 1ms
|
||||
C# parse time : 1210ms
|
||||
candidates check time : 88ms
|
||||
console write time : 1ms
|
||||
|
||||
[api-updater (non-obsolete-error-filter)] 2021/7/6 10:06:33 : Starting D:/unity3.7/Unity/Editor/Data/Tools/ScriptUpdater/APIUpdater.NonObsoleteApiUpdaterDetector.exe
|
||||
[api-updater (non-obsolete-error-filter)]
|
||||
----------------------------------
|
||||
jit/startup time : 126.9614ms
|
||||
moved types parse time: 82ms
|
||||
candidates parse time : 1ms
|
||||
C# parse time : 349ms
|
||||
candidates check time : 122ms
|
||||
console write time : 1ms
|
||||
|
||||
[api-updater (non-obsolete-error-filter)] 2021/7/6 10:09:00 : Starting D:/unity3.7/Unity/Editor/Data/Tools/ScriptUpdater/APIUpdater.NonObsoleteApiUpdaterDetector.exe
|
||||
[api-updater (non-obsolete-error-filter)]
|
||||
----------------------------------
|
||||
jit/startup time : 111.2154ms
|
||||
moved types parse time: 64ms
|
||||
candidates parse time : 5ms
|
||||
C# parse time : 377ms
|
||||
candidates check time : 536ms
|
||||
console write time : 0ms
|
||||
|
||||
[api-updater (non-obsolete-error-filter)] 2021/7/6 10:09:45 : Starting D:/unity3.7/Unity/Editor/Data/Tools/ScriptUpdater/APIUpdater.NonObsoleteApiUpdaterDetector.exe
|
||||
[api-updater (non-obsolete-error-filter)]
|
||||
----------------------------------
|
||||
jit/startup time : 130.0922ms
|
||||
moved types parse time: 112ms
|
||||
candidates parse time : 6ms
|
||||
C# parse time : 438ms
|
||||
candidates check time : 483ms
|
||||
console write time : 0ms
|
||||
|
||||
[api-updater (non-obsolete-error-filter)] 2021/7/6 10:10:03 : Starting D:/unity3.7/Unity/Editor/Data/Tools/ScriptUpdater/APIUpdater.NonObsoleteApiUpdaterDetector.exe
|
||||
[api-updater (non-obsolete-error-filter)]
|
||||
----------------------------------
|
||||
jit/startup time : 133.2705ms
|
||||
moved types parse time: 89ms
|
||||
candidates parse time : 4ms
|
||||
C# parse time : 425ms
|
||||
candidates check time : 456ms
|
||||
console write time : 0ms
|
||||
|
||||
[api-updater (non-obsolete-error-filter)] 2021/7/6 10:10:43 : Starting D:/unity3.7/Unity/Editor/Data/Tools/ScriptUpdater/APIUpdater.NonObsoleteApiUpdaterDetector.exe
|
||||
[api-updater (non-obsolete-error-filter)]
|
||||
----------------------------------
|
||||
jit/startup time : 103.7187ms
|
||||
moved types parse time: 53ms
|
||||
candidates parse time : 12ms
|
||||
C# parse time : 341ms
|
||||
candidates check time : 454ms
|
||||
console write time : 0ms
|
||||
|
||||
[api-updater (non-obsolete-error-filter)] 2021/7/6 10:11:01 : Starting D:/unity3.7/Unity/Editor/Data/Tools/ScriptUpdater/APIUpdater.NonObsoleteApiUpdaterDetector.exe
|
||||
[api-updater (non-obsolete-error-filter)]
|
||||
----------------------------------
|
||||
jit/startup time : 107.2887ms
|
||||
moved types parse time: 82ms
|
||||
candidates parse time : 1ms
|
||||
C# parse time : 363ms
|
||||
candidates check time : 119ms
|
||||
console write time : 0ms
|
||||
|
||||
[api-updater (non-obsolete-error-filter)] 2021/7/6 10:13:40 : Starting D:/unity3.7/Unity/Editor/Data/Tools/ScriptUpdater/APIUpdater.NonObsoleteApiUpdaterDetector.exe
|
||||
[api-updater (non-obsolete-error-filter)]
|
||||
----------------------------------
|
||||
jit/startup time : 101.4857ms
|
||||
moved types parse time: 79ms
|
||||
candidates parse time : 1ms
|
||||
C# parse time : 288ms
|
||||
candidates check time : 93ms
|
||||
console write time : 0ms
|
||||
|
||||
[api-updater (non-obsolete-error-filter)] 2021/7/6 10:19:24 : Starting D:/unity3.7/Unity/Editor/Data/Tools/ScriptUpdater/APIUpdater.NonObsoleteApiUpdaterDetector.exe
|
||||
[api-updater (non-obsolete-error-filter)]
|
||||
----------------------------------
|
||||
jit/startup time : 118.7093ms
|
||||
moved types parse time: 76ms
|
||||
candidates parse time : 5ms
|
||||
C# parse time : 395ms
|
||||
candidates check time : 500ms
|
||||
console write time : 0ms
|
||||
|
||||
[api-updater (non-obsolete-error-filter)] 2021/7/6 10:19:47 : Starting D:/unity3.7/Unity/Editor/Data/Tools/ScriptUpdater/APIUpdater.NonObsoleteApiUpdaterDetector.exe
|
||||
[api-updater (non-obsolete-error-filter)]
|
||||
----------------------------------
|
||||
jit/startup time : 177.2368ms
|
||||
moved types parse time: 93ms
|
||||
candidates parse time : 2ms
|
||||
C# parse time : 329ms
|
||||
candidates check time : 100ms
|
||||
console write time : 0ms
|
||||
|
||||
[api-updater (non-obsolete-error-filter)] 2021/7/6 10:20:06 : Starting D:/unity3.7/Unity/Editor/Data/Tools/ScriptUpdater/APIUpdater.NonObsoleteApiUpdaterDetector.exe
|
||||
[api-updater (non-obsolete-error-filter)]
|
||||
----------------------------------
|
||||
jit/startup time : 140.654ms
|
||||
moved types parse time: 110ms
|
||||
candidates parse time : 3ms
|
||||
C# parse time : 431ms
|
||||
candidates check time : 88ms
|
||||
console write time : 0ms
|
||||
|
||||
[api-updater (non-obsolete-error-filter)] 2021/7/6 10:20:21 : Starting D:/unity3.7/Unity/Editor/Data/Tools/ScriptUpdater/APIUpdater.NonObsoleteApiUpdaterDetector.exe
|
||||
[api-updater (non-obsolete-error-filter)]
|
||||
----------------------------------
|
||||
jit/startup time : 96.7438ms
|
||||
moved types parse time: 67ms
|
||||
candidates parse time : 62ms
|
||||
C# parse time : 396ms
|
||||
candidates check time : 1ms
|
||||
console write time : 0ms
|
||||
|
||||
[api-updater (non-obsolete-error-filter)] 2021/7/6 10:21:02 : Starting D:/unity3.7/Unity/Editor/Data/Tools/ScriptUpdater/APIUpdater.NonObsoleteApiUpdaterDetector.exe
|
||||
[api-updater (non-obsolete-error-filter)]
|
||||
----------------------------------
|
||||
jit/startup time : 125.7003ms
|
||||
moved types parse time: 64ms
|
||||
candidates parse time : 1ms
|
||||
C# parse time : 318ms
|
||||
candidates check time : 85ms
|
||||
console write time : 0ms
|
||||
|
||||
[api-updater (non-obsolete-error-filter)] 2021/7/6 10:22:42 : Starting D:/unity3.7/Unity/Editor/Data/Tools/ScriptUpdater/APIUpdater.NonObsoleteApiUpdaterDetector.exe
|
||||
[api-updater (non-obsolete-error-filter)]
|
||||
----------------------------------
|
||||
jit/startup time : 118.9557ms
|
||||
moved types parse time: 110ms
|
||||
candidates parse time : 2ms
|
||||
C# parse time : 299ms
|
||||
candidates check time : 76ms
|
||||
console write time : 0ms
|
||||
|
||||
[api-updater (non-obsolete-error-filter)] 2021/7/6 10:22:56 : Starting D:/unity3.7/Unity/Editor/Data/Tools/ScriptUpdater/APIUpdater.NonObsoleteApiUpdaterDetector.exe
|
||||
[api-updater (non-obsolete-error-filter)]
|
||||
----------------------------------
|
||||
jit/startup time : 105.7599ms
|
||||
moved types parse time: 90ms
|
||||
candidates parse time : 13ms
|
||||
C# parse time : 345ms
|
||||
candidates check time : 464ms
|
||||
console write time : 0ms
|
||||
|
||||
[api-updater (non-obsolete-error-filter)] 2021/7/6 10:23:09 : Starting D:/unity3.7/Unity/Editor/Data/Tools/ScriptUpdater/APIUpdater.NonObsoleteApiUpdaterDetector.exe
|
||||
[api-updater (non-obsolete-error-filter)]
|
||||
----------------------------------
|
||||
jit/startup time : 109.6894ms
|
||||
moved types parse time: 70ms
|
||||
candidates parse time : 68ms
|
||||
C# parse time : 458ms
|
||||
candidates check time : 2ms
|
||||
console write time : 0ms
|
||||
|
||||
[api-updater (non-obsolete-error-filter)] 2021/7/6 10:23:44 : Starting D:/unity3.7/Unity/Editor/Data/Tools/ScriptUpdater/APIUpdater.NonObsoleteApiUpdaterDetector.exe
|
||||
[api-updater (non-obsolete-error-filter)]
|
||||
----------------------------------
|
||||
jit/startup time : 142.9604ms
|
||||
moved types parse time: 83ms
|
||||
candidates parse time : 2ms
|
||||
C# parse time : 355ms
|
||||
candidates check time : 128ms
|
||||
console write time : 1ms
|
||||
|
||||
[api-updater (non-obsolete-error-filter)] 2021/7/6 10:33:09 : Starting D:/unity3.7/Unity/Editor/Data/Tools/ScriptUpdater/APIUpdater.NonObsoleteApiUpdaterDetector.exe
|
||||
[api-updater (non-obsolete-error-filter)]
|
||||
----------------------------------
|
||||
jit/startup time : 118.0162ms
|
||||
moved types parse time: 78ms
|
||||
candidates parse time : 5ms
|
||||
C# parse time : 400ms
|
||||
candidates check time : 435ms
|
||||
console write time : 0ms
|
||||
|
||||
[api-updater (non-obsolete-error-filter)] 2021/7/6 10:33:34 : Starting D:/unity3.7/Unity/Editor/Data/Tools/ScriptUpdater/APIUpdater.NonObsoleteApiUpdaterDetector.exe
|
||||
[api-updater (non-obsolete-error-filter)]
|
||||
----------------------------------
|
||||
jit/startup time : 97.3713ms
|
||||
moved types parse time: 70ms
|
||||
candidates parse time : 61ms
|
||||
C# parse time : 368ms
|
||||
candidates check time : 1ms
|
||||
console write time : 0ms
|
||||
|
||||
[api-updater (non-obsolete-error-filter)] 2021/7/6 23:39:59 : Starting D:/unity3.7/Unity/Editor/Data/Tools/ScriptUpdater/APIUpdater.NonObsoleteApiUpdaterDetector.exe
|
||||
[api-updater (non-obsolete-error-filter)]
|
||||
----------------------------------
|
||||
jit/startup time : 662.182ms
|
||||
moved types parse time: 53ms
|
||||
candidates parse time : 1ms
|
||||
C# parse time : 583ms
|
||||
candidates check time : 74ms
|
||||
console write time : 0ms
|
||||
|
||||
[api-updater (non-obsolete-error-filter)] 2021/7/6 23:41:32 : Starting D:/unity3.7/Unity/Editor/Data/Tools/ScriptUpdater/APIUpdater.NonObsoleteApiUpdaterDetector.exe
|
||||
[api-updater (non-obsolete-error-filter)]
|
||||
----------------------------------
|
||||
jit/startup time : 65.8241ms
|
||||
moved types parse time: 47ms
|
||||
candidates parse time : 1ms
|
||||
C# parse time : 200ms
|
||||
candidates check time : 73ms
|
||||
console write time : 0ms
|
||||
|
||||
[api-updater (non-obsolete-error-filter)] 2021/7/6 23:42:27 : Starting D:/unity3.7/Unity/Editor/Data/Tools/ScriptUpdater/APIUpdater.NonObsoleteApiUpdaterDetector.exe
|
||||
[api-updater (non-obsolete-error-filter)]
|
||||
----------------------------------
|
||||
jit/startup time : 85.7686ms
|
||||
moved types parse time: 57ms
|
||||
candidates parse time : 1ms
|
||||
C# parse time : 231ms
|
||||
candidates check time : 73ms
|
||||
console write time : 0ms
|
||||
|
||||
[api-updater (non-obsolete-error-filter)] 2021/7/6 23:42:35 : Starting D:/unity3.7/Unity/Editor/Data/Tools/ScriptUpdater/APIUpdater.NonObsoleteApiUpdaterDetector.exe
|
||||
[api-updater (non-obsolete-error-filter)]
|
||||
----------------------------------
|
||||
jit/startup time : 75.7995ms
|
||||
moved types parse time: 48ms
|
||||
candidates parse time : 1ms
|
||||
C# parse time : 201ms
|
||||
candidates check time : 69ms
|
||||
console write time : 0ms
|
||||
|
||||
[api-updater (non-obsolete-error-filter)] 2021/7/6 23:43:00 : Starting D:/unity3.7/Unity/Editor/Data/Tools/ScriptUpdater/APIUpdater.NonObsoleteApiUpdaterDetector.exe
|
||||
[api-updater (non-obsolete-error-filter)]
|
||||
----------------------------------
|
||||
jit/startup time : 81.7823ms
|
||||
moved types parse time: 49ms
|
||||
candidates parse time : 1ms
|
||||
C# parse time : 204ms
|
||||
candidates check time : 65ms
|
||||
console write time : 0ms
|
||||
|
||||
|
@ -5,6 +5,22 @@ InputManager:
|
||||
m_ObjectHideFlags: 0
|
||||
serializedVersion: 2
|
||||
m_Axes:
|
||||
- serializedVersion: 3
|
||||
m_Name: Skip
|
||||
descriptiveName:
|
||||
descriptiveNegativeName:
|
||||
negativeButton: left
|
||||
positiveButton: right
|
||||
altNegativeButton: a
|
||||
altPositiveButton: d
|
||||
gravity: 3
|
||||
dead: 0.001
|
||||
sensitivity: 3
|
||||
snap: 1
|
||||
invert: 0
|
||||
type: 0
|
||||
axis: 0
|
||||
joyNum: 0
|
||||
- serializedVersion: 3
|
||||
m_Name: Horizontal
|
||||
descriptiveName:
|
||||
@ -485,3 +501,19 @@ InputManager:
|
||||
type: 2
|
||||
axis: 5
|
||||
joyNum: 0
|
||||
- serializedVersion: 3
|
||||
m_Name: Debug Horizontal
|
||||
descriptiveName:
|
||||
descriptiveNegativeName:
|
||||
negativeButton: left
|
||||
positiveButton: right
|
||||
altNegativeButton:
|
||||
altPositiveButton:
|
||||
gravity: 1000
|
||||
dead: 0.001
|
||||
sensitivity: 1000
|
||||
snap: 0
|
||||
invert: 0
|
||||
type: 2
|
||||
axis: 5
|
||||
joyNum: 0
|
||||
|
Loading…
x
Reference in New Issue
Block a user