1
This commit is contained in:
20
Src/Unity/Scripts/MarkSystem/Core/BITKit.MarkSystem.asmdef
Normal file
20
Src/Unity/Scripts/MarkSystem/Core/BITKit.MarkSystem.asmdef
Normal file
@@ -0,0 +1,20 @@
|
||||
{
|
||||
"name": "BITKit.MarkSystem",
|
||||
"rootNamespace": "",
|
||||
"references": [
|
||||
"GUID:14fe60d984bf9f84eac55c6ea033a8f4",
|
||||
"GUID:6ef4ed8ff60a7aa4bb60a8030e6f4008",
|
||||
"GUID:49b49c76ee64f6b41bf28ef951cb0e50",
|
||||
"GUID:f51ebe6a0ceec4240a699833d6309b23",
|
||||
"GUID:d8b63aba1907145bea998dd612889d6b"
|
||||
],
|
||||
"includePlatforms": [],
|
||||
"excludePlatforms": [],
|
||||
"allowUnsafeCode": false,
|
||||
"overrideReferences": false,
|
||||
"precompiledReferences": [],
|
||||
"autoReferenced": true,
|
||||
"defineConstraints": [],
|
||||
"versionDefines": [],
|
||||
"noEngineReferences": false
|
||||
}
|
@@ -0,0 +1,7 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 0b8afac07cb6a864385843f87eaa0e3f
|
||||
AssemblyDefinitionImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
28
Src/Unity/Scripts/MarkSystem/Core/IMarkSystem.cs
Normal file
28
Src/Unity/Scripts/MarkSystem/Core/IMarkSystem.cs
Normal file
@@ -0,0 +1,28 @@
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
|
||||
namespace BITKit.MarkSystem
|
||||
{
|
||||
public interface IMarkObject
|
||||
{
|
||||
public int Id { get; }
|
||||
public Vector3 Position { get; }
|
||||
public object Object { get; }
|
||||
}
|
||||
public interface IMarkSystem
|
||||
{
|
||||
public void Register(IMarkObject markObject);
|
||||
public void UnRegister(IMarkObject markObject);
|
||||
}
|
||||
public class MarkObject : IMarkObject
|
||||
{
|
||||
public override bool Equals(object obj) => obj is MarkObject x && x.Id == Id;
|
||||
public override int GetHashCode() => Id.GetHashCode();
|
||||
private static int count;
|
||||
public int Id { get; } = count++;
|
||||
public Vector3 Position { get; set; }
|
||||
public object Object { get; set; }
|
||||
}
|
||||
}
|
||||
|
11
Src/Unity/Scripts/MarkSystem/Core/IMarkSystem.cs.meta
Normal file
11
Src/Unity/Scripts/MarkSystem/Core/IMarkSystem.cs.meta
Normal file
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 26e45143692a3de45b4efef997c74811
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
Reference in New Issue
Block a user