Compare commits
2 Commits
58df07ab79
...
25e519839e
Author | SHA1 | Date | |
---|---|---|---|
|
25e519839e | ||
|
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{
|
||||
|
||||
/// <summary>
|
||||
/// Stores/Manages information about the current multiplayer session.
|
||||
/// </summary>
|
||||
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
|
||||
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 UnityEngine;
|
||||
|
||||
namespace Obscurum.Core{
|
||||
public class PlayerInformation : MonoBehaviour
|
||||
namespace Obscurum.Core
|
||||
{
|
||||
public class PlayerAchievement
|
||||
{
|
||||
|
||||
// Start is called before the first frame update
|
||||
void Start()
|
||||
{
|
||||
|
||||
|
||||
}
|
||||
|
||||
// Update is called once per frame
|
||||
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()
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
}
|
@ -3,19 +3,41 @@ using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
|
||||
namespace Obscurum.Items{
|
||||
public class GameItem : MonoBehaviour
|
||||
{
|
||||
// Start is called before the first frame update
|
||||
void Start()
|
||||
public interface GameItem
|
||||
{
|
||||
//TODO: May want to rename ItemType enumations based on practical application: 1. InventoryItem, 2. CarryableItem, 3. InteractiveItem. This would ensure
|
||||
//inventory items on interact would enter inventory, carryable items on interact go to carry, and interactive items call an event function at once.
|
||||
|
||||
/// <summary>
|
||||
/// Item name.
|
||||
/// </summary>
|
||||
public string Name { get; }
|
||||
|
||||
/// <summary>
|
||||
/// Item description.
|
||||
/// </summary>
|
||||
public string Description { get; }
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Specifies if an item can be held in the player inventory, must be carried with the carry animation, or executes some effect immediately.
|
||||
/// <list type="bullet">
|
||||
/// <item>UTILITY: Can be carried in inventory.</item>
|
||||
/// <item>WEAPON: Must be carried with the carry animation.</item>
|
||||
/// <item>CONSUMABLE: Executes some effect on interact.</item>
|
||||
/// </list>
|
||||
/// </summary>
|
||||
public enum ItemType {UTILITY, WEAPON, CONSUMABLE};
|
||||
|
||||
/// <summary>
|
||||
/// Gets the collection type for this game item.
|
||||
/// </summary>
|
||||
public ItemType Type { get; }
|
||||
|
||||
//When player interacts with this item apply effect.
|
||||
// public bool Interact();
|
||||
|
||||
|
||||
}
|
||||
|
||||
// Update is called once per frame
|
||||
void Update()
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
Reference in New Issue
Block a user