浏览代码

Small Fixes from demo

/main
Thomas ICHÉ 5 年前
当前提交
f345324e
共有 3 个文件被更改,包括 49 次插入0 次删除
  1. 10
      Runtime/Managers/Implementations/LevelStreamingManager.cs
  2. 28
      Runtime/LevelScripting/Actions/AudioPlayClipAction.cs
  3. 11
      Runtime/LevelScripting/Actions/AudioPlayClipAction.cs.meta

10
Runtime/Managers/Implementations/LevelStreamingManager.cs


[Header("UI Configuration")]
public GameObject LoadingRoot;
public GameObject LoadingIcon;
public GameObject ProgressBar;
public GameObject ProgressBarContainer;
public Text LoadingText;

if (showUI)
LoadingRoot.SetActive(true);
if (LoadingIcon != null)
LoadingIcon.SetActive(true);
if (count > 0)
StartCoroutine(LoadScenesCoroutine(action, requiredScenes, sceneToActivate, showUI, onLoadComplete));
else

if (showUI)
LoadingRoot.SetActive(false);
if (LoadingIcon != null)
LoadingIcon.SetActive(false);
if (EnableDebug)
DebugText.gameObject.SetActive(false);

if (showUI)
LoadingRoot.SetActive(false);
if (LoadingIcon != null)
LoadingIcon.SetActive(false);
if (EnableDebug)
DebugText.gameObject.SetActive(false);

28
Runtime/LevelScripting/Actions/AudioPlayClipAction.cs


using System.Collections;
using System;
using UnityEngine;
using UnityEngine.Audio;
using UnityEngine.Events;
namespace GameplayIngredients.Actions
{
public class AudioPlayClipAction : ActionBase
{
public AudioClip Clip;
public AudioSource Source;
public override void Execute(GameObject instigator = null)
{
if (Source != null)
{
Source.Stop();
if (Clip != null)
Source.clip = Clip;
Source.Play();
}
}
}
}

11
Runtime/LevelScripting/Actions/AudioPlayClipAction.cs.meta


fileFormatVersion: 2
guid: 28a2beba7cb33a243b449d62cbe62962
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {fileID: 2800000, guid: bdcc63f36a8ac6643bbfb90bb398716a, type: 3}
userData:
assetBundleName:
assetBundleVariant:
正在加载...
取消
保存