Compare commits

...

2 Commits

Author SHA1 Message Date
MarcoHampel
25e519839e Item Interface Devleoped
Interface for item developed. May change
2023-09-11 20:27:23 -04:00
MarcoHampel
7aecaf3801 Created basic framework for Core.
Designed basic classes and documented basic purpose statements and outline for each class/function.
2023-09-11 20:11:32 -04:00
13 changed files with 200 additions and 38 deletions

View File

@ -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()
{
}
}
}

View File

@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: a45f2b9aa05729f43904a395d6ef0255
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@ -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()
{
}
}
}

View 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()
{
}
}
}

View File

@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: 4904e6df255f0024281e023b719fa592
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@ -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()
{ {

View File

@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: fe57ad92038744748871f5df1a088607
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@ -2,10 +2,10 @@ 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()
{ {
@ -18,5 +18,4 @@ namespace Obscurum.Core{
} }
} }
} }

View File

@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: 5769891d81ba7c444bb21e52a8622468
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@ -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()
{
}
}
}

View File

@ -3,19 +3,41 @@ using System.Collections.Generic;
using UnityEngine; using UnityEngine;
namespace Obscurum.Items{ namespace Obscurum.Items{
public class GameItem : MonoBehaviour public interface GameItem
{
// Start is called before the first frame update
void Start()
{ {
//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()
{
}
}
} }