geometry-tower-defense/Assets/GameMain/Scripts/DataTable/DRUIForm.cs

120 lines
3.3 KiB
C#
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

//------------------------------------------------------------
// Game Framework
// Copyright © 2013-2021 Jiang Yin. All rights reserved.
// Homepage: https://gameframework.cn/
// Feedback: mailto:ellan@gameframework.cn
//------------------------------------------------------------
// 此文件由工具自动生成,请勿直接修改。
// 生成时间2021-06-16 21:54:35.652
//------------------------------------------------------------
using GameFramework;
using System;
using System.Collections.Generic;
using System.IO;
using System.Text;
using UnityEngine;
using UnityGameFramework.Runtime;
namespace GeometryTD.DataTable
{
/// <summary>
/// 界面配置表。
/// </summary>
public class DRUIForm : DataRowBase
{
private int m_Id = 0;
/// <summary>
/// 获取界面编号。
/// </summary>
public override int Id
{
get
{
return m_Id;
}
}
/// <summary>
/// 获取资源名称。
/// </summary>
public string AssetName
{
get;
private set;
}
/// <summary>
/// 获取界面组名称。
/// </summary>
public string UIGroupName
{
get;
private set;
}
/// <summary>
/// 获取是否允许多个界面实例。
/// </summary>
public bool AllowMultiInstance
{
get;
private set;
}
/// <summary>
/// 获取是否暂停被其覆盖的界面。
/// </summary>
public bool PauseCoveredUIForm
{
get;
private set;
}
public override bool ParseDataRow(string dataRowString, object userData)
{
string[] columnStrings = dataRowString.Split(DataTableExtension.DataSplitSeparators);
for (int i = 0; i < columnStrings.Length; i++)
{
columnStrings[i] = columnStrings[i].Trim(DataTableExtension.DataTrimSeparators);
}
int index = 0;
index++;
m_Id = int.Parse(columnStrings[index++]);
index++;
AssetName = columnStrings[index++];
UIGroupName = columnStrings[index++];
AllowMultiInstance = bool.Parse(columnStrings[index++]);
PauseCoveredUIForm = bool.Parse(columnStrings[index++]);
GeneratePropertyArray();
return true;
}
public override bool ParseDataRow(byte[] dataRowBytes, int startIndex, int length, object userData)
{
using (MemoryStream memoryStream = new MemoryStream(dataRowBytes, startIndex, length, false))
{
using (BinaryReader binaryReader = new BinaryReader(memoryStream, Encoding.UTF8))
{
m_Id = binaryReader.Read7BitEncodedInt32();
AssetName = binaryReader.ReadString();
UIGroupName = binaryReader.ReadString();
AllowMultiInstance = binaryReader.ReadBoolean();
PauseCoveredUIForm = binaryReader.ReadBoolean();
}
}
GeneratePropertyArray();
return true;
}
private void GeneratePropertyArray()
{
}
}
}