更改文件架构

This commit is contained in:
CortexCore
2023-06-07 18:38:07 +08:00
parent 93292b1a59
commit ed84166723
720 changed files with 297 additions and 65 deletions

View File

@@ -0,0 +1,20 @@
{
"name": "BITKit.NetworkItem",
"rootNamespace": "",
"references": [
"GUID:1491147abca9d7d4bb7105af628b223e",
"GUID:28c2d6a6727d47442a24a353f0d37846",
"GUID:a209c53514018594f9f482516f2a6781"
],
"includePlatforms": [],
"excludePlatforms": [],
"allowUnsafeCode": false,
"overrideReferences": false,
"precompiledReferences": [],
"autoReferenced": true,
"defineConstraints": [
"NetCode"
],
"versionDefines": [],
"noEngineReferences": false
}

View File

@@ -0,0 +1,7 @@
fileFormatVersion: 2
guid: 608effe7cbdd4594f909d4e38fb2367d
AssemblyDefinitionImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,30 @@
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using BITKit;
namespace BITKit.Item
{
public enum ItemQuality
{
Common,
Uncommon,
Rare,
Epic,
Legendary,
Mythical,
}
public class ItemSO : BITKitSO
{
public string itemName;
public string description;
public int id;
public ItemQuality quality;
void OnValidate()
{
if (id is 0)
{
id = System.Guid.NewGuid().GetHashCode();
}
}
}
}

View File

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

View File

@@ -0,0 +1,13 @@
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using Unity.Netcode;
namespace BITKit.Item
{
public class NetworkCheckable : NetworkBehaviour, ICheckable
{
public ItemSO so;
public string GetDescription() => so.description;
public string GetName() => so.itemName;
}
}

View File

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

View File

@@ -0,0 +1,14 @@
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using Unity.Netcode;
namespace BITKit.Item
{
public class NetworkItem : NetworkBehaviour, IAction
{
public void Excute()
{
NetworkObject.Despawn();
}
}
}

View File

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