浏览代码

Methods to trigger events

/main
Unknown 4 年前
当前提交
d3e13985
共有 4 个文件被更改,包括 19 次插入8 次删除
  1. 12
      UOP1_Project/Assets/Scripts/LevelEnd.cs
  2. 2
      UOP1_Project/Assets/Scripts/StartGame.cs.meta
  3. 13
      UOP1_Project/Assets/Scripts/StartGame.cs
  4. 0
      /UOP1_Project/Assets/Scripts/StartGame.cs.meta

12
UOP1_Project/Assets/Scripts/LevelEnd.cs


using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine;
public GameEvent onLevelEnd;
public LoadEvent onLevelEnd;
public GameScene[] locationsToLoad;
public bool showLoadScreen;
onLevelEnd.Raise();
onLevelEnd.RaiseEvent(locationsToLoad, showLoadScreen);
}
}
}

2
UOP1_Project/Assets/Scripts/StartGame.cs.meta


fileFormatVersion: 2
guid: a7fc45397100a9f4d91861b943fccfc5
guid: 45ecefb9fe27f1f4b8cf3ecc3fad707c
MonoImporter:
externalObjects: {}
serializedVersion: 2

13
UOP1_Project/Assets/Scripts/StartGame.cs


using UnityEngine;
public class StartGame : MonoBehaviour
{
public LoadEvent onPlayButtonPress;
public GameScene[] locationsToLoad;
public bool showLoadScreen;
public void OnPlayButtonPress()
{
onPlayButtonPress.RaiseEvent(locationsToLoad, showLoadScreen);
}
}

/UOP1_Project/Assets/Scripts/Scriptable Objects/SceneManagement/ScenesData.cs.meta → /UOP1_Project/Assets/Scripts/StartGame.cs.meta

正在加载...
取消
保存