添加光环
This commit is contained in:
parent
defe94034b
commit
1983cf8df5
|
|
@ -191,6 +191,18 @@ class _AssetManager_ {
|
||||||
Ret = Data.Get();
|
Ret = Data.Get();
|
||||||
DataTable.type.index <- Ret.tointeger();
|
DataTable.type.index <- Ret.tointeger();
|
||||||
}
|
}
|
||||||
|
//光环效果
|
||||||
|
else if (Pack == "[aurora graphic effects]") {
|
||||||
|
DataTable.aurora_effects <- [];
|
||||||
|
local Count = Data.Get();
|
||||||
|
for (local i = 0; i< Count; i++) {
|
||||||
|
local T = {
|
||||||
|
type = Data.Get(),
|
||||||
|
path = Data.Get().tolower()
|
||||||
|
}
|
||||||
|
DataTable.aurora_effects.push(T);
|
||||||
|
}
|
||||||
|
}
|
||||||
//Ani
|
//Ani
|
||||||
else if (Pack == "[animation job]") {
|
else if (Pack == "[animation job]") {
|
||||||
local Job = Data.Get().slice(1, -1);
|
local Job = Data.Get().slice(1, -1);
|
||||||
|
|
|
||||||
|
|
@ -50,6 +50,9 @@ class Character_Animation extends Actor {
|
||||||
//普通攻击Ani
|
//普通攻击Ani
|
||||||
AttackAni = null;
|
AttackAni = null;
|
||||||
|
|
||||||
|
//光环
|
||||||
|
AuroraAni = null;
|
||||||
|
|
||||||
constructor() {
|
constructor() {
|
||||||
base.constructor();
|
base.constructor();
|
||||||
|
|
||||||
|
|
@ -57,7 +60,6 @@ class Character_Animation extends Actor {
|
||||||
|
|
||||||
//同步单部位动画
|
//同步单部位动画
|
||||||
function SyncAnimationBySlot(Type, AniObj, Src) {
|
function SyncAnimationBySlot(Type, AniObj, Src) {
|
||||||
|
|
||||||
this[AniObj][Type] <- [];
|
this[AniObj][Type] <- [];
|
||||||
|
|
||||||
//如果有时装就初始化Ani
|
//如果有时装就初始化Ani
|
||||||
|
|
@ -113,8 +115,6 @@ class Character_Animation extends Actor {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return this[AniObj][Type];
|
|
||||||
}
|
}
|
||||||
|
|
||||||
//读取并设置Ani
|
//读取并设置Ani
|
||||||
|
|
@ -275,6 +275,30 @@ class Character_Animation extends Actor {
|
||||||
// ReadAndSetAttackAni();
|
// ReadAndSetAttackAni();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function InitAuroa() {
|
||||||
|
//光环
|
||||||
|
local Info = Parent.aurora;
|
||||||
|
//如果有光环
|
||||||
|
if (AuroraAni) {
|
||||||
|
foreach(Ani in AuroraAni) {
|
||||||
|
Removechild(Ani);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
AuroraAni = [];
|
||||||
|
|
||||||
|
foreach(Effect in Info.Aurora_effects) {
|
||||||
|
local AniBuf = Animation(Effect.path);
|
||||||
|
AuroraAni.append(AniBuf);
|
||||||
|
Addchild(AniBuf);
|
||||||
|
//front
|
||||||
|
if (Effect.type == 1) {
|
||||||
|
AniBuf.SetZOrder(100000);
|
||||||
|
} else {
|
||||||
|
AniBuf.SetZOrder(-100000);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
//设置Ani
|
//设置Ani
|
||||||
function SetAnimation(Ani) {
|
function SetAnimation(Ani) {
|
||||||
|
|
@ -295,7 +319,7 @@ class Character_Animation extends Actor {
|
||||||
CurrentAni = this[Ani];
|
CurrentAni = this[Ani];
|
||||||
}
|
}
|
||||||
//重置Ani 并添加子对象
|
//重置Ani 并添加子对象
|
||||||
foreach(AniGroup in CurrentAni) {
|
foreach(Key, AniGroup in CurrentAni) {
|
||||||
foreach(AniObj in AniGroup) {
|
foreach(AniObj in AniGroup) {
|
||||||
AniObj.Reset();
|
AniObj.Reset();
|
||||||
Addchild(AniObj);
|
Addchild(AniObj);
|
||||||
|
|
|
||||||
|
|
@ -27,6 +27,8 @@ class GameItem.Equipment extends GameItem.Item {
|
||||||
Description = "";
|
Description = "";
|
||||||
//文件路径
|
//文件路径
|
||||||
DirPath = null;
|
DirPath = null;
|
||||||
|
//光环特效
|
||||||
|
Aurora_effects = null;
|
||||||
|
|
||||||
//装备属性
|
//装备属性
|
||||||
Property = null;
|
Property = null;
|
||||||
|
|
@ -51,6 +53,7 @@ class GameItem.Equipment extends GameItem.Item {
|
||||||
if (EquInfo.rawin("icon")) Icon = EquInfo["icon"];
|
if (EquInfo.rawin("icon")) Icon = EquInfo["icon"];
|
||||||
if (EquInfo.rawin("Ani")) Animation_Job = EquInfo["Ani"];
|
if (EquInfo.rawin("Ani")) Animation_Job = EquInfo["Ani"];
|
||||||
if (EquInfo.rawin("DirPath")) DirPath = EquInfo["DirPath"];
|
if (EquInfo.rawin("DirPath")) DirPath = EquInfo["DirPath"];
|
||||||
|
if (EquInfo.rawin("aurora_effects")) Aurora_effects = EquInfo["aurora_effects"];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -73,6 +76,7 @@ class GameItem.Equipment extends GameItem.Item {
|
||||||
else if (EType == "shoes avatar") SetRealEquipmentType("shoes", "avatar");
|
else if (EType == "shoes avatar") SetRealEquipmentType("shoes", "avatar");
|
||||||
else if (EType == "breast avatar") SetRealEquipmentType("breast", "avatar");
|
else if (EType == "breast avatar") SetRealEquipmentType("breast", "avatar");
|
||||||
else if (EType == "face avatar") SetRealEquipmentType("face", "avatar");
|
else if (EType == "face avatar") SetRealEquipmentType("face", "avatar");
|
||||||
|
else if (EType == "aurora avatar") SetRealEquipmentType("aurora", "aurora");
|
||||||
}
|
}
|
||||||
|
|
||||||
//穿戴装备回调
|
//穿戴装备回调
|
||||||
|
|
|
||||||
|
|
@ -16,6 +16,7 @@ class GameObject.Character extends GameObject.ActiveObject {
|
||||||
pants = null; //下装
|
pants = null; //下装
|
||||||
shoes = null; //鞋子
|
shoes = null; //鞋子
|
||||||
weapon = null; //武器
|
weapon = null; //武器
|
||||||
|
aurora = null; //光环
|
||||||
|
|
||||||
//动画对象管理器
|
//动画对象管理器
|
||||||
AnimationManager = null;
|
AnimationManager = null;
|
||||||
|
|
@ -100,6 +101,8 @@ class GameObject.Character extends GameObject.ActiveObject {
|
||||||
//如果是武器或者时装则同步动画
|
//如果是武器或者时装则同步动画
|
||||||
if (Equ.SlotType == "weapon" || Equ.Type == "avatar") {
|
if (Equ.SlotType == "weapon" || Equ.Type == "avatar") {
|
||||||
AnimationManager.Init(Equ.SlotType);
|
AnimationManager.Init(Equ.SlotType);
|
||||||
|
} else if (Equ.Type == "aurora") {
|
||||||
|
AnimationManager.InitAuroa();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
//切换装备列表
|
//切换装备列表
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue