Merge remote-tracking branch 'origin/master' into LouDi_Pig
This commit is contained in:
commit
30188c0a5b
@ -65,7 +65,10 @@ namespace QFramework
|
|||||||
if (obj.activeSelf == false)
|
if (obj.activeSelf == false)
|
||||||
{
|
{
|
||||||
Debug.LogError(obj.name + "当前是隐藏状态");
|
Debug.LogError(obj.name + "当前是隐藏状态");
|
||||||
|
this.Finish();
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
anim = obj.GetComponent<Animation>();
|
anim = obj.GetComponent<Animation>();
|
||||||
@ -112,8 +115,11 @@ namespace QFramework
|
|||||||
}
|
}
|
||||||
catch (Exception)
|
catch (Exception)
|
||||||
{
|
{
|
||||||
|
anim = obj.GetComponent<Animation>();
|
||||||
Debug.LogError($"{path} 播放动画 {animName} 出错");
|
Debug.LogError($"{path} 播放动画 {animName} 出错");
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@ -151,7 +157,10 @@ namespace QFramework
|
|||||||
{
|
{
|
||||||
if (obj != null)
|
if (obj != null)
|
||||||
{
|
{
|
||||||
anim?.Stop();
|
if (anim!=null)
|
||||||
|
{
|
||||||
|
anim.Stop();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
animDot?.Kill();
|
animDot?.Kill();
|
||||||
OnFinished = null;
|
OnFinished = null;
|
||||||
|
|||||||
@ -96,9 +96,6 @@ public class ScoreController : MonoSingleton<ScoreController>
|
|||||||
|
|
||||||
private void OnQuit(OnModuleQuit quit)
|
private void OnQuit(OnModuleQuit quit)
|
||||||
{
|
{
|
||||||
var data = moduleDict[Global.Instance.curModule.ModuleName];
|
|
||||||
var scoreDict = data.scoreDict;
|
|
||||||
scoreDict.Clear();
|
|
||||||
TypeEventSystem.Global.UnRegister<OnModuleStart>(OnStart);
|
TypeEventSystem.Global.UnRegister<OnModuleStart>(OnStart);
|
||||||
TypeEventSystem.Global.UnRegister<OnModuleQuit>(OnQuit);
|
TypeEventSystem.Global.UnRegister<OnModuleQuit>(OnQuit);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -37,7 +37,7 @@ public class Point3DItem : MonoBehaviour
|
|||||||
}
|
}
|
||||||
rotSpeed = data.rotateSpeed;
|
rotSpeed = data.rotateSpeed;
|
||||||
gameObject.GetComponent<SpriteRenderer>().sortingOrder = data.order;
|
gameObject.GetComponent<SpriteRenderer>().sortingOrder = data.order;
|
||||||
TypeEventSystem.Global.Register<OnPoint3DQuestionDestroy>(OnObjDestroy).UnRegisterWhenGameObjectDestroyed(gameObject);
|
TypeEventSystem.Global.Register<OnPoint3DQuestionDestroy>(OnObjDestroy);
|
||||||
TypeEventSystem.Global.Register<StepStatusOnChange>(OnStepChanged);
|
TypeEventSystem.Global.Register<StepStatusOnChange>(OnStepChanged);
|
||||||
|
|
||||||
}
|
}
|
||||||
@ -49,9 +49,17 @@ public class Point3DItem : MonoBehaviour
|
|||||||
|
|
||||||
private void OnObjDestroy(OnPoint3DQuestionDestroy destroy)
|
private void OnObjDestroy(OnPoint3DQuestionDestroy destroy)
|
||||||
{
|
{
|
||||||
TypeEventSystem.Global.UnRegister<StepStatusOnChange>(OnStepChanged);
|
if (gameObject != null)
|
||||||
|
{
|
||||||
GameObject.Destroy(gameObject);
|
GameObject.Destroy(gameObject);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
private void OnDestroy()
|
||||||
|
{
|
||||||
|
|
||||||
|
TypeEventSystem.Global.UnRegister<StepStatusOnChange>(OnStepChanged);
|
||||||
|
TypeEventSystem.Global.UnRegister<OnPoint3DQuestionDestroy>(OnObjDestroy);
|
||||||
|
}
|
||||||
|
|
||||||
private void OnMouseUpAsButton()
|
private void OnMouseUpAsButton()
|
||||||
{
|
{
|
||||||
|
|||||||
@ -15,9 +15,11 @@ namespace QFramework.Example
|
|||||||
mData = uiData as UISettingData ?? new UISettingData();
|
mData = uiData as UISettingData ?? new UISettingData();
|
||||||
|
|
||||||
AudioKit.Settings.MusicVolume.RegisterWithInitValue(v => VoiceSlider.value = v).UnRegisterWhenGameObjectDestroyed(this);
|
AudioKit.Settings.MusicVolume.RegisterWithInitValue(v => VoiceSlider.value = v).UnRegisterWhenGameObjectDestroyed(this);
|
||||||
|
AudioKit.Settings.VoiceVolume.RegisterWithInitValue(v => VoiceSlider.value = v).UnRegisterWhenGameObjectDestroyed(this);
|
||||||
VoiceSlider.onValueChanged.AddListener(volume =>
|
VoiceSlider.onValueChanged.AddListener(volume =>
|
||||||
{
|
{
|
||||||
AudioKit.Settings.MusicVolume.Value = volume;
|
AudioKit.Settings.MusicVolume.Value = volume;
|
||||||
|
AudioKit.Settings.VoiceVolume.Value = volume;
|
||||||
});
|
});
|
||||||
|
|
||||||
Global.appSetting.MouseMoveSpeed.RegisterWithInitValue(v => MouseSlider.value = v).UnRegisterWhenGameObjectDestroyed(this);
|
Global.appSetting.MouseMoveSpeed.RegisterWithInitValue(v => MouseSlider.value = v).UnRegisterWhenGameObjectDestroyed(this);
|
||||||
@ -48,6 +50,10 @@ namespace QFramework.Example
|
|||||||
{
|
{
|
||||||
AudioKit.Settings.MusicVolume.Value += value;
|
AudioKit.Settings.MusicVolume.Value += value;
|
||||||
}
|
}
|
||||||
|
if (AudioKit.Settings.VoiceVolume.Value > 0.1f && AudioKit.Settings.VoiceVolume.Value < 1f)
|
||||||
|
{
|
||||||
|
AudioKit.Settings.VoiceVolume.Value += value;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user