Compare commits

..

No commits in common. "6e72ab43103a144f70f3cc43f20828b0f60ebf2f" and "72684885d52d240ac662d4eec7a4c1356cfa7a42" have entirely different histories.

20 changed files with 75 additions and 159 deletions

3
.gitignore vendored
View File

@ -2,5 +2,4 @@ ImagePacks2/
SoundPacks/ SoundPacks/
Yosin_Game_Reloading.Sign Yosin_Game_Reloading.Sign
Script.pvf Script.pvf
Yosin_Engine.pdb Yosin_Engine.pdb
*.pvf

Binary file not shown.

View File

@ -11,14 +11,10 @@ class Animation extends Actor {
//当前帧数 //当前帧数
CurrentFrameIndex = 0; CurrentFrameIndex = 0;
//总帧数
TotalFrameIndex = 0;
//当前帧时间 //当前帧时间
CurrentIndexT = 0; CurrentIndexT = 0;
//当前帧 //当前帧
CurrentFrame = null; CurrentFrame = null;
//下帧延迟
NextFrameDelay = 9999999;
//状态机对象(只有存在时才有KeyFlag) //状态机对象(只有存在时才有KeyFlag)
StateMachine = null; StateMachine = null;
@ -106,25 +102,22 @@ class Animation extends Actor {
AnimationFlag = Buf.Flag; AnimationFlag = Buf.Flag;
FrameArr = Buf.Frame; FrameArr = Buf.Frame;
foreach(FrameObj in FrameArr) { foreach(FrameObj in FrameArr) {
local Spritebuf; //如果有附加处理 格式化
//img路径判空 if (AdditionalOptions && AdditionalOptions.rawin("ImgFormat")) FrameObj.Img_Path = AdditionalOptions["ImgFormat"](FrameObj.Img_Path);
if (FrameObj.Img_Path) {
//如果有附加处理 格式化
if (AdditionalOptions && AdditionalOptions.rawin("ImgFormat")) FrameObj.Img_Path = AdditionalOptions["ImgFormat"](FrameObj.Img_Path);
Spritebuf = CL_SpriteObject("sprite/" + FrameObj.Img_Path, FrameObj.Img_Index); local SpriteFramebuf = CL_SpriteFrameObject("sprite/" + FrameObj.Img_Path, FrameObj.Img_Index);
local Spritebuf = CL_SpriteObject();
Spritebuf.SetFrame(SpriteFramebuf);
//线性减淡 //线性减淡
if ("GRAPHIC_EFFECT_LINEARDODGE" in FrameObj.Flag) { if ("GRAPHIC_EFFECT_LINEARDODGE" in FrameObj.Flag) {
Spritebuf.SetMode(0); Spritebuf.SetMode(0);
}
//坐标
Spritebuf.SetPosition(FrameObj.Pos);
} else {
Spritebuf = CL_SpriteObject();
} }
//坐标
Spritebuf.SetPosition(FrameObj.Pos);
SpriteArr.append(Spritebuf); SpriteArr.append(Spritebuf);
} }
@ -134,13 +127,10 @@ class Animation extends Actor {
//初始化完毕 如果是第一次初始化 而非重新构造 设置大小为第0帧大小否则天空 地板等依靠大小的初始化会有问题 //初始化完毕 如果是第一次初始化 而非重新构造 设置大小为第0帧大小否则天空 地板等依靠大小的初始化会有问题
if (CurrentIndexT == 0) SetSize(SpriteArr[0].GetSize()); if (CurrentIndexT == 0) SetSize(SpriteArr[0].GetSize());
//记录总帧数
TotalFrameIndex = FrameArr.len();
} }
//被添加时 要刷新一下当前帧 //被添加时 要刷新一下当前帧
function OnAddchild(Parent) { function OnAddchild(Parent) {
base.OnAddchild(Parent);
FlushFrame(0); FlushFrame(0);
} }
@ -169,9 +159,7 @@ class Animation extends Actor {
CurrentFrame = SpriteArr[CurrentFrameIndex]; CurrentFrame = SpriteArr[CurrentFrameIndex];
Addchild(SpriteArr[CurrentFrameIndex]); Addchild(SpriteArr[CurrentFrameIndex]);
local FrameInfo = FrameArr[CurrentFrameIndex]; local FlagBuf = FrameArr[CurrentFrameIndex].Flag;
local FlagBuf = FrameInfo.Flag;
NextFrameDelay = FrameInfo.Delay;
//关键帧 //关键帧
if ("SET_FLAG" in FlagBuf) { if ("SET_FLAG" in FlagBuf) {
if (StateMachine && StateMachine.State != -1) StateMachine.ChangeAniKeyFlag(FlagBuf.SET_FLAG); if (StateMachine && StateMachine.State != -1) StateMachine.ChangeAniKeyFlag(FlagBuf.SET_FLAG);
@ -191,16 +179,17 @@ class Animation extends Actor {
//override //override
function OnUpdate(dt) { function OnUpdate(dt) {
//可用性检查 //可用性检查
if (IsUsability) { if (IsUsability) {
//累加当前帧时间 //累加当前帧时间
CurrentIndexT += dt; CurrentIndexT += dt;
//当前帧时间 超过 当前帧延迟就需要切换帧了 //当前帧时间 超过 当前帧延迟就需要切换帧了
if (CurrentIndexT >= NextFrameDelay) { if (CurrentIndexT >= FrameArr[CurrentFrameIndex].Delay) {
CurrentIndexT = 0; CurrentIndexT = 0;
//如果当前帧小于总帧数就切换 //如果当前帧小于总帧数就切换
if (CurrentFrameIndex<(TotalFrameIndex - 1)) { if (CurrentFrameIndex<(FrameArr.len() - 1)) {
FlushFrame(CurrentFrameIndex + 1); FlushFrame(CurrentFrameIndex + 1);
} }
//说明播放完毕了 //说明播放完毕了
@ -217,8 +206,10 @@ class Animation extends Actor {
} }
} }
} }
} }
//Animation类下只会有精灵 因此不需要对子对象进行更新
// base.OnUpdate(dt); base.OnUpdate(dt);
} }
} }

View File

@ -20,8 +20,6 @@ class CL_BaseObject {
Var = null; Var = null;
//销毁状态 //销毁状态
DestroyFlag = false; DestroyFlag = false;
//不需要Update函数
NoUpdate = false;
constructor(C_Object, ...) { constructor(C_Object, ...) {
Children = {}; Children = {};
@ -38,7 +36,6 @@ class CL_BaseObject {
//被调用 //被调用
function OnUpdate(dt) { function OnUpdate(dt) {
if (NoUpdate) return;
ExistingTime += dt; ExistingTime += dt;
//如果CallBack函数存在则调用 //如果CallBack函数存在则调用
@ -67,7 +64,12 @@ class CL_BaseObject {
//添加子对象 //添加子对象
function Addchild(Child) { function Addchild(Child) {
Children[Child.GetId()] <- Child;
Child.Parent = this.weakref();
//给自己解引用计数
Child.OnAddchild(this); Child.OnAddchild(this);
BaseObject_Addchild(this.C_Object, Child.C_Object);
} }
//移除子对象 //移除子对象
function Removechild(Child) { function Removechild(Child) {
@ -86,10 +88,8 @@ class CL_BaseObject {
} }
//被添加 //被添加
function OnAddchild(ParentObj) { function OnAddchild(Parent) {
ParentObj.Children[GetId()] <- this;
this.Parent = ParentObj.weakref();
BaseObject_Addchild(ParentObj.C_Object, this.C_Object);
} }
//被移除 //被移除
function OnRemove(Parent) { function OnRemove(Parent) {

View File

@ -19,9 +19,6 @@ class Layer extends Actor {
//设置图层裁剪区域 //设置图层裁剪区域
function SetClipRect(x, y, w, h) { function SetClipRect(x, y, w, h) {
if (!IsLayer) {
print("SetClipRect:窗口不是图层窗口");
}
LayerActor_SetClipRect(this.C_Object, x, y, w, h); LayerActor_SetClipRect(this.C_Object, x, y, w, h);
} }

View File

@ -189,12 +189,12 @@ function InitPvfAni(Ro) {
//调用的第几个Img //调用的第几个Img
local Index_Buf = Ro.GetShort(); local Index_Buf = Ro.GetShort();
//如果等于-1说明是img路径为空 //如果等于-1说明是img路径为空
if (Index_Buf != -1) { if (Index_Buf != 65535) {
FrameObject.Img_Path <- AniObject.Img_List[Index_Buf].tolower(); FrameObject.Img_Path <- AniObject.Img_List[Index_Buf].tolower();
//Img中的PNG下标 //Img中的PNG下标
FrameObject.Img_Index <- Ro.GetUShort(); FrameObject.Img_Index <- Ro.GetUShort();
} else { } else {
FrameObject.Img_Path <- null; FrameObject.Img_Path <- "";
FrameObject.Img_Index <- 0; FrameObject.Img_Index <- 0;
} }

View File

@ -6,14 +6,12 @@
*/ */
class CL_SpriteFrameObject extends CL_BaseObject { class CL_SpriteFrameObject extends CL_BaseObject {
ImgPath = null;
ImgIndex = null;
constructor(...) { constructor(...) {
if (vargv.len() == 2) { if (vargv.len() == 2) {
ImgPath = vargv[0]; local Path = vargv[0];
ImgIndex = vargv[1]; local Index = vargv[1];
C_Object = SpriteFrame_Create(ImgPath, ImgIndex); C_Object = SpriteFrame_Create(Path, Index);
} else { } else {
C_Object = vargv[0]; C_Object = vargv[0];
} }

View File

@ -319,19 +319,20 @@ class Math {
} }
function sq_GetAccel(sv, ev, currentRate, maxRate, increaseFeature) { function sq_GetAccel(sv, ev, currentRate, maxRate, increaseFeature) {
local rate = currentRate.tofloat() / maxRate.tofloat(); local rate = currentRate.tofloat() / maxRate.tofloat();
local varyValue = ev - sv; local varyValue = ev - sv;
local increaseRate = 1.0; local increaseRate = 1.0;
if (increaseFeature) { if (increaseFeature) {
increaseRate = pow(50, rate) / 50; //慢->快 increaseRate = pow(50, rate) / 50; //慢->快
} else { } else {
// 修正后的减速逻辑计算,例如采用线性变换结合幂次运算来实现更合理的减速效果 increaseRate = pow(rate, 0.05);
// 先将rate映射到一个更合适的范围这里从[0,1]映射到[0.1, 1],可调整)
local mappedRate = rate * 0.9 + 0.1;
increaseRate = pow(mappedRate, 2); // 幂次可调整这里取2来让减速更明显可根据实际情况修改
} }
return sv + varyValue * increaseRate; return sv + varyValue * increaseRate;
} }

View File

@ -184,9 +184,6 @@ class Yosin_Window extends Yosin_BaseWindow {
//是否为独立窗口 //是否为独立窗口
IsIndependent = true; IsIndependent = true;
//是否为图层窗口
IsLayer = false;
constructor(gObjectId, gX, gY, gWidth, gHeight, gTitleH) { constructor(gObjectId, gX, gY, gWidth, gHeight, gTitleH) {
ObjectId = gObjectId; ObjectId = gObjectId;
//宽度 //宽度
@ -202,7 +199,7 @@ class Yosin_Window extends Yosin_BaseWindow {
Y = gY; Y = gY;
//调用原生方法 //调用原生方法
base.constructor(IsLayer); base.constructor(true);
SetSize(Width, Height); SetSize(Width, Height);
SyncPos(X, Y); SyncPos(X, Y);

View File

@ -69,5 +69,4 @@ sqr/User/UI/Window/1_Select_Character.nut
sqr/User/UI/Window/2_create_Character.nut sqr/User/UI/Window/2_create_Character.nut
sqr/User/UI/Window/233_HUD_Message.nut sqr/User/UI/Window/233_HUD_Message.nut
sqr/User/main.nut sqr/User/main.nut

View File

@ -191,18 +191,6 @@ 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);

View File

@ -50,9 +50,6 @@ class Character_Animation extends Actor {
//普通攻击Ani //普通攻击Ani
AttackAni = null; AttackAni = null;
//光环
AuroraAni = null;
constructor() { constructor() {
base.constructor(); base.constructor();
@ -60,6 +57,7 @@ class Character_Animation extends Actor {
//同步单部位动画 //同步单部位动画
function SyncAnimationBySlot(Type, AniObj, Src) { function SyncAnimationBySlot(Type, AniObj, Src) {
this[AniObj][Type] <- []; this[AniObj][Type] <- [];
//如果有时装就初始化Ani //如果有时装就初始化Ani
@ -115,6 +113,8 @@ class Character_Animation extends Actor {
} }
} }
} }
return this[AniObj][Type];
} }
//读取并设置Ani //读取并设置Ani
@ -275,30 +275,6 @@ 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) {
@ -319,7 +295,7 @@ class Character_Animation extends Actor {
CurrentAni = this[Ani]; CurrentAni = this[Ani];
} }
//重置Ani 并添加子对象 //重置Ani 并添加子对象
foreach(Key, AniGroup in CurrentAni) { foreach(AniGroup in CurrentAni) {
foreach(AniObj in AniGroup) { foreach(AniObj in AniGroup) {
AniObj.Reset(); AniObj.Reset();
Addchild(AniObj); Addchild(AniObj);

View File

@ -27,8 +27,6 @@ class GameItem.Equipment extends GameItem.Item {
Description = ""; Description = "";
//文件路径 //文件路径
DirPath = null; DirPath = null;
//光环特效
Aurora_effects = null;
//装备属性 //装备属性
Property = null; Property = null;
@ -53,7 +51,6 @@ 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"];
} }
} }
} }
@ -76,7 +73,6 @@ 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");
} }
//穿戴装备回调 //穿戴装备回调

View File

@ -16,7 +16,6 @@ class GameObject.Character extends GameObject.ActiveObject {
pants = null; //下装 pants = null; //下装
shoes = null; //鞋子 shoes = null; //鞋子
weapon = null; //武器 weapon = null; //武器
aurora = null; //光环
//动画对象管理器 //动画对象管理器
AnimationManager = null; AnimationManager = null;
@ -101,8 +100,6 @@ 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();
} }
} }
//切换装备列表 //切换装备列表

View File

@ -53,27 +53,24 @@ function TestStage() {
// local Window = Sq_CreateWindow(_Select_Character_Window, "选择角色界面窗口", 0, 0, 1066, 600, 0); // local Window = Sq_CreateWindow(_Select_Character_Window, "选择角色界面窗口", 0, 0, 1066, 600, 0);
// local T = { // local T = {
// loginImg = 1, // Background = 1,
// charac = [{ // Charc = [{
// job = 0, // Job = 0,
// equip = [601500060, 601550060, 601560058, 601570053, 601520052, 601500060, 601510059, 601530051, 601540060, 601580023] // Ava = [601500060, 601550060, 601560058, 601570053, 601520052, 601500060, 601510059, 601530051, 601540060, 601580023]
// }, { // }, {
// job = 0, // Job = 0,
// equip = [601500060, 601550060, 601560058, 601570053, 601520052, 601500060, 601510059, 601530051, 601540060, 601580023] // Ava = [601500060, 601550060, 601560058, 601570053, 601520052, 601500060, 601510059, 601530051, 601540060, 601580023]
// }, { // }, {
// job = 0, // Job = 0,
// equip = [601500060, 601550060, 601560058, 601570053, 601520052, 601500060, 601510059, 601530051, 601540060, 601580023] // Ava = [601500060, 601550060, 601560058, 601570053, 601520052, 601500060, 601510059, 601530051, 601540060, 601580023]
// }, { // }, {
// job = 0, // Job = 0,
// equip = [601500060, 601550060, 601560058, 601570053, 601520052, 601500060, 601510059, 601530051, 601540060, 601580023] // Ava = [601500060, 601550060, 601560058, 601570053, 601520052, 601500060, 601510059, 601530051, 601540060, 601580023]
// }, { // }, {
// job = 0, // Job = 0,
// equip = [601500060, 601550060, 601560058, 601570053, 601520052, 601500060, 601510059, 601530051, 601540060, 601580023] // Ava = [601500060, 601550060, 601560058, 601570053, 601520052, 601500060, 601510059, 601530051, 601540060, 601580023]
// }] // }]
// }; // };
// Window.Init(T); // Window.Init(T);
// print(ObjectCount);
// Sq_CreateWindow(_CreateCharacter, "创建角色界面窗口", 0, 0, 1066, 600, 0);
} }

View File

@ -22,9 +22,6 @@ class _Login_Window extends Yosin_Window {
//信息 //信息
PackInfo = null; PackInfo = null;
//公告框
NoticeBox = null;
constructor(gObjectId, gX, gY, gWidth, gHeight, gTitleH) { constructor(gObjectId, gX, gY, gWidth, gHeight, gTitleH) {
base.constructor(gObjectId, gX, gY, gWidth, gHeight, gTitleH); base.constructor(gObjectId, gX, gY, gWidth, gHeight, gTitleH);
@ -39,13 +36,12 @@ class _Login_Window extends Yosin_Window {
//注册登录回调包 //注册登录回调包
MySocket.RegisterHandler(2, function(Jso) { MySocket.RegisterHandler(2, function(Jso) {
if (NoticeBox) NoticeBox.CloseWindow();
//登录成功 //登录成功
if (Jso.state) { if (Jso.state) {
NoticeBox = _Yosin_MessageBox("登录成功,正在进入游戏..."); HUD_Message(500, 200, "登录成功,正在进入游戏...");
MySocket.Send(9, null); MySocket.Send(9, null);
} else { } else {
NoticeBox = _Yosin_MessageBox("登录失败"); HUD_Message(500, 200, "登录失败");
} }
}.bindenv(this)); }.bindenv(this));
@ -63,10 +59,6 @@ class _Login_Window extends Yosin_Window {
info.equip.append(value); info.equip.append(value);
} }
} }
//关闭登录界面
NoticeBox.CloseWindow();
CloseWindow();
local Window = Sq_CreateWindow(_Select_Character_Window, "选择角色界面窗口", 0, 0, 1066, 600, 0); local Window = Sq_CreateWindow(_Select_Character_Window, "选择角色界面窗口", 0, 0, 1066, 600, 0);
Window.Init(PackInfo); Window.Init(PackInfo);
}.bindenv(this)); }.bindenv(this));
@ -162,7 +154,6 @@ class _Login_Window extends Yosin_Window {
}); });
PasswordTextActor.SetPosition(720, 281); PasswordTextActor.SetPosition(720, 281);
Addchild(PasswordTextActor); Addchild(PasswordTextActor);
} }

View File

@ -58,19 +58,16 @@ class _Select_Character_SettingBackground_Object_Window extends Yosin_CommonUi {
function OnMouseLbClick(MousePos_X, MousePos_Y) { function OnMouseLbClick(MousePos_X, MousePos_Y) {
base.OnMouseLbClick(MousePos_X, MousePos_Y); base.OnMouseLbClick(MousePos_X, MousePos_Y);
if (isInRect) { if (isInRect) {
//必须是在框的范围内 //遍历父对象中的所有按钮 还原其他按钮
if (MousePos_Y > Parent.Y && MousePos_Y<(Parent.Y + Parent.Height)) { foreach(Button in Parent.SettingBackgroundButtonList) {
//遍历父对象中的所有按钮 还原其他按钮 Button.SelectMask.SetVisible(false);
foreach(Button in Parent.SettingBackgroundButtonList) { Button.SelectFlag = false;
Button.SelectMask.SetVisible(false);
Button.SelectFlag = false;
}
//设置自身选中状态
SelectMask.SetVisible(true);
SelectFlag = true;
Parent.Parent.ChangeBackground(Idx);
} }
//设置自身选中状态
SelectMask.SetVisible(true);
SelectFlag = true;
Parent.Parent.ChangeBackground(Idx);
} }
} }
} }
@ -79,9 +76,6 @@ class _Select_Character_SettingBackground_Window extends Yosin_Window {
//是否为独立窗口 //是否为独立窗口
IsIndependent = false; IsIndependent = false;
//是否为图层窗口
IsLayer = true;
//是否可见 //是否可见
Visible = false; Visible = false;
@ -128,7 +122,7 @@ class _Select_Character_SettingBackground_Window extends Yosin_Window {
ScrollObject = Yosin_ScrollBar(Width - 13, 5, Height - 8, 20); ScrollObject = Yosin_ScrollBar(Width - 13, 5, Height - 8, 20);
ScrollObject.SetChangeCallBack(function(Value) { ScrollObject.SetChangeCallBack(function(Value) {
foreach(Pos, Button in SettingBackgroundButtonList) { foreach(Pos, Button in SettingBackgroundButtonList) {
Button.SyncPos(5 + (101 * (Pos % 2)), 9 + (61 * (Pos / 2)) - Value * (61 * 12)); Button.SetPosition(5 + (101 * (Pos % 2)), 9 + (61 * (Pos / 2)) - Value * (61 * 12));
} }
}.bindenv(this)); }.bindenv(this));
AddUIChild(ScrollObject); AddUIChild(ScrollObject);
@ -148,14 +142,14 @@ class _Select_Character_SettingBackground_Window extends Yosin_Window {
} }
//角色 //角色
class _Select_Character_Chr extends Yosin_CommonUi { class _Select_Character_Chr extends Yosin_Window {
//是否为独立窗口 //是否为独立窗口
IsIndependent = false; IsIndependent = false;
Info = null; Info = null;
constructor(gX, gY, gWidth, gHeight) { constructor(gObjectId, gX, gY, gWidth, gHeight, gTitleH) {
base.constructor(gX, gY, gWidth, gHeight); base.constructor(gObjectId, gX, gY, gWidth, gHeight, gTitleH);
RegisterDraw(); RegisterDraw();
} }
@ -174,7 +168,6 @@ class _Select_Character_Chr extends Yosin_CommonUi {
Charc.SetAnimation("RestAni"); Charc.SetAnimation("RestAni");
Charc.SetPosition(48, 12, 0); Charc.SetPosition(48, 12, 0);
Addchild(Charc); Addchild(Charc);
// print(Charc.AnimationManager.Children.len());
} }
} }
@ -243,7 +236,7 @@ class _Select_Character_Window extends Yosin_Window {
//角色对象 //角色对象
for (local i = 0; i< 5; i++) { for (local i = 0; i< 5; i++) {
local Buf = _Select_Character_Chr(190 + (i * 144), ((i % 2) ? 15 : 0) + 225, 126, 208); local Buf = _Select_Character_Chr("选择角色角色对象" + i, 190 + (i * 144), ((i % 2) ? 15 : 0) + 225, 126, 208, 0);
if (i< Info.charac.len()) Buf.Init(Info.charac[i]); if (i< Info.charac.len()) Buf.Init(Info.charac[i]);
AddUIChild(Buf); AddUIChild(Buf);
} }

View File

@ -5,7 +5,7 @@
文件用途: 公告或信息弹窗 文件用途: 公告或信息弹窗
*/ */
class _Yosin_MessageBox extends Yosin_Window { class HUD_Message extends Yosin_Window {
//调试模式 //调试模式
// DeBugMode = true; // DeBugMode = true;
@ -23,7 +23,7 @@ class _Yosin_MessageBox extends Yosin_Window {
titleTextActor = null; titleTextActor = null;
messageTextActor = null; messageTextActor = null;
constructor(message, gX = 418, gY = 200, info = { constructor(gX, gY, message, info = {
// 标题 // 标题
title = "公告", title = "公告",
// 水平边距 // 水平边距
@ -60,7 +60,7 @@ class _Yosin_MessageBox extends Yosin_Window {
cacheH = messageTextActor.GetSize().h + verticalMargin; cacheH = messageTextActor.GetSize().h + verticalMargin;
// 默认构造数据 // 默认构造数据
base.constructor("公告或信息弹窗" + clock().tostring(), gX ? gX : 418, gY ? gY : 200, cacheW, cacheH, 20); base.constructor("公告或信息弹窗" + clock().tostring(), gX, gY, cacheW, cacheH, 20);
//注册控件 //注册控件

View File

@ -17,6 +17,6 @@ function main(args) {
Game.size = [1066, 600]; Game.size = [1066, 600];
Game.v_sync = false; Game.v_sync = false;
Game.frame_interval = 10000; Game.frame_interval = 10000;
Game.debug_mode = true; // Game.debug_mode = true;
Game.Run(LoginStage); Game.Run(LoginStage);
} }

View File

@ -173,11 +173,7 @@
"User/UI/Window/233_HUD_Message.nut": { "User/UI/Window/233_HUD_Message.nut": {
"description": "公告弹窗" "description": "公告弹窗"
}, },
"User/UI/Window/1_Select_Character.nut": {
"description": "选择角色界面"
},
"User/UI/Window/2_Create_Character.nut": { "User/UI/Window/2_Create_Character.nut": {
"description": "创建角色" "description": "创建角色"
} }
} }