浏览代码

Comments Added to some scripts

/AdsTesting
Arturo Nereu 4 年前
当前提交
96878c72
共有 5 个文件被更改,包括 18 次插入14 次删除
  1. 2
      Assets/Prefabs/Player.prefab
  2. 5
      Assets/Scenes/Level_00.unity
  3. 6
      Assets/Scripts/GameManager.cs
  4. 6
      Assets/Scripts/Loading.cs
  5. 13
      Assets/Scripts/PlayerConfigurator.cs

2
Assets/Prefabs/Player.prefab


m_Script: {fileID: 11500000, guid: 3a698c89160b64541b11228f3098737b, type: 3}
m_Name:
m_EditorClassIdentifier:
m_MovementSpeed: 10
m_MovementSpeed: 2.5
m_AnimatorController: {fileID: 214216475}
--- !u!1001 &1171686176522753923
PrefabInstance:

5
Assets/Scenes/Level_00.unity


propertyPath: m_Name
value: Player
objectReference: {fileID: 0}
- target: {fileID: 8083381679980500539, guid: 67db914bd437a69468c6d966454659b0,
type: 3}
propertyPath: m_MovementSpeed
value: 2.5
objectReference: {fileID: 0}
m_RemovedComponents: []
m_SourcePrefab: {fileID: 100100000, guid: 67db914bd437a69468c6d966454659b0, type: 3}
--- !u!1001 &2096555481

6
Assets/Scripts/GameManager.cs


using UnityEngine;
using UnityEngine.SceneManagement;
using UnityEngine.AddressableAssets;
public class GameManager : MonoBehaviour

public static void LoadNextLevel()
{
//TODO: Show old workflow
// We are going to be using the Addressables API to manage our scene loading and unloading, the equivalent way on the UnityEngine.SceneManagement API is:
// SceneManager.LoadSceneAsync("LoadingScene", LoadSceneMode.Single);
// Scene loaded in Single mode, the previously loaded scenes will be disposed by the Addressables.
/// <summary>
public static void LevelCompleted()
{
s_CurrentLevel++;

6
Assets/Scripts/Loading.cs


public class Loading : MonoBehaviour
{
private bool m_LoadingComplete = false;
//private bool m_LoadingComplete = false;
[SerializeField]
private Slider m_LoadingSlider;

// TODO: Maybe just have it inside the Start method and not class-wide
AsyncOperationHandle m_SceneHandle;
private AsyncOperationHandle m_SceneHandle;
// Start is called before the first frame update
void OnEnable()

m_LoadingSlider.value = m_SceneHandle.PercentComplete;
}
}
//Make the oncomplete
}

13
Assets/Scripts/PlayerConfigurator.cs


[SerializeField]
private Transform m_HatAnchor;
// Start is called before the first frame update
void Start()
{
//TODO: Remove this random stuff, just for testing atm

// TODO: Change the string parameter
public void SetHat(string hatKey)
{
// We are using the InstantiateAsync function on the Addressables API, the non-Addressables way
// looks something like the following line, however, this version is not Asynchronous
// GameObject.Instantiate(prefabToInstantiate);
// TOASK: Where to unsubscribe
private void OnDisable()
{
// TODO: Unsubscribe
}
// TOASK: Where to unsubscribe
}
}
正在加载...
取消
保存