合并代码
This commit is contained in:
@@ -0,0 +1,35 @@
|
||||
using System;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
|
||||
public class AssetsPlate : ModuleAssets<DataPlate> {
|
||||
private List<DataPlate> dataPlates = new List<DataPlate>();
|
||||
|
||||
/// <summary> 视图相机模块 </summary>
|
||||
private ModuleViewCamera ViewCameraDesign => ModuleCore.ViewCameraDesign;
|
||||
|
||||
public override int Count => dataPlates.Count;
|
||||
public override List<DataPlate> Datas => dataPlates;
|
||||
|
||||
protected override void Awake() => ModuleCore.AssetsPlate = this;
|
||||
|
||||
public override void Add(DataPlate data) {
|
||||
if (dataPlates.Contains(data)) { return; }
|
||||
dataPlates.Add(data);
|
||||
//初始化参数
|
||||
data.position = ViewCameraDesign.position;
|
||||
//生成可视化内容
|
||||
data.UpdateVisual();
|
||||
}
|
||||
public override void Remove(DataPlate data) {
|
||||
if (!dataPlates.Contains(data)) { return; }
|
||||
dataPlates.Remove(data);
|
||||
}
|
||||
public override DataPlate Find(int index) {
|
||||
return dataPlates.LoopIndex(index);
|
||||
}
|
||||
public override void ForEach(Action<DataPlate> action) {
|
||||
dataPlates.ForEach(action);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: f1f4341af37c4904b8274f65dd58e837
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,18 @@
|
||||
using System;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
|
||||
public class AssetsPlatePresets : ModuleAssets<DataPlatePresets> {
|
||||
[SerializeField] private List<DataPlatePresets> assets;
|
||||
|
||||
public override int Count => assets.Count;
|
||||
public override List<DataPlatePresets> Datas => assets;
|
||||
|
||||
protected override void Awake() => ModuleCore.AssetsPlatePresets = this;
|
||||
|
||||
public override void Add(DataPlatePresets data) => assets.Add(data);
|
||||
public override void Remove(DataPlatePresets data) => assets.Remove(data);
|
||||
public override DataPlatePresets Find(int index) => assets.LoopIndex(index);
|
||||
public override void ForEach(Action<DataPlatePresets> action) => assets.ForEach(action);
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 321aee0b32d39984085ac96e402e9c0b
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
Reference in New Issue
Block a user