初始化仓库

This commit is contained in:
SepComet
2026-02-07 19:38:49 +08:00
commit 88641dae11
1540 changed files with 371772 additions and 0 deletions
@@ -0,0 +1,53 @@
//------------------------------------------------------------
// Game Framework
// Copyright © 2013-2021 Jiang Yin. All rights reserved.
// Homepage: https://gameframework.cn/
// Feedback: mailto:ellan@gameframework.cn
//------------------------------------------------------------
using System;
using Definition.Enum;
using StarForce;
using UnityEngine;
namespace Entity.EntityData
{
[Serializable]
public abstract class AccessoryObjectData : EntityDataBase
{
[SerializeField]
private int m_OwnerId = 0;
[SerializeField]
private CampType m_OwnerCamp = CampType.Unknown;
public AccessoryObjectData(int entityId, int typeId, int ownerId, CampType ownerCamp)
: base(entityId, typeId)
{
m_OwnerId = ownerId;
m_OwnerCamp = ownerCamp;
}
/// <summary>
/// 拥有者编号。
/// </summary>
public int OwnerId
{
get
{
return m_OwnerId;
}
}
/// <summary>
/// 拥有者阵营。
/// </summary>
public CampType OwnerCamp
{
get
{
return m_OwnerCamp;
}
}
}
}
@@ -0,0 +1,12 @@
fileFormatVersion: 2
guid: 83cb841b7411a844581691d5547bf866
timeCreated: 1528026151
licenseType: Pro
MonoImporter:
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:
@@ -0,0 +1,71 @@
//------------------------------------------------------------
// Game Framework
// Copyright © 2013-2021 Jiang Yin. All rights reserved.
// Homepage: https://gameframework.cn/
// Feedback: mailto:ellan@gameframework.cn
//------------------------------------------------------------
using System;
using Definition.Enum;
using StarForce;
using UnityEngine;
namespace Entity.EntityData
{
[Serializable]
public class BulletData : EntityDataBase
{
[SerializeField]
private int m_OwnerId = 0;
[SerializeField]
private CampType m_OwnerCamp = CampType.Unknown;
[SerializeField]
private int m_Attack = 0;
[SerializeField]
private float m_Speed = 0f;
public BulletData(int entityId, int typeId, int ownerId, CampType ownerCamp, int attack, float speed)
: base(entityId, typeId)
{
m_OwnerId = ownerId;
m_OwnerCamp = ownerCamp;
m_Attack = attack;
m_Speed = speed;
}
public int OwnerId
{
get
{
return m_OwnerId;
}
}
public CampType OwnerCamp
{
get
{
return m_OwnerCamp;
}
}
public int Attack
{
get
{
return m_Attack;
}
}
public float Speed
{
get
{
return m_Speed;
}
}
}
}
@@ -0,0 +1,12 @@
fileFormatVersion: 2
guid: 16371cc6e2112964d8b5bf7400c862cd
timeCreated: 1528026152
licenseType: Pro
MonoImporter:
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:
@@ -0,0 +1,18 @@
namespace Entity.EntityData
{
public class CoinData : EntityDataBase
{
private int _value;
public CoinData(int value, int entityId, int typeId) : base(entityId, typeId)
{
_value = value;
}
public int Value
{
get => _value;
set => _value = value;
}
}
}
@@ -0,0 +1,3 @@
fileFormatVersion: 2
guid: d9caee22d67a42018113acc77155d6ba
timeCreated: 1770292597
@@ -0,0 +1,33 @@
//------------------------------------------------------------
// Game Framework
// Copyright © 2013-2021 Jiang Yin. All rights reserved.
// Homepage: https://gameframework.cn/
// Feedback: mailto:ellan@gameframework.cn
//------------------------------------------------------------
using System;
using UnityEngine;
namespace Entity.EntityData
{
[Serializable]
public class EffectData : EntityDataBase
{
[SerializeField]
private float m_KeepTime = 0f;
public EffectData(int entityId, int typeId)
: base(entityId, typeId)
{
m_KeepTime = 3f;
}
public float KeepTime
{
get
{
return m_KeepTime;
}
}
}
}
@@ -0,0 +1,12 @@
fileFormatVersion: 2
guid: e5b93dcbe30421a429c196bda0af31ed
timeCreated: 1528026152
licenseType: Pro
MonoImporter:
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:
@@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 611437bd292819b439512f684e13c7e3
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:
@@ -0,0 +1,56 @@
using System;
using DataTable;
using Definition.Enum;
using UnityEngine;
namespace Entity.EntityData
{
[Serializable]
public class EnemyData : TargetableObjectData
{
[SerializeField] private float _speedBase = 0;
[SerializeField] private int _dropCoin = 0;
[SerializeField] private int _dropExp = 0;
[SerializeField] private float _dropPercent = 0;
public EnemyData(int entityId, int typeId) : base(
entityId, typeId, CampType.Enemy)
{
DREnemy enemyRow = GameEntry.DataTable.GetDataTableRow<DREnemy>(typeId);
MaxHealthBase = enemyRow.MaxHealth;
SpeedBase = enemyRow.Speed;
DropCoin = enemyRow.DropCoin;
DropExp = enemyRow.DropExp;
DropPercent = enemyRow.DropPercent;
}
public override int MaxHealthBase { get; }
public float SpeedBase
{
get => _speedBase;
set => _speedBase = value;
}
public int DropCoin
{
get => _dropCoin;
set => _dropCoin = value;
}
public int DropExp
{
get => _dropExp;
set => _dropExp = value;
}
public float DropPercent
{
get => _dropPercent;
set => _dropPercent = value;
}
}
}
@@ -0,0 +1,3 @@
fileFormatVersion: 2
guid: 1b802c30cc274e04929b8659ec631e84
timeCreated: 1768890974
@@ -0,0 +1,62 @@
//------------------------------------------------------------
// Game Framework
// Copyright © 2013-2021 Jiang Yin. All rights reserved.
// Homepage: https://gameframework.cn/
// Feedback: mailto:ellan@gameframework.cn
//------------------------------------------------------------
using System;
using UnityEngine;
namespace Entity.EntityData
{
[Serializable]
public abstract class EntityDataBase
{
[SerializeField]
private int m_Id = 0;
[SerializeField]
private int m_TypeId = 0;
[SerializeField]
private Vector3 m_Position = Vector3.zero;
[SerializeField]
private Quaternion m_Rotation = Quaternion.identity;
public EntityDataBase(int entityId, int typeId)
{
m_Id = entityId;
m_TypeId = typeId;
}
/// <summary>
/// 实体编号。
/// </summary>
public int Id => m_Id;
/// <summary>
/// 实体类型编号。
/// </summary>
public int TypeId => m_TypeId;
/// <summary>
/// 实体位置。
/// </summary>
public Vector3 Position
{
get => m_Position;
set => m_Position = value;
}
/// <summary>
/// 实体朝向。
/// </summary>
public Quaternion Rotation
{
get => m_Rotation;
set => m_Rotation = value;
}
}
}
@@ -0,0 +1,12 @@
fileFormatVersion: 2
guid: afb91fe3ed8105e4a96b7bd5917ecc2b
timeCreated: 1528026152
licenseType: Pro
MonoImporter:
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:
@@ -0,0 +1,18 @@
namespace Entity.EntityData
{
public class ExpData : EntityDataBase
{
private int _value;
public ExpData(int value, int entityId, int typeId) : base(entityId, typeId)
{
_value = value;
}
public int Value
{
get => _value;
set => _value = value;
}
}
}
@@ -0,0 +1,3 @@
fileFormatVersion: 2
guid: e0f6c8e117da49f1ad04fd8810882043
timeCreated: 1770292932
@@ -0,0 +1,19 @@
using System;
using DataTable;
using Definition.Enum;
namespace Entity.EntityData
{
[Serializable]
public class PlayerData : TargetableObjectData
{
private int _maxExp;
public PlayerData(int entityId, int typeId) : base(entityId, typeId, CampType.Player)
{
MaxHealthBase = MaxHealthBase;
}
public override int MaxHealthBase { get; }
}
}
@@ -0,0 +1,3 @@
fileFormatVersion: 2
guid: b69d3168ac4f442994f8dc4d906daa60
timeCreated: 1768890638
@@ -0,0 +1,40 @@
//------------------------------------------------------------
// Game Framework
// Copyright © 2013-2021 Jiang Yin. All rights reserved.
// Homepage: https://gameframework.cn/
// Feedback: mailto:ellan@gameframework.cn
//------------------------------------------------------------
using System;
using Definition.Enum;
using StarForce;
using UnityEngine;
namespace Entity.EntityData
{
[Serializable]
public abstract class TargetableObjectData : EntityDataBase
{
[SerializeField]
private CampType _camp = CampType.Unknown;
public TargetableObjectData(int entityId, int typeId, CampType camp)
: base(entityId, typeId)
{
_camp = camp;
}
/// <summary>
/// 角色阵营。
/// </summary>
public CampType Camp => _camp;
/// <summary>
/// 最大生命。
/// </summary>
public abstract int MaxHealthBase
{
get;
}
}
}
@@ -0,0 +1,12 @@
fileFormatVersion: 2
guid: f866c15cf3f2a45429251d4a66f70c77
timeCreated: 1528026152
licenseType: Pro
MonoImporter:
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:
@@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: d8b2591453b7f0841940c8e45528f465
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:
@@ -0,0 +1,49 @@
using System;
using DataTable;
using Definition.DataStruct;
using Definition.Enum;
namespace Entity.EntityData
{
[Serializable]
public class WeaponData : AccessoryObjectData
{
private DRWeapon _drWeapon;
public WeaponData(int entityId, int typeId, int ownerId, CampType ownerCamp)
: base(entityId, typeId, ownerId, ownerCamp)
{
_drWeapon = GameEntry.DataTable.GetDataTableRow<DRWeapon>(TypeId);
}
/// <summary>
/// 攻击力。
/// </summary>
public int Attack => _drWeapon.Attack;
/// <summary>
/// 攻击间隔。
/// </summary>
public float Cooldown => _drWeapon.Cooldown;
/// <summary>
/// 攻击范围。
/// </summary>
public float AttackRange => _drWeapon.AttackRange;
/// <summary>
/// 攻击音效。
/// </summary>
public int AttackSoundId => _drWeapon.AttackSoundId;
/// <summary>
/// 额外参数。
/// </summary>
public string Params => _drWeapon.Pramas;
/// <summary>
/// 额外属性。
/// </summary>
public StatModifier[] Modifiers => _drWeapon.Modifiers;
}
}
@@ -0,0 +1,12 @@
fileFormatVersion: 2
guid: e813e3219579f834d8e619c17a8083d4
timeCreated: 1528026153
licenseType: Pro
MonoImporter:
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:
@@ -0,0 +1,12 @@
using Definition.Enum;
namespace Entity.EntityData
{
public class WeaponKnifeData : WeaponData
{
public WeaponKnifeData(int entityId, int typeId, int ownerId, CampType ownerCamp) : base(entityId, typeId,
ownerId, ownerCamp)
{
}
}
}
@@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: da25d8e0669f0194d8f56f4283c67b38
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant: