Created basic framework for Core.
Designed basic classes and documented basic purpose statements and outline for each class/function.
This commit is contained in:
parent
58df07ab79
commit
7aecaf3801
@ -1,21 +0,0 @@
|
|||||||
using System.Collections;
|
|
||||||
using System.Collections.Generic;
|
|
||||||
using UnityEngine;
|
|
||||||
|
|
||||||
namespace Obscurum.Core{
|
|
||||||
public class GameInformation : MonoBehaviour
|
|
||||||
{
|
|
||||||
// Start is called before the first frame update
|
|
||||||
void Start()
|
|
||||||
{
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
// Update is called once per frame
|
|
||||||
void Update()
|
|
||||||
{
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
8
Assets/Scripts/NewDesign/Core/GameInformation.meta
Normal file
8
Assets/Scripts/NewDesign/Core/GameInformation.meta
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
fileFormatVersion: 2
|
||||||
|
guid: a45f2b9aa05729f43904a395d6ef0255
|
||||||
|
folderAsset: yes
|
||||||
|
DefaultImporter:
|
||||||
|
externalObjects: {}
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
@ -0,0 +1,35 @@
|
|||||||
|
using System.Collections;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using UnityEngine;
|
||||||
|
|
||||||
|
namespace Obscurum.Core{
|
||||||
|
/// <summary>
|
||||||
|
/// Handles all operations about the current game state including: Current GameSave, Current Level and active parameters.
|
||||||
|
/// </summary>
|
||||||
|
public class GameInformation : MonoBehaviour
|
||||||
|
{
|
||||||
|
private static GameSave activeSave;
|
||||||
|
private static string activeLevel;
|
||||||
|
/// <summary>
|
||||||
|
/// The current save being run.
|
||||||
|
/// </summary>
|
||||||
|
public static GameSave ActiveSave
|
||||||
|
{
|
||||||
|
get { return activeSave; }
|
||||||
|
set { value.Load(); activeSave = value; }
|
||||||
|
}
|
||||||
|
|
||||||
|
// Start is called before the first frame update
|
||||||
|
void Start()
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
// Update is called once per frame
|
||||||
|
void Update()
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
50
Assets/Scripts/NewDesign/Core/GameInformation/GameSave.cs
Normal file
50
Assets/Scripts/NewDesign/Core/GameInformation/GameSave.cs
Normal file
@ -0,0 +1,50 @@
|
|||||||
|
using System.Collections;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Runtime.CompilerServices;
|
||||||
|
using UnityEngine;
|
||||||
|
|
||||||
|
namespace Obscurum.Core
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Handles operations related to a game save:
|
||||||
|
/// Loading/Saving operations
|
||||||
|
/// Savefile path managemnet.
|
||||||
|
/// </summary>
|
||||||
|
public class GameSave
|
||||||
|
{
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets all saves from saves folder.
|
||||||
|
/// </summary>
|
||||||
|
/// <returns></returns>
|
||||||
|
public static GameSave[] GetSaves() { return new GameSave[0]; }
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
private string path;
|
||||||
|
private string name;
|
||||||
|
public string Path { get { return path; } }
|
||||||
|
public string Name { get { return name; } }
|
||||||
|
public GameSave(string name, string path) {
|
||||||
|
this.path = path;
|
||||||
|
this.name = name;
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Loads this save from file.
|
||||||
|
/// </summary>
|
||||||
|
public void Load()
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Saves this game save object.
|
||||||
|
/// </summary>
|
||||||
|
public void Save()
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,11 @@
|
|||||||
|
fileFormatVersion: 2
|
||||||
|
guid: 4904e6df255f0024281e023b719fa592
|
||||||
|
MonoImporter:
|
||||||
|
externalObjects: {}
|
||||||
|
serializedVersion: 2
|
||||||
|
defaultReferences: []
|
||||||
|
executionOrder: 0
|
||||||
|
icon: {instanceID: 0}
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
@ -4,8 +4,18 @@ using UnityEngine;
|
|||||||
|
|
||||||
namespace Obscurum.Core{
|
namespace Obscurum.Core{
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Stores/Manages information about the current multiplayer session.
|
||||||
|
/// </summary>
|
||||||
public class MultiplayerInformation : MonoBehaviour
|
public class MultiplayerInformation : MonoBehaviour
|
||||||
{
|
{
|
||||||
|
//Todo: Madev enhance.
|
||||||
|
private static List<string> lobbyNames = new List<string>();
|
||||||
|
private static bool isServer;
|
||||||
|
private static string serverAddress;
|
||||||
|
private static string steamLobby;
|
||||||
|
|
||||||
|
|
||||||
// Start is called before the first frame update
|
// Start is called before the first frame update
|
||||||
void Start()
|
void Start()
|
||||||
{
|
{
|
||||||
|
8
Assets/Scripts/NewDesign/Core/PlayerInformation.meta
Normal file
8
Assets/Scripts/NewDesign/Core/PlayerInformation.meta
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
fileFormatVersion: 2
|
||||||
|
guid: fe57ad92038744748871f5df1a088607
|
||||||
|
folderAsset: yes
|
||||||
|
DefaultImporter:
|
||||||
|
externalObjects: {}
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
@ -2,21 +2,20 @@ using System.Collections;
|
|||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using UnityEngine;
|
using UnityEngine;
|
||||||
|
|
||||||
namespace Obscurum.Core{
|
namespace Obscurum.Core
|
||||||
public class PlayerInformation : MonoBehaviour
|
{
|
||||||
|
public class PlayerAchievement
|
||||||
{
|
{
|
||||||
|
|
||||||
// Start is called before the first frame update
|
// Start is called before the first frame update
|
||||||
void Start()
|
void Start()
|
||||||
{
|
{
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Update is called once per frame
|
// Update is called once per frame
|
||||||
void Update()
|
void Update()
|
||||||
{
|
{
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
@ -0,0 +1,11 @@
|
|||||||
|
fileFormatVersion: 2
|
||||||
|
guid: 5769891d81ba7c444bb21e52a8622468
|
||||||
|
MonoImporter:
|
||||||
|
externalObjects: {}
|
||||||
|
serializedVersion: 2
|
||||||
|
defaultReferences: []
|
||||||
|
executionOrder: 0
|
||||||
|
icon: {instanceID: 0}
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
@ -0,0 +1,29 @@
|
|||||||
|
using System.Collections;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using UnityEngine;
|
||||||
|
|
||||||
|
namespace Obscurum.Core
|
||||||
|
{
|
||||||
|
public class PlayerInformation : MonoBehaviour
|
||||||
|
{
|
||||||
|
private string playerName;
|
||||||
|
private List<PlayerAchievement> achievemnets = new List<PlayerAchievement>();
|
||||||
|
|
||||||
|
|
||||||
|
public string PlayerName { get { return this.playerName; } }
|
||||||
|
public List<PlayerAchievement> Achievements { get { return this.achievemnets; } }
|
||||||
|
|
||||||
|
// Start is called before the first frame update
|
||||||
|
void Start()
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
// Update is called once per frame
|
||||||
|
void Update()
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
Reference in New Issue
Block a user