浏览代码

Added level 2 and level end trigger in level 1

/main
Unknown 4 年前
当前提交
af81ba57
共有 10 个文件被更改,包括 1111 次插入7 次删除
  1. 63
      UOP1_Project/Assets/Scenes/Level1.unity
  2. 2
      UOP1_Project/Assets/Scriptable Objects/Levels/Level2.asset
  3. 6
      UOP1_Project/Assets/Scripts/Scriptable Objects/SceneManagement/ScenesData.cs
  4. 11
      UOP1_Project/ProjectSettings/EditorBuildSettings.asset
  5. 1001
      UOP1_Project/Assets/Scenes/Level2.unity
  6. 7
      UOP1_Project/Assets/Scenes/Level2.unity.meta
  7. 17
      UOP1_Project/Assets/Scripts/LevelEnd.cs
  8. 11
      UOP1_Project/Assets/Scripts/LevelEnd.cs.meta
  9. 0
      /UOP1_Project/Assets/Scripts/ClearLists.cs
  10. 0
      /UOP1_Project/Assets/Scripts/ClearLists.cs.meta

63
UOP1_Project/Assets/Scenes/Level1.unity


m_Father: {fileID: 0}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!1 &710639991
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 710639993}
- component: {fileID: 710639992}
- component: {fileID: 710639994}
m_Layer: 0
m_Name: LevelEnd
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!65 &710639992
BoxCollider:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 710639991}
m_Material: {fileID: 0}
m_IsTrigger: 1
m_Enabled: 1
serializedVersion: 2
m_Size: {x: 1, y: 1, z: 1}
m_Center: {x: 0, y: 0, z: 0}
--- !u!4 &710639993
Transform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 710639991}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 10.11, y: 5.35, z: 29.12}
m_LocalScale: {x: 10, y: 10, z: 10}
m_Children: []
m_Father: {fileID: 0}
m_RootOrder: 29
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!114 &710639994
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 710639991}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 02e6b73898a4a52438d630a7ba29da77, type: 3}
m_Name:
m_EditorClassIdentifier:
onLevelEnd: {fileID: 11400000, guid: 31d49a74dcfce42488af012acaf74bdb, type: 2}
--- !u!1 &716155109
GameObject:
m_ObjectHideFlags: 0

type: 3}
propertyPath: m_Name
value: Pig
objectReference: {fileID: 0}
- target: {fileID: 3341179906418240709, guid: 0fa393e1e37bc9e4e829c25a9452bcd3,
type: 3}
propertyPath: m_TagString
value: Player
objectReference: {fileID: 0}
- target: {fileID: 3341179906418240730, guid: 0fa393e1e37bc9e4e829c25a9452bcd3,
type: 3}

2
UOP1_Project/Assets/Scriptable Objects/Levels/Level2.asset


m_Script: {fileID: 11500000, guid: 8db63739a6674d74e8e232347422172f, type: 3}
m_Name: Level2
m_EditorClassIdentifier:
sceneName: Level1
sceneName: Level2
shortDescription: Find Y
music: {fileID: 0}
musicVolume: 0

6
UOP1_Project/Assets/Scripts/Scriptable Objects/SceneManagement/ScenesData.cs


{
public List<Level> levels = new List<Level>();
public List<Menu> menus = new List<Menu>();
public int CurrentLevelIndex=0;
public int CurrentLevelIndex=-1;
//List of the scenes to load and track progress
public List<AsyncOperation> scenesToLoad = new List<AsyncOperation>();

{
scenesToLoadNames.Clear();
scenesToUnLoadNames.Clear();
//Reset index
CurrentLevelIndex = -1;
}
/*

}
//Unload previous level if it exists
if(scenesToUnLoadNames == null)
if(scenesToUnLoadNames.Count == 0)
{
return;
}

11
UOP1_Project/ProjectSettings/EditorBuildSettings.asset


serializedVersion: 2
m_Scenes:
- enabled: 1
path: Assets/Scenes/Level1.unity
guid: 1f93ce2ec2bb43b4ab2a18ad18a50967
path: Assets/Scenes/ScenesLoader.unity
guid: e8df4c5a458acc5489b2865e6b789224
path: Assets/Scenes/ScenesLoader.unity
guid: e8df4c5a458acc5489b2865e6b789224
path: Assets/Scenes/Level1.unity
guid: 1f93ce2ec2bb43b4ab2a18ad18a50967
- enabled: 1
path: Assets/Scenes/Level2.unity
guid: 3a816f06c17361b4398583570bcbf8eb
m_configObjects: {}

1001
UOP1_Project/Assets/Scenes/Level2.unity
文件差异内容过多而无法显示
查看文件

7
UOP1_Project/Assets/Scenes/Level2.unity.meta


fileFormatVersion: 2
guid: 3a816f06c17361b4398583570bcbf8eb
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

17
UOP1_Project/Assets/Scripts/LevelEnd.cs


using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class LevelEnd : MonoBehaviour
{
public GameEvent onLevelEnd;
private void OnTriggerEnter(Collider other)
{
if (other.CompareTag("Player"))
{
onLevelEnd.Raise();
}
}
}

11
UOP1_Project/Assets/Scripts/LevelEnd.cs.meta


fileFormatVersion: 2
guid: 02e6b73898a4a52438d630a7ba29da77
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

/UOP1_Project/Assets/ClearLists.cs → /UOP1_Project/Assets/Scripts/ClearLists.cs

/UOP1_Project/Assets/ClearLists.cs.meta → /UOP1_Project/Assets/Scripts/ClearLists.cs.meta

正在加载...
取消
保存