mirror of
https://gitee.com/jisol/jisol-game/
synced 2025-09-27 02:36:14 +00:00
提交GAS 打算做一个帧同步的GAS
This commit is contained in:
8
JEX_GAS/Assets/Demo/Scripts/Gen.meta
Normal file
8
JEX_GAS/Assets/Demo/Scripts/Gen.meta
Normal file
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 27ed906aca80d874b9138a6559c7835e
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
@@ -0,0 +1,44 @@
|
||||
///////////////////////////////////
|
||||
//// This is a generated file. ////
|
||||
//// Do not modify it. ////
|
||||
///////////////////////////////////
|
||||
|
||||
using System;
|
||||
using System.Linq;
|
||||
using UnityEngine;
|
||||
|
||||
namespace GAS.Runtime
|
||||
{
|
||||
public static class AbilitySystemComponentExtension
|
||||
{
|
||||
public static Type[] PresetAttributeSetTypes(this AbilitySystemComponent asc)
|
||||
{
|
||||
if (asc.Preset == null) return null;
|
||||
var attrSetTypes = new Type[asc.Preset.AttributeSets.Length];
|
||||
for (var i = 0; i < asc.Preset.AttributeSets.Length; i++)
|
||||
attrSetTypes[i] = GAttrSetLib.AttrSetTypeDict[asc.Preset.AttributeSets[i]];
|
||||
return attrSetTypes;
|
||||
}
|
||||
|
||||
public static GameplayTag[] PresetBaseTags(this AbilitySystemComponent asc)
|
||||
{
|
||||
if (asc.Preset == null) return null;
|
||||
return asc.Preset.BaseTags;
|
||||
}
|
||||
|
||||
public static void InitWithPreset(this AbilitySystemComponent asc, int level, AbilitySystemComponentPreset preset = null)
|
||||
{
|
||||
if (preset != null) asc.SetPreset(preset);
|
||||
if (asc.Preset == null) return;
|
||||
|
||||
#if UNITY_EDITOR
|
||||
if (asc.Preset.BaseAbilities != null && asc.Preset.BaseAbilities.Any(x => x == null))
|
||||
{
|
||||
Debug.LogWarning($"BaseAbilities contains null in preset: {asc.Preset.name}");
|
||||
}
|
||||
#endif
|
||||
|
||||
asc.Init(asc.PresetBaseTags(), asc.PresetAttributeSetTypes(), asc.Preset.BaseAbilities, level);
|
||||
}
|
||||
}
|
||||
}
|
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: a829f1acecbd5d348800bcbf18fb138e
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
18
JEX_GAS/Assets/Demo/Scripts/Gen/GAttrLib.gen.cs
Normal file
18
JEX_GAS/Assets/Demo/Scripts/Gen/GAttrLib.gen.cs
Normal file
@@ -0,0 +1,18 @@
|
||||
///////////////////////////////////
|
||||
//// This is a generated file. ////
|
||||
//// Do not modify it. ////
|
||||
///////////////////////////////////
|
||||
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace GAS.Runtime
|
||||
{
|
||||
public static class GAttrLib
|
||||
{
|
||||
|
||||
// For facilitating the creation of a Value Dropdown in the editor.
|
||||
public static readonly IReadOnlyList<string> AttributeNames = new List<string>
|
||||
{
|
||||
};
|
||||
}
|
||||
}
|
11
JEX_GAS/Assets/Demo/Scripts/Gen/GAttrLib.gen.cs.meta
Normal file
11
JEX_GAS/Assets/Demo/Scripts/Gen/GAttrLib.gen.cs.meta
Normal file
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: d2db3b0427abaab4c9c8ec9df6c351e8
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
25
JEX_GAS/Assets/Demo/Scripts/Gen/GAttrSetLib.gen.cs
Normal file
25
JEX_GAS/Assets/Demo/Scripts/Gen/GAttrSetLib.gen.cs
Normal file
@@ -0,0 +1,25 @@
|
||||
///////////////////////////////////
|
||||
//// This is a generated file. ////
|
||||
//// Do not modify it. ////
|
||||
///////////////////////////////////
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace GAS.Runtime
|
||||
{
|
||||
public static class GAttrSetLib
|
||||
{
|
||||
public static readonly IReadOnlyDictionary<string, Type> AttrSetTypeDict = new Dictionary<string, Type>
|
||||
{
|
||||
};
|
||||
|
||||
public static readonly IReadOnlyDictionary<Type, string> TypeToName = new Dictionary<Type, string>
|
||||
{
|
||||
};
|
||||
|
||||
public static readonly IReadOnlyList<string> AttributeFullNames = new List<string>
|
||||
{
|
||||
};
|
||||
}
|
||||
}
|
11
JEX_GAS/Assets/Demo/Scripts/Gen/GAttrSetLib.gen.cs.meta
Normal file
11
JEX_GAS/Assets/Demo/Scripts/Gen/GAttrSetLib.gen.cs.meta
Normal file
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: e232dda0e81c76c4ba33b4b47af0644a
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
20
JEX_GAS/Assets/Demo/Scripts/Gen/GTagLib.gen.cs
Normal file
20
JEX_GAS/Assets/Demo/Scripts/Gen/GTagLib.gen.cs
Normal file
@@ -0,0 +1,20 @@
|
||||
///////////////////////////////////
|
||||
//// This is a generated file. ////
|
||||
//// Do not modify it. ////
|
||||
///////////////////////////////////
|
||||
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace GAS.Runtime
|
||||
{
|
||||
public static class GTagLib
|
||||
{
|
||||
/// <summary>Ability</summary>
|
||||
public static GameplayTag Ability { get; } = new("Ability");
|
||||
|
||||
public static readonly IReadOnlyDictionary<string, GameplayTag> TagMap = new Dictionary<string, GameplayTag>
|
||||
{
|
||||
["Ability"] = Ability,
|
||||
};
|
||||
}
|
||||
}
|
11
JEX_GAS/Assets/Demo/Scripts/Gen/GTagLib.gen.cs.meta
Normal file
11
JEX_GAS/Assets/Demo/Scripts/Gen/GTagLib.gen.cs.meta
Normal file
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 77b03860d4e223243838914f3e9fee1c
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
Reference in New Issue
Block a user