Merge remote-tracking branch 'origin/dong' into yi
# Conflicts: # sqr/Core/UI_Class/UI_Widget.nut # sqr/User/UI/Window/5_Inventory/Inventory_EquipmentPage.nut
This commit is contained in:
commit
ad1bea6628
|
|
@ -372,15 +372,15 @@ class titleButton extends Yosin_BaseButton {
|
|||
cacheY = Y;
|
||||
DownSimulateOffset = false;
|
||||
|
||||
local backText = FontAssetManager.GenerateNormal( title , true, {
|
||||
local backText = FontAssetManager.GenerateNormal(title, true, {
|
||||
color = sq_RGBA(130, 114, 84, 255)
|
||||
});
|
||||
backText.SetUpdateFunc(function(Text, Dt) {
|
||||
if (select == cacheSelect) return;
|
||||
if (select == cacheSelect) return;
|
||||
if (select) {
|
||||
Text.SetFillColor(sq_RGBA(187,176,149, 255));
|
||||
Text.SetFillColor(sq_RGBA(187, 176, 149, 255));
|
||||
} else {
|
||||
Text.SetFillColor(sq_RGBA(130,114,84, 255));
|
||||
Text.SetFillColor(sq_RGBA(130, 114, 84, 255));
|
||||
}
|
||||
cacheSelect = select;
|
||||
})
|
||||
|
|
@ -475,30 +475,30 @@ class Yosin_StretchTitleButton extends Yosin_CommonUi {
|
|||
AddUIChild(SpriteList[2]);
|
||||
|
||||
// 文字
|
||||
titleText = FontAssetManager.GenerateNormal( title , true, {
|
||||
titleText = FontAssetManager.GenerateNormal(title, true, {
|
||||
color = sq_RGBA(130, 114, 84, 255)
|
||||
});
|
||||
titleText.SetUpdateFunc(function(Text, Dt) {
|
||||
if (select == cacheSelect) return;
|
||||
if (select == cacheSelect) return;
|
||||
if (select) {
|
||||
Text.SetFillColor(sq_RGBA(187,176,149, 255));
|
||||
Text.SetFillColor(sq_RGBA(187, 176, 149, 255));
|
||||
} else {
|
||||
Text.SetFillColor(sq_RGBA(130,114,84, 255));
|
||||
Text.SetFillColor(sq_RGBA(130, 114, 84, 255));
|
||||
}
|
||||
cacheSelect = select;
|
||||
})
|
||||
|
||||
titleText.SetPosition(W / 2 - titleText.GetSize().w/ 2, 2);
|
||||
titleText.SetPosition(W / 2 - titleText.GetSize().w / 2, 2);
|
||||
Addchild(titleText);
|
||||
|
||||
}
|
||||
|
||||
// 设置为选中状态
|
||||
function SetSelect(select) {
|
||||
if (select){
|
||||
if (select) {
|
||||
State = 2;
|
||||
ChangeFrame();
|
||||
}else{
|
||||
} else {
|
||||
State = 0;
|
||||
ChangeFrame();
|
||||
}
|
||||
|
|
@ -510,12 +510,12 @@ class Yosin_StretchTitleButton extends Yosin_CommonUi {
|
|||
if (State != uiState) {
|
||||
if (State == 2) {
|
||||
SyncPos(X, cecheY - 1);
|
||||
}else{
|
||||
} else {
|
||||
SyncPos(X, cecheY);
|
||||
}
|
||||
uiState = State;
|
||||
|
||||
for (local i = 0; i < SpriteList.len(); i++) {
|
||||
for (local i = 0; i< SpriteList.len(); i++) {
|
||||
SpriteList[i].SetVisible(i == uiState);
|
||||
}
|
||||
}
|
||||
|
|
@ -526,7 +526,7 @@ class Yosin_StretchTitleButton extends Yosin_CommonUi {
|
|||
|
||||
//按下
|
||||
if (isLBDown) {
|
||||
if (LBDownOnClick!= null) {
|
||||
if (LBDownOnClick != null) {
|
||||
LBDownOnClick(this);
|
||||
}
|
||||
State = 2;
|
||||
|
|
@ -556,25 +556,25 @@ class Yosin_RowMoreTitleBtn extends Yosin_CommonUi {
|
|||
this.tests = titles;
|
||||
btns = [];
|
||||
local btnX = 0;
|
||||
for(local i = 0; i < titles.len(); i++) {
|
||||
for (local i = 0; i< titles.len(); i++) {
|
||||
|
||||
local textW = FontAssetManager.GenerateNormal(titles[i], true).GetSize().w + 10;
|
||||
local btnW = baseWidth + 10;
|
||||
btnW = textW > btnW ? textW : btnW ;
|
||||
btnW = textW > btnW ? textW : btnW;
|
||||
|
||||
local titleBtn = Yosin_StretchTitleButton(btnX, 1, btnW, 19, path, idx, titles[i]);
|
||||
titleBtn.index = i;
|
||||
|
||||
titleBtn.LBDownOnClick = function (btn) {
|
||||
titleBtn.LBDownOnClick = function(btn) {
|
||||
btn.Parent.LBDownOnClick(this, btn.index);
|
||||
|
||||
for (local i = 0; i < btn.Parent.btns.len(); i++) {
|
||||
for (local i = 0; i< btn.Parent.btns.len(); i++) {
|
||||
btn.Parent.btns[i].SetSelect(false);
|
||||
btn.Parent.btns[i].titleText.SetFillColor(sq_RGBA(130,114,84, 255));
|
||||
btn.Parent.btns[i].titleText.SetFillColor(sq_RGBA(130, 114, 84, 255));
|
||||
}
|
||||
|
||||
btn.SetSelect(true);
|
||||
btn.Parent.btns[btn.index].titleText.SetFillColor(sq_RGBA(187,176,149, 255));
|
||||
btn.Parent.btns[btn.index].titleText.SetFillColor(sq_RGBA(187, 176, 149, 255));
|
||||
|
||||
};
|
||||
|
||||
|
|
@ -584,7 +584,7 @@ class Yosin_RowMoreTitleBtn extends Yosin_CommonUi {
|
|||
|
||||
base.constructor(X, Y, btnX, 21);
|
||||
|
||||
for (local i = 0; i < btns.len(); i++) {
|
||||
for (local i = 0; i< btns.len(); i++) {
|
||||
AddUIChild(btns[i]);
|
||||
}
|
||||
|
||||
|
|
@ -598,6 +598,7 @@ class Yosin_RowMoreTitleBtn extends Yosin_CommonUi {
|
|||
// 进度显示
|
||||
class Yosin_Schedule extends Yosin_CommonUi {
|
||||
|
||||
<<<<<<< HEAD
|
||||
// schedule 进度比例0-1
|
||||
constructor(X, Y, W, H, path, idx, schedulePercent) {
|
||||
base.constructor(X, Y, W, H);
|
||||
|
|
@ -613,7 +614,42 @@ class Yosin_Schedule extends Yosin_CommonUi {
|
|||
|
||||
scheduleBar.SetCropRect(X, Y, barW, 5);
|
||||
scheduleBar.SetSize( barW , 5);
|
||||
=======
|
||||
//背景
|
||||
BgSprite = null;
|
||||
//条
|
||||
BarSprite = null;
|
||||
|
||||
// schedule 进度比例0-1
|
||||
constructor(X, Y, W, H, path, idx) {
|
||||
base.constructor(X, Y, W, H);
|
||||
|
||||
BgSprite = CL_SpriteObject(path, idx + 1);
|
||||
Addchild(BgSprite);
|
||||
>>>>>>> origin/dong
|
||||
|
||||
BarSprite = CL_SpriteObject(path, idx);
|
||||
Addchild(BarSprite);
|
||||
}
|
||||
|
||||
function SetPercentage(Rate) {
|
||||
local barSize = BarSprite.GetSize();
|
||||
local barW = barSize.w * Rate;
|
||||
|
||||
BarSprite.SetCropRect(BarSprite.X, BarSprite.Y, barW, barSize.h);
|
||||
BarSprite.SetSize(barW, barSize.h);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if (!getroottable().rawin("chongzaiflag")) {
|
||||
getroottable()["chongzaiflag"] <- true;
|
||||
} else {
|
||||
//遍历窗口队列 如果可见则调用Show
|
||||
for (local i = 0; i< _SYS_WINDOW_LIST_.len(); i++) {
|
||||
local Window = _SYS_WINDOW_LIST_[i];
|
||||
Window.Visible = false;
|
||||
Window.RemoveSelf();
|
||||
}
|
||||
TestStage();
|
||||
}
|
||||
|
|
@ -1,124 +1,97 @@
|
|||
<<<<<<< HEAD
|
||||
e:\Yosin&Kiwano_DOF\sqr\Core\eNUM\eNUM_KeY.nut
|
||||
e:\Yosin&Kiwano_DOF\sqr\Core\eNUM\enum_system.nut
|
||||
e:\Yosin&Kiwano_DOF\sqr\Core\BaseTool\BaseTool.nut
|
||||
e:\Yosin&Kiwano_DOF\sqr\Core\BaseTool\Math.nut
|
||||
e:\Yosin&Kiwano_DOF\sqr\Core\BaseTool\String.nut
|
||||
e:\Yosin&Kiwano_DOF\sqr\Core\BaseTool\BlobexClass.nut
|
||||
e:\Yosin&Kiwano_DOF\sqr\Core\BaseTool\JsonClass\JsonClass.nut
|
||||
e:\Yosin&Kiwano_DOF\sqr\Core\BaseTool\JsonClass\Json.nut
|
||||
e:\Yosin&Kiwano_DOF\sqr\Core\BaseClass\ScriptManager\ScriptManager.nut
|
||||
e:\Yosin&Kiwano_DOF\sqr\Core\BaseClass\ScriptManager\InitAni.nut
|
||||
e:\Yosin&Kiwano_DOF\sqr\Core\BaseClass\Game_Window_Class.nut
|
||||
e:\Yosin&Kiwano_DOF\sqr\Core\BaseClass\BaseObject.nut
|
||||
e:\Yosin&Kiwano_DOF\sqr\Core\BaseClass\AudioClass.nut
|
||||
e:\Yosin&Kiwano_DOF\sqr\Core\BaseClass\StageClass.nut
|
||||
e:\Yosin&Kiwano_DOF\sqr\Core\BaseClass\ActorObject.nut
|
||||
e:\Yosin&Kiwano_DOF\sqr\Core\BaseClass\LayerObject.nut
|
||||
e:\Yosin&Kiwano_DOF\sqr\Core\BaseClass\UserStorage.nut
|
||||
e:\Yosin&Kiwano_DOF\sqr\Core\BaseClass\SpriteObject\SpriteFrameClass.nut
|
||||
e:\Yosin&Kiwano_DOF\sqr\Core\BaseClass\SpriteObject\SpriteClass.nut
|
||||
e:\Yosin&Kiwano_DOF\sqr\Core\BaseClass\TextObject\Font.nut
|
||||
e:\Yosin&Kiwano_DOF\sqr\Core\BaseClass\TextObject\TextActor.nut
|
||||
e:\Yosin&Kiwano_DOF\sqr\Core\BaseClass\AnimationClass\AnimationClass.nut
|
||||
=======
|
||||
e:\Yosin&Kiwano_DOF\sqr\Core\ENUM\ENUM_KEY.nut
|
||||
e:\Yosin&Kiwano_DOF\sqr\Core\ENUM\enum_system.nut
|
||||
e:\Yosin&Kiwano_DOF\sqr\Core\BaseTool\BaseTool.nut
|
||||
e:\Yosin&Kiwano_DOF\sqr\Core\BaseTool\Math.nut
|
||||
e:\Yosin&Kiwano_DOF\sqr\Core\BaseTool\String.nut
|
||||
e:\Yosin&Kiwano_DOF\sqr\Core\BaseTool\BlobExClass.nut
|
||||
e:\Yosin&Kiwano_DOF\sqr\Core\BaseTool\JsonClass\JsonClass.nut
|
||||
e:\Yosin&Kiwano_DOF\sqr\Core\BaseTool\JsonClass\Json.nut
|
||||
e:\Yosin&Kiwano_DOF\sqr\Core\BaseClass\ScriptManager\ScriptManager.nut
|
||||
e:\Yosin&Kiwano_DOF\sqr\Core\BaseClass\ScriptManager\InitAni.nut
|
||||
e:\Yosin&Kiwano_DOF\sqr\Core\BaseClass\Game_Window_Class.nut
|
||||
e:\Yosin&Kiwano_DOF\sqr\Core\BaseClass\BaseObject.nut
|
||||
e:\Yosin&Kiwano_DOF\sqr\Core\BaseClass\AudioClass.nut
|
||||
e:\Yosin&Kiwano_DOF\sqr\Core\BaseClass\StageClass.nut
|
||||
e:\Yosin&Kiwano_DOF\sqr\Core\BaseClass\ActorObject.nut
|
||||
e:\Yosin&Kiwano_DOF\sqr\Core\BaseClass\LayerObject.nut
|
||||
e:\Yosin&Kiwano_DOF\sqr\Core\BaseClass\UserStorage.nut
|
||||
e:\Yosin&Kiwano_DOF\sqr\Core\BaseClass\CanvasObject.nut
|
||||
e:\Yosin&Kiwano_DOF\sqr\Core\BaseClass\SpriteObject\SpriteFrameClass.nut
|
||||
e:\Yosin&Kiwano_DOF\sqr\Core\BaseClass\SpriteObject\SpriteClass.nut
|
||||
e:\Yosin&Kiwano_DOF\sqr\Core\BaseClass\TextObject\Font.nut
|
||||
e:\Yosin&Kiwano_DOF\sqr\Core\BaseClass\TextObject\TextActor.nut
|
||||
e:\Yosin&Kiwano_DOF\sqr\Core\BaseClass\AnimationClass\AnimationClass.nut
|
||||
>>>>>>> origin/dong
|
||||
l:\Yosin_Engine\Yosin&Kiwano_DOF\sqr\Core\ENUM\ENUM_KEY.nut
|
||||
l:\Yosin_Engine\Yosin&Kiwano_DOF\sqr\Core\ENUM\enum_system.nut
|
||||
l:\Yosin_Engine\Yosin&Kiwano_DOF\sqr\Core\BaseTool\BaseTool.nut
|
||||
l:\Yosin_Engine\Yosin&Kiwano_DOF\sqr\Core\BaseTool\Math.nut
|
||||
l:\Yosin_Engine\Yosin&Kiwano_DOF\sqr\Core\BaseTool\String.nut
|
||||
l:\Yosin_Engine\Yosin&Kiwano_DOF\sqr\Core\BaseTool\BlobExClass.nut
|
||||
l:\Yosin_Engine\Yosin&Kiwano_DOF\sqr\Core\BaseTool\JsonClass\JsonClass.nut
|
||||
l:\Yosin_Engine\Yosin&Kiwano_DOF\sqr\Core\BaseTool\JsonClass\Json.nut
|
||||
l:\Yosin_Engine\Yosin&Kiwano_DOF\sqr\Core\BaseClass\ScriptManager\ScriptManager.nut
|
||||
l:\Yosin_Engine\Yosin&Kiwano_DOF\sqr\Core\BaseClass\ScriptManager\InitAni.nut
|
||||
l:\Yosin_Engine\Yosin&Kiwano_DOF\sqr\Core\BaseClass\Game_Window_Class.nut
|
||||
l:\Yosin_Engine\Yosin&Kiwano_DOF\sqr\Core\BaseClass\BaseObject.nut
|
||||
l:\Yosin_Engine\Yosin&Kiwano_DOF\sqr\Core\BaseClass\AudioClass.nut
|
||||
l:\Yosin_Engine\Yosin&Kiwano_DOF\sqr\Core\BaseClass\StageClass.nut
|
||||
l:\Yosin_Engine\Yosin&Kiwano_DOF\sqr\Core\BaseClass\ActorObject.nut
|
||||
l:\Yosin_Engine\Yosin&Kiwano_DOF\sqr\Core\BaseClass\LayerObject.nut
|
||||
l:\Yosin_Engine\Yosin&Kiwano_DOF\sqr\Core\BaseClass\UserStorage.nut
|
||||
l:\Yosin_Engine\Yosin&Kiwano_DOF\sqr\Core\BaseClass\CanvasObject.nut
|
||||
l:\Yosin_Engine\Yosin&Kiwano_DOF\sqr\Core\BaseClass\SpriteObject\SpriteFrameClass.nut
|
||||
l:\Yosin_Engine\Yosin&Kiwano_DOF\sqr\Core\BaseClass\SpriteObject\SpriteClass.nut
|
||||
l:\Yosin_Engine\Yosin&Kiwano_DOF\sqr\Core\BaseClass\TextObject\Font.nut
|
||||
l:\Yosin_Engine\Yosin&Kiwano_DOF\sqr\Core\BaseClass\TextObject\TextActor.nut
|
||||
l:\Yosin_Engine\Yosin&Kiwano_DOF\sqr\Core\BaseClass\AnimationClass\AnimationClass.nut
|
||||
|
||||
e:\Yosin&Kiwano_DOF\sqr\Core\extraCalss\Socket\Socket.nut
|
||||
l:\Yosin_Engine\Yosin&Kiwano_DOF\sqr\Core\ExtraCalss\Socket\Socket.nut
|
||||
|
||||
e:\Yosin&Kiwano_DOF\sqr\Core\Game_Proc\Game_Proc.nut
|
||||
l:\Yosin_Engine\Yosin&Kiwano_DOF\sqr\Core\Game_Proc\Game_Proc.nut
|
||||
|
||||
e:\Yosin&Kiwano_DOF\sqr\Core\InputClass\InputClass.nut
|
||||
l:\Yosin_Engine\Yosin&Kiwano_DOF\sqr\Core\InputClass\InputClass.nut
|
||||
|
||||
e:\Yosin&Kiwano_DOF\sqr\Core\UI_Class\UI_Cursor.nut
|
||||
e:\Yosin&Kiwano_DOF\sqr\Core\UI_Class\UI_Core.nut
|
||||
e:\Yosin&Kiwano_DOF\sqr\Core\UI_Class\UI_Widget.nut
|
||||
l:\Yosin_Engine\Yosin&Kiwano_DOF\sqr\Core\UI_Class\UI_Cursor.nut
|
||||
l:\Yosin_Engine\Yosin&Kiwano_DOF\sqr\Core\UI_Class\UI_Core.nut
|
||||
l:\Yosin_Engine\Yosin&Kiwano_DOF\sqr\Core\UI_Class\UI_Widget.nut
|
||||
|
||||
|
||||
e:\Yosin&Kiwano_DOF\sqr\User\_eNUM\global_object.nut
|
||||
e:\Yosin&Kiwano_DOF\sqr\User\_eNUM\enum_music.nut
|
||||
e:\Yosin&Kiwano_DOF\sqr\User\_eNUM\enum_packet.nut
|
||||
e:\Yosin&Kiwano_DOF\sqr\User\_eNUM\enum_game.nut
|
||||
l:\Yosin_Engine\Yosin&Kiwano_DOF\sqr\User\_ENUM\global_object.nut
|
||||
l:\Yosin_Engine\Yosin&Kiwano_DOF\sqr\User\_ENUM\enum_music.nut
|
||||
l:\Yosin_Engine\Yosin&Kiwano_DOF\sqr\User\_ENUM\enum_packet.nut
|
||||
l:\Yosin_Engine\Yosin&Kiwano_DOF\sqr\User\_ENUM\enum_game.nut
|
||||
|
||||
e:\Yosin&Kiwano_DOF\sqr\User\Socket\Socket.nut
|
||||
l:\Yosin_Engine\Yosin&Kiwano_DOF\sqr\User\Socket\Socket.nut
|
||||
|
||||
e:\Yosin&Kiwano_DOF\sqr\User\Asset\AssetManager.nut
|
||||
e:\Yosin&Kiwano_DOF\sqr\User\Asset\FontAsset.nut
|
||||
e:\Yosin&Kiwano_DOF\sqr\User\Asset\Character\Animation.nut
|
||||
l:\Yosin_Engine\Yosin&Kiwano_DOF\sqr\User\Asset\AssetManager.nut
|
||||
l:\Yosin_Engine\Yosin&Kiwano_DOF\sqr\User\Asset\FontAsset.nut
|
||||
l:\Yosin_Engine\Yosin&Kiwano_DOF\sqr\User\Asset\Character\Animation.nut
|
||||
|
||||
e:\Yosin&Kiwano_DOF\sqr\User\Asset\Item\Item.nut
|
||||
e:\Yosin&Kiwano_DOF\sqr\User\Asset\Item\equipment.nut
|
||||
l:\Yosin_Engine\Yosin&Kiwano_DOF\sqr\User\Asset\Item\Item.nut
|
||||
l:\Yosin_Engine\Yosin&Kiwano_DOF\sqr\User\Asset\Item\Equipment.nut
|
||||
|
||||
e:\Yosin&Kiwano_DOF\sqr\User\Controller\Controller.nut
|
||||
e:\Yosin&Kiwano_DOF\sqr\User\Controller\ObjectController.nut
|
||||
l:\Yosin_Engine\Yosin&Kiwano_DOF\sqr\User\Controller\Controller.nut
|
||||
l:\Yosin_Engine\Yosin&Kiwano_DOF\sqr\User\Controller\ObjectController.nut
|
||||
|
||||
e:\Yosin&Kiwano_DOF\sqr\User\Object\StateMachine\StateMachineClass.nut
|
||||
l:\Yosin_Engine\Yosin&Kiwano_DOF\sqr\User\Object\StateMachine\StateMachineClass.nut
|
||||
|
||||
e:\Yosin&Kiwano_DOF\sqr\User\Object\Object\BaseObject.nut
|
||||
e:\Yosin&Kiwano_DOF\sqr\User\Object\Object\AnimationObject.nut
|
||||
l:\Yosin_Engine\Yosin&Kiwano_DOF\sqr\User\Object\Object\BaseObject.nut
|
||||
l:\Yosin_Engine\Yosin&Kiwano_DOF\sqr\User\Object\Object\AnimationObject.nut
|
||||
|
||||
e:\Yosin&Kiwano_DOF\sqr\User\Object\Map\TileObject.nut
|
||||
e:\Yosin&Kiwano_DOF\sqr\User\Object\Map\MapCamera.nut
|
||||
e:\Yosin&Kiwano_DOF\sqr\User\Object\Map\TownObject.nut
|
||||
e:\Yosin&Kiwano_DOF\sqr\User\Object\Map\MapObject.nut
|
||||
l:\Yosin_Engine\Yosin&Kiwano_DOF\sqr\User\Object\Map\TileObject.nut
|
||||
l:\Yosin_Engine\Yosin&Kiwano_DOF\sqr\User\Object\Map\MapCamera.nut
|
||||
l:\Yosin_Engine\Yosin&Kiwano_DOF\sqr\User\Object\Map\TownObject.nut
|
||||
l:\Yosin_Engine\Yosin&Kiwano_DOF\sqr\User\Object\Map\MapObject.nut
|
||||
|
||||
e:\Yosin&Kiwano_DOF\sqr\User\Object\ActiveObject\GameObjectClass.nut
|
||||
e:\Yosin&Kiwano_DOF\sqr\User\Object\ActiveObject\StaticObjectClass.nut
|
||||
e:\Yosin&Kiwano_DOF\sqr\User\Object\ActiveObject\ActiveObjectClass.nut
|
||||
e:\Yosin&Kiwano_DOF\sqr\User\Object\ActiveObject\PassiveObjectClass.nut
|
||||
e:\Yosin&Kiwano_DOF\sqr\User\Object\ActiveObject\MonsterObjectClass.nut
|
||||
e:\Yosin&Kiwano_DOF\sqr\User\Object\ActiveObject\NpcObjectClass.nut
|
||||
e:\Yosin&Kiwano_DOF\sqr\User\Object\ActiveObject\CharacterObjectClass.nut
|
||||
e:\Yosin&Kiwano_DOF\sqr\User\Object\ActiveObject\CharacterObjectClass_AI.nut
|
||||
l:\Yosin_Engine\Yosin&Kiwano_DOF\sqr\User\Object\ActiveObject\GameObjectClass.nut
|
||||
l:\Yosin_Engine\Yosin&Kiwano_DOF\sqr\User\Object\ActiveObject\StaticObjectClass.nut
|
||||
l:\Yosin_Engine\Yosin&Kiwano_DOF\sqr\User\Object\ActiveObject\ActiveObjectClass.nut
|
||||
l:\Yosin_Engine\Yosin&Kiwano_DOF\sqr\User\Object\ActiveObject\PassiveObjectClass.nut
|
||||
l:\Yosin_Engine\Yosin&Kiwano_DOF\sqr\User\Object\ActiveObject\MonsterObjectClass.nut
|
||||
l:\Yosin_Engine\Yosin&Kiwano_DOF\sqr\User\Object\ActiveObject\NpcObjectClass.nut
|
||||
l:\Yosin_Engine\Yosin&Kiwano_DOF\sqr\User\Object\ActiveObject\CharacterObjectClass.nut
|
||||
l:\Yosin_Engine\Yosin&Kiwano_DOF\sqr\User\Object\ActiveObject\CharacterObjectClass_AI.nut
|
||||
|
||||
e:\Yosin&Kiwano_DOF\sqr\User\Socket\Socket.nut
|
||||
e:\Yosin&Kiwano_DOF\sqr\User\Socket\Packet.nut
|
||||
e:\Yosin&Kiwano_DOF\sqr\User\Socket\FunctionalPack.nut
|
||||
l:\Yosin_Engine\Yosin&Kiwano_DOF\sqr\User\Socket\Socket.nut
|
||||
l:\Yosin_Engine\Yosin&Kiwano_DOF\sqr\User\Socket\Packet.nut
|
||||
l:\Yosin_Engine\Yosin&Kiwano_DOF\sqr\User\Socket\FunctionalPack.nut
|
||||
|
||||
e:\Yosin&Kiwano_DOF\sqr\User\Stage\LodingStage.nut
|
||||
e:\Yosin&Kiwano_DOF\sqr\User\Stage\TestStage.nut
|
||||
l:\Yosin_Engine\Yosin&Kiwano_DOF\sqr\User\Stage\LodingStage.nut
|
||||
l:\Yosin_Engine\Yosin&Kiwano_DOF\sqr\User\Stage\TestStage.nut
|
||||
|
||||
e:\Yosin&Kiwano_DOF\sqr\User\UI\Widget\IMouse.nut
|
||||
e:\Yosin&Kiwano_DOF\sqr\User\UI\Widget\InputBox.nut
|
||||
e:\Yosin&Kiwano_DOF\sqr\User\UI\Widget\Drag_Button.nut
|
||||
e:\Yosin&Kiwano_DOF\sqr\User\UI\Widget\Scroll_Bar.nut
|
||||
e:\Yosin&Kiwano_DOF\sqr\User\UI\Widget\Text_Button.nut
|
||||
e:\Yosin&Kiwano_DOF\sqr\User\UI\Widget\Top_Title.nut
|
||||
l:\Yosin_Engine\Yosin&Kiwano_DOF\sqr\User\UI\Widget\IMouse.nut
|
||||
l:\Yosin_Engine\Yosin&Kiwano_DOF\sqr\User\UI\Widget\InputBox.nut
|
||||
l:\Yosin_Engine\Yosin&Kiwano_DOF\sqr\User\UI\Widget\Drag_Button.nut
|
||||
l:\Yosin_Engine\Yosin&Kiwano_DOF\sqr\User\UI\Widget\Scroll_Bar.nut
|
||||
l:\Yosin_Engine\Yosin&Kiwano_DOF\sqr\User\UI\Widget\Text_Button.nut
|
||||
l:\Yosin_Engine\Yosin&Kiwano_DOF\sqr\User\UI\Widget\Top_Title.nut
|
||||
|
||||
l:\Yosin_Engine\Yosin&Kiwano_DOF\sqr\User\UI\Window\0_Login.nut
|
||||
l:\Yosin_Engine\Yosin&Kiwano_DOF\sqr\User\UI\Window\1_Select_Character.nut
|
||||
l:\Yosin_Engine\Yosin&Kiwano_DOF\sqr\User\UI\Window\2_create_Character.nut
|
||||
l:\Yosin_Engine\Yosin&Kiwano_DOF\sqr\User\UI\Window\3_Top_tool.nut
|
||||
l:\Yosin_Engine\Yosin&Kiwano_DOF\sqr\User\UI\Window\4_PersonalInfo.nut
|
||||
l:\Yosin_Engine\Yosin&Kiwano_DOF\sqr\User\UI\Window\5_Inventory\Inventory_EquipmentPage.nut
|
||||
l:\Yosin_Engine\Yosin&Kiwano_DOF\sqr\User\UI\Window\5_Inventory\ItemCollect.nut
|
||||
l:\Yosin_Engine\Yosin&Kiwano_DOF\sqr\User\UI\Window\5_Inventory\5_Inventory.nut
|
||||
l:\Yosin_Engine\Yosin&Kiwano_DOF\sqr\User\UI\Window\233_HUD_Message.nut
|
||||
|
||||
|
||||
e:\Yosin&Kiwano_DOF\sqr\User\UI\Window\0_Login.nut
|
||||
e:\Yosin&Kiwano_DOF\sqr\User\UI\Window\1_Select_Character.nut
|
||||
e:\Yosin&Kiwano_DOF\sqr\User\UI\Window\2_create_Character.nut
|
||||
e:\Yosin&Kiwano_DOF\sqr\User\UI\Window\3_Top_tool.nut
|
||||
e:\Yosin&Kiwano_DOF\sqr\User\UI\Window\4_PersonalInfo.nut
|
||||
e:\Yosin&Kiwano_DOF\sqr\User\UI\Window\5_Inventory\5_Inventory.nut
|
||||
e:\Yosin&Kiwano_DOF\sqr\User\UI\Window\5_Inventory\Inventory_EquipmentPage.nut
|
||||
e:\Yosin&Kiwano_DOF\sqr\User\UI\Window\5_Inventory\ItemCollect.nut
|
||||
|
||||
e:\Yosin&Kiwano_DOF\sqr\User\UI\Window\233_HUD_Message.nut
|
||||
|
||||
|
||||
e:\Yosin&Kiwano_DOF\sqr\User\main.nut
|
||||
l:\Yosin_Engine\Yosin&Kiwano_DOF\sqr\User\main.nut
|
||||
|
|
@ -148,6 +148,13 @@ class _AssetManager_ {
|
|||
if (Ret == "[/item group name table]") break;
|
||||
DataTable.item_group_name_table.rawset(Ret, Data.Get());
|
||||
}
|
||||
} else if (Pack == "[elemental property tag]") {
|
||||
DataTable.elemental_property_tag <- {};
|
||||
while (true) {
|
||||
local Ret = Data.Get();
|
||||
if (Ret == "[/elemental property tag]") break;
|
||||
DataTable.elemental_property_tag.rawset(Ret, Data.Get());
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
|
|
@ -211,8 +218,8 @@ class _AssetManager_ {
|
|||
DataTable.DirPath <- DataTable.filepath.slice(0, DataTable.filepath.lastfind("/") + 1);
|
||||
while (!Data.Eof()) {
|
||||
local Pack = Data.Get();
|
||||
//名称 grade 套装Id 稀有度 最低穿戴登记 重量 组名 购买价格 出售价格
|
||||
if (Pack == "[name]" || Pack == "[part set index]" || Pack == "[grade]" || Pack == "[rarity]" || Pack == "[minimum level]" || Pack == "[weight]" || Pack == "[item group name]" || Pack == "[price]" || Pack == "[repair price]" || Pack == "[value]" || Pack == "[durability]") {
|
||||
//名称 grade 套装Id 稀有度 最低穿戴登记 重量 组名 购买价格 出售价格 耐久 名望 四维 所有属强 四属强 双暴 命中 四属抗 属性攻击
|
||||
if (Pack == "[name]" || Pack == "[part set index]" || Pack == "[grade]" || Pack == "[rarity]" || Pack == "[minimum level]" || Pack == "[weight]" || Pack == "[item group name]" || Pack == "[price]" || Pack == "[repair price]" || Pack == "[value]" || Pack == "[durability]" || Pack == "[physical attack]" || Pack == "[magical attack]" || Pack == "[physical defense]" || Pack == "[magical defense]" || Pack == "[all elemental attack]" || Pack == "[dark attack]" || Pack == "[light attack]" || Pack == "[water attack]" || Pack == "[fire attack]" || Pack == "[attack speed]" || Pack == "[cast speed]" || Pack == "[move speed]" || Pack == "[physical critical hit]" || Pack == "[magical critical hit]" || Pack == "[stuck]" || Pack == "[fire resistance]" || Pack == "[dark resistance]" || Pack == "[light resistance]" || Pack == "[water resistance]" || Pack == "[elemental property]" || Pack == "[flavor text]") {
|
||||
local RealKey = Pack.slice(1, -1);
|
||||
DataTable[RealKey] <- Data.Get();
|
||||
}
|
||||
|
|
@ -225,6 +232,11 @@ class _AssetManager_ {
|
|||
DataTable.usable_job.append(Ret.slice(1, -1).tolower());
|
||||
}
|
||||
}
|
||||
//读取三攻
|
||||
else if (Pack == "[equipment physical attack]" || Pack == "[equipment magical attack]" || Pack == "[separate attack]") {
|
||||
local RealKey = Pack.slice(1, -1);
|
||||
DataTable[RealKey] <- [Data.Get(), Data.Get()];
|
||||
}
|
||||
//图标
|
||||
else if (Pack == "[icon]") {
|
||||
DataTable.icon <- {};
|
||||
|
|
|
|||
|
|
@ -13,6 +13,8 @@ class GameItem.EquipmentInfo extends Yosin_Window {
|
|||
Equipment = null;
|
||||
//画布
|
||||
Canvas = null;
|
||||
//画布实际高度
|
||||
RealCanvasHeight = 0;
|
||||
//稀有度边框颜色对应Idx表
|
||||
//白装 蓝装 紫装 粉装 金装 红装 橙装
|
||||
RarityFrameColorIdx = [0, 1, 2, 4, 6, 3, 5];
|
||||
|
|
@ -36,10 +38,12 @@ class GameItem.EquipmentInfo extends Yosin_Window {
|
|||
this.Equipment = Equipment.weakref();
|
||||
base.constructor(clock() + "EquipmentInfo" + Equipment.Idx, 0, 0, 0, 0, 0);
|
||||
|
||||
local background = Yosin_NineBoxStretch(0, 0, 208, 600, "sprite/interface/lenheartwindowcommon.img", 213);
|
||||
AddUIChild(background);
|
||||
//210
|
||||
Init();
|
||||
|
||||
local background = Yosin_NineBoxStretch(0, 0, 208, RealCanvasHeight + 10, "sprite/interface/lenheartwindowcommon.img", 213);
|
||||
background.SetZOrder(-1);
|
||||
AddUIChild(background);
|
||||
}
|
||||
|
||||
function Init() {
|
||||
|
|
@ -60,7 +64,7 @@ class GameItem.EquipmentInfo extends Yosin_Window {
|
|||
|
||||
//绘制装备名称
|
||||
if (Equipment.Name.len() > 0) {
|
||||
local EquName = FontAssetManager.GenerateNormal(Equipment.Name, true, {
|
||||
local EquName = FontAssetManager.GenerateNormal(Equipment.Name, false, {
|
||||
color = RarityColor[Equipment.Rarity]
|
||||
});
|
||||
Canvas.DrawActor(EquName, 41, 7);
|
||||
|
|
@ -69,10 +73,10 @@ class GameItem.EquipmentInfo extends Yosin_Window {
|
|||
//绘制分割线
|
||||
Canvas.DrawLine(3, 37, 207, 38);
|
||||
|
||||
//绘制品级 //TODO 现在默认100
|
||||
local Percentage = 94;
|
||||
//绘制品级
|
||||
local Percentage = Equipment.Property ? Equipment.Property.Percentage : 100;
|
||||
//品级文字
|
||||
local PercentageGradeText = FontAssetManager.GenerateNormal(GetPercentageText(Percentage), true, {
|
||||
local PercentageGradeText = FontAssetManager.GenerateNormal(GetPercentageText(Percentage), false, {
|
||||
color = sq_RGBA(255, 240, 0, 255)
|
||||
});
|
||||
//百分比UI
|
||||
|
|
@ -81,51 +85,51 @@ class GameItem.EquipmentInfo extends Yosin_Window {
|
|||
local PercentageUIBG = CL_SpriteFrameObject("sprite/interface/lenheartwindowcommon.img", 632);
|
||||
Canvas.DrawSpriteFrame(PercentageUIBG, 47, 48);
|
||||
//百分比文字
|
||||
local PercentageText = FontAssetManager.GenerateNormal(format("(%d%%)", Percentage), true, {
|
||||
local PercentageText = FontAssetManager.GenerateNormal(format("(%d%%)", Percentage), false, {
|
||||
color = sq_RGBA(161, 131, 74, 255)
|
||||
});
|
||||
Canvas.DrawActor(PercentageGradeText, 6, 41);
|
||||
Canvas.DrawActor(PercentageText, 130, 41);
|
||||
//绘制稀有度名称
|
||||
local RarityTagName = FontAssetManager.GenerateNormal(RarityNameTag[Equipment.Rarity], true, {
|
||||
local RarityTagName = FontAssetManager.GenerateNormal(RarityNameTag[Equipment.Rarity], false, {
|
||||
color = RarityColor[Equipment.Rarity]
|
||||
});
|
||||
Canvas.DrawActor(RarityTagName, 210 - RarityTagName.GetSize().w - 6, 41);
|
||||
|
||||
//绘制重量
|
||||
local WeightText = FontAssetManager.GenerateNormal((Equipment.Weight.tofloat() / 1000.0) + "kg", true, {
|
||||
local WeightText = FontAssetManager.GenerateNormal((Equipment.Weight.tofloat() / 1000.0) + "kg", false, {
|
||||
color = sq_RGBA(161, 131, 74, 255)
|
||||
});
|
||||
Canvas.DrawActor(WeightText, 6, 57);
|
||||
|
||||
//绘制最低多少级可以使用
|
||||
local MinUseLevelText = FontAssetManager.GenerateNormal(Equipment.Minimum_level + "级以上可以使用", true, {
|
||||
local MinUseLevelText = FontAssetManager.GenerateNormal(Equipment.Minimum_level + "级以上可以使用", false, {
|
||||
color = sq_RGBA(161, 131, 74, 255)
|
||||
});
|
||||
Canvas.DrawActor(MinUseLevelText, 210 - MinUseLevelText.GetSize().w - 6, 57);
|
||||
|
||||
//绘制是否封装 如果有主体属性读取 否则一律为封装
|
||||
local IsPackage = Equipment.Property ? Equipment.Property.IsPackage : 0;
|
||||
local IsPackageText = FontAssetManager.GenerateNormal(TradeTypeText[IsPackage], true, {
|
||||
local IsPackageText = FontAssetManager.GenerateNormal(TradeTypeText[IsPackage], false, {
|
||||
color = TradeTypeColor[IsPackage]
|
||||
});
|
||||
Canvas.DrawActor(IsPackageText, 210 - IsPackageText.GetSize().w - 6, 73);
|
||||
|
||||
//绘制装备类型
|
||||
local GroupNameText = FontAssetManager.GenerateNormal(GameItem.EquipmentInfoTag.item_group_name_table[Equipment.GroupName], true, {
|
||||
local GroupNameText = FontAssetManager.GenerateNormal(GameItem.EquipmentInfoTag.item_group_name_table[Equipment.GroupName], false, {
|
||||
color = sq_RGBA(194, 161, 56, 255)
|
||||
});
|
||||
Canvas.DrawActor(GroupNameText, 210 - GroupNameText.GetSize().w - 6, 89);
|
||||
|
||||
//绘制售价
|
||||
local RealSellPrice = (Equipment.SellPrice == -1 ? (Equipment.Price == -1 ? 0 : Equipment.Price) : Equipment.SellPrice) / 5;
|
||||
local SellPriceText = FontAssetManager.GenerateNormal(RealSellPrice + "金币", true, {
|
||||
local SellPriceText = FontAssetManager.GenerateNormal(RealSellPrice + "金币", false, {
|
||||
color = sq_RGBA(133, 121, 78, 255)
|
||||
});
|
||||
Canvas.DrawActor(SellPriceText, 210 - SellPriceText.GetSize().w - 6, 105);
|
||||
|
||||
//绘制耐久度
|
||||
local DurabilityText = FontAssetManager.GenerateNormal("耐久度 " + (Equipment.Property ? Equipment.Property.Durability : Equipment.Durability) + "/" + Equipment.Durability, true, {
|
||||
local DurabilityText = FontAssetManager.GenerateNormal("耐久度 " + (Equipment.Property ? Equipment.Property.Durability : Equipment.Durability) + "/" + Equipment.Durability, false, {
|
||||
color = sq_RGBA(133, 121, 80, 255)
|
||||
});
|
||||
Canvas.DrawActor(DurabilityText, 6, 121);
|
||||
|
|
@ -133,12 +137,178 @@ class GameItem.EquipmentInfo extends Yosin_Window {
|
|||
//绘制分割线
|
||||
Canvas.DrawLine(3, 139, 207, 139);
|
||||
|
||||
//下面的绘制逻辑开始使用行put来做
|
||||
RealCanvasHeight = 141;
|
||||
|
||||
//绘制冒险家名望
|
||||
local AdventurerFameFrame = CL_SpriteFrameObject("sprite/interface2/profile/profile_cn/profile_cn.img", 0);
|
||||
Canvas.DrawSpriteFrame(AdventurerFameFrame, 6, RealCanvasHeight + 3);
|
||||
local AdventurerFame = FontAssetManager.GenerateNormal("冒险家名望 " + Equipment.AdventurerFame, false, {
|
||||
color = sq_RGBA(133, 121, 80, 255)
|
||||
});
|
||||
Canvas.DrawActor(AdventurerFame, 22, RealCanvasHeight);
|
||||
|
||||
//绘制分割
|
||||
AddSliceLine();
|
||||
|
||||
//绘制物理攻击力
|
||||
DrawAttack("EquipmentPhysicalAttack", "物理攻击力");
|
||||
//绘制魔法攻击力
|
||||
DrawAttack("EquipmentMagicalAttack", "魔法攻击力");
|
||||
//绘制独立攻击力
|
||||
DrawAttack("SeparateAttack", "独立攻击力");
|
||||
//绘制四维
|
||||
DrawAttribute("PhysicalAttack", "力量");
|
||||
DrawAttribute("MagicalAttack", "智力");
|
||||
DrawAttribute("PhysicalDefense", "体力");
|
||||
DrawAttribute("MagicalDefense", "精神");
|
||||
//绘制分割
|
||||
Canvas.DrawLine(3, RealCanvasHeight + 3, 207, RealCanvasHeight + 3);
|
||||
RealCanvasHeight += 6;
|
||||
|
||||
//绘制三速
|
||||
DrawSpeed("AttackSpeed", "攻击速度");
|
||||
DrawSpeed("CastSpeed", "释放速度");
|
||||
DrawSpeed("MoveSpeed", "移动速度");
|
||||
|
||||
//绘制双爆
|
||||
DrawCritical("PhysicalCriticalHit", "物理暴击率");
|
||||
DrawCritical("MagicalCriticalHit", "魔法暴击率");
|
||||
|
||||
//绘制命中率
|
||||
DrawStuck("Stuck", "命中率");
|
||||
|
||||
//绘制四属抗
|
||||
DrawElement("DarkResistance", "暗属性抗性");
|
||||
DrawElement("LightResistance", "光属性抗性");
|
||||
DrawElement("FireResistance", "火属性抗性");
|
||||
DrawElement("WaterResistance", "水属性抗性");
|
||||
|
||||
//绘制四属强
|
||||
DrawElement("DarkAttack", "暗属性强化");
|
||||
DrawElement("LightAttack", "光属性强化");
|
||||
DrawElement("FireAttack", "火属性强化");
|
||||
DrawElement("WaterAttack", "水属性强化");
|
||||
|
||||
//绘制属性攻击
|
||||
if (Equipment.ElementalProperty) {
|
||||
local Text = FontAssetManager.GenerateNormal(GameItem.EquipmentInfoTag.elemental_property_tag[Equipment.ElementalProperty], false, {
|
||||
color = sq_RGBA(215, 196, 147, 255)
|
||||
});
|
||||
Canvas.DrawActor(Text, 6, RealCanvasHeight);
|
||||
AddHeight();
|
||||
}
|
||||
|
||||
|
||||
//绘制描述
|
||||
if (Equipment.FlavorText) {
|
||||
//绘制分割
|
||||
Canvas.DrawLine(3, RealCanvasHeight + 3, 207, RealCanvasHeight + 3);
|
||||
RealCanvasHeight += 6;
|
||||
|
||||
local Text = FontAssetManager.GenerateNormal(Equipment.FlavorText, false, {
|
||||
color = sq_RGBA(133, 121, 80, 255),
|
||||
wrap_width = 204
|
||||
});
|
||||
Canvas.DrawActor(Text, 6, RealCanvasHeight);
|
||||
RealCanvasHeight += Text.GetSize().h;
|
||||
}
|
||||
|
||||
Canvas.EndDraw();
|
||||
Addchild(Canvas);
|
||||
}
|
||||
|
||||
//绘制属强属抗
|
||||
function DrawElement(Type, TypeName) {
|
||||
if (Equipment[Type] != 0) {
|
||||
local AttackText = FontAssetManager.GenerateNormal(TypeName + " " + (Equipment[Type] >= 0 ? "+" : "-") + Equipment[Type], false, {
|
||||
color = sq_RGBA(215, 196, 147, 255)
|
||||
});
|
||||
Canvas.DrawActor(AttackText, 6, RealCanvasHeight);
|
||||
AddHeight();
|
||||
}
|
||||
}
|
||||
|
||||
//绘制命中
|
||||
function DrawStuck(Type, TypeName) {
|
||||
if (Equipment[Type] != 0) {
|
||||
local Value = Equipment[Type];
|
||||
local AttackText = FontAssetManager.GenerateNormal(TypeName + " " + (Value >= 0 ? "+" : "") + Value + "%", false, {
|
||||
color = sq_RGBA(215, 196, 147, 255)
|
||||
});
|
||||
Canvas.DrawActor(AttackText, 6, RealCanvasHeight);
|
||||
AddHeight();
|
||||
}
|
||||
}
|
||||
|
||||
//绘制双爆
|
||||
function DrawCritical(Type, TypeName) {
|
||||
if (Equipment[Type] != 0) {
|
||||
local AttackText = FontAssetManager.GenerateNormal(TypeName + " " + (Equipment[Type] >= 0 ? "+" : "-") + Equipment[Type] + "%", false, {
|
||||
color = sq_RGBA(215, 196, 147, 255)
|
||||
});
|
||||
Canvas.DrawActor(AttackText, 6, RealCanvasHeight);
|
||||
AddHeight();
|
||||
}
|
||||
}
|
||||
|
||||
//绘制三速
|
||||
function DrawSpeed(Type, TypeName) {
|
||||
if (Equipment[Type] != 0) {
|
||||
local Value = (Equipment[Type].tofloat() * 0.1).tointeger();
|
||||
local AttackText = FontAssetManager.GenerateNormal(TypeName + " " + (Value >= 0 ? "+" : "-") + Value + "%", false, {
|
||||
color = sq_RGBA(215, 196, 147, 255)
|
||||
});
|
||||
Canvas.DrawActor(AttackText, 6, RealCanvasHeight);
|
||||
AddHeight();
|
||||
}
|
||||
}
|
||||
|
||||
//绘制四维
|
||||
function DrawAttribute(Type, TypeName) {
|
||||
if (Equipment[Type] != 0) {
|
||||
local AttackText = FontAssetManager.GenerateNormal(TypeName + " " + Equipment[Type], false, {
|
||||
color = sq_RGBA(134, 120, 79, 255)
|
||||
});
|
||||
Canvas.DrawActor(AttackText, 6, RealCanvasHeight);
|
||||
AddHeight();
|
||||
}
|
||||
}
|
||||
|
||||
//绘制三攻
|
||||
function DrawAttack(Type, TypeName) {
|
||||
if (Equipment[Type] != null) {
|
||||
local RealValue;
|
||||
//数组为没有百分比计算过的原始数据
|
||||
if (typeof Equipment[Type] == "array") {
|
||||
local MaxValue = Equipment[Type][0];
|
||||
local MinValue = Equipment[Type][1];
|
||||
local Rate = Equipment.Property ? Equipment.Property[Type + "Rate"] : 100;
|
||||
Rate = Rate.tofloat() / 100.0;
|
||||
RealValue = (MinValue + ((MaxValue - MinValue).tofloat() * Rate).tointeger());
|
||||
}
|
||||
//百分比计算过的数据
|
||||
else if (typeof Equipment[Type] == "integer") {
|
||||
RealValue = Equipment[Type];
|
||||
}
|
||||
local AttackText = FontAssetManager.GenerateNormal(TypeName + " " + RealValue, false, {
|
||||
color = sq_RGBA(134, 120, 79, 255)
|
||||
});
|
||||
Canvas.DrawActor(AttackText, 6, RealCanvasHeight);
|
||||
AddHeight();
|
||||
}
|
||||
}
|
||||
|
||||
//增加行高
|
||||
function AddHeight() {
|
||||
RealCanvasHeight += 16;
|
||||
}
|
||||
//增加分割行
|
||||
function AddSliceLine() {
|
||||
RealCanvasHeight += 18;
|
||||
Canvas.DrawLine(3, RealCanvasHeight, 207, RealCanvasHeight);
|
||||
RealCanvasHeight += 2;
|
||||
}
|
||||
|
||||
// 根据数值获取对应的品级文字
|
||||
function GetPercentageText(num) {
|
||||
|
|
@ -196,6 +366,8 @@ class GameItem.Equipment extends GameItem.Item {
|
|||
SellPrice = -1;
|
||||
//耐久度
|
||||
Durability = -1;
|
||||
//冒险家名望
|
||||
AdventurerFame = 0;
|
||||
//装备可穿戴职业
|
||||
Job = 0;
|
||||
//装备图标
|
||||
|
|
@ -212,6 +384,61 @@ class GameItem.Equipment extends GameItem.Item {
|
|||
//装备属性
|
||||
Property = null;
|
||||
|
||||
//力量
|
||||
PhysicalAttack = 0;
|
||||
//智力
|
||||
MagicalAttack = 0;
|
||||
//体力
|
||||
PhysicalDefense = 0;
|
||||
//精神
|
||||
MagicalDefense = 0;
|
||||
//所有属强
|
||||
AllElementalAttack = 0;
|
||||
//暗属强
|
||||
DarkAttack = 0;
|
||||
//光属强
|
||||
LightAttack = 0;
|
||||
//水属强
|
||||
WaterAttack = 0;
|
||||
//火属强
|
||||
FireAttack = 0;
|
||||
|
||||
//物理攻击力
|
||||
EquipmentPhysicalAttack = 0;
|
||||
//魔法攻击力
|
||||
EquipmentMagicalAttack = 0;
|
||||
//独立攻击力
|
||||
SeparateAttack = 0;
|
||||
|
||||
//攻击速度
|
||||
AttackSpeed = 0;
|
||||
//释放速度
|
||||
CastSpeed = 0;
|
||||
//移动速度
|
||||
MoveSpeed = 0;
|
||||
|
||||
//物理暴击率
|
||||
PhysicalCriticalHit = 0;
|
||||
//魔法暴击率
|
||||
MagicalCriticalHit = 0;
|
||||
//命中率
|
||||
Stuck = 0;
|
||||
|
||||
//暗属抗
|
||||
DarkResistance = 0;
|
||||
//光属抗
|
||||
LightResistance = 0;
|
||||
//水属抗
|
||||
WaterResistance = 0;
|
||||
//火属抗
|
||||
FireResistance = 0;
|
||||
|
||||
//属性攻击
|
||||
ElementalProperty = null;
|
||||
|
||||
//描述
|
||||
FlavorText = null;
|
||||
|
||||
constructor(...) {
|
||||
//直接裸构造
|
||||
if (vargv.len() == 0) {
|
||||
|
|
@ -246,6 +473,8 @@ class GameItem.Equipment extends GameItem.Item {
|
|||
if (EquInfo.rawin("value")) SellPrice = EquInfo["value"];
|
||||
//耐久度
|
||||
if (EquInfo.rawin("durability")) Durability = EquInfo["durability"];
|
||||
//冒险家名望
|
||||
if (EquInfo.rawin("adventurerfame")) AdventurerFame = EquInfo["adventurerfame"];
|
||||
//职业
|
||||
if (EquInfo.rawin("usable_job")) Job = EquInfo["usable_job"];
|
||||
//图标
|
||||
|
|
@ -253,6 +482,40 @@ class GameItem.Equipment extends GameItem.Item {
|
|||
if (EquInfo.rawin("Ani")) Animation_Job = EquInfo["Ani"];
|
||||
if (EquInfo.rawin("DirPath")) DirPath = EquInfo["DirPath"];
|
||||
if (EquInfo.rawin("aurora_effects")) Aurora_effects = EquInfo["aurora_effects"];
|
||||
|
||||
//四维
|
||||
if (EquInfo.rawin("physical attack")) PhysicalAttack = EquInfo["physical attack"];
|
||||
if (EquInfo.rawin("magical attack")) MagicalAttack = EquInfo["magical attack"];
|
||||
if (EquInfo.rawin("physical defense")) PhysicalDefense = EquInfo["physical defense"];
|
||||
if (EquInfo.rawin("magical defense")) MagicalDefense = EquInfo["magical defense"];
|
||||
//属强
|
||||
if (EquInfo.rawin("all elemental attack")) AllElementalAttack = EquInfo["all elemental attack"];
|
||||
if (EquInfo.rawin("dark attack")) DarkAttack = EquInfo["dark attack"];
|
||||
if (EquInfo.rawin("light attack")) LightAttack = EquInfo["light attack"];
|
||||
if (EquInfo.rawin("water attack")) WaterAttack = EquInfo["water attack"];
|
||||
if (EquInfo.rawin("fire attack")) FireAttack = EquInfo["fire attack"];
|
||||
//三攻
|
||||
if (EquInfo.rawin("equipment physical attack")) EquipmentPhysicalAttack = EquInfo["equipment physical attack"];
|
||||
if (EquInfo.rawin("equipment magical attack")) EquipmentMagicalAttack = EquInfo["equipment magical attack"];
|
||||
if (EquInfo.rawin("separate attack")) SeparateAttack = EquInfo["separate attack"];
|
||||
//三速
|
||||
if (EquInfo.rawin("attack speed")) AttackSpeed = EquInfo["attack speed"];
|
||||
if (EquInfo.rawin("cast speed")) CastSpeed = EquInfo["cast speed"];
|
||||
if (EquInfo.rawin("move speed")) MoveSpeed = EquInfo["move speed"];
|
||||
//双暴
|
||||
if (EquInfo.rawin("physical critical hit")) PhysicalCriticalHit = EquInfo["physical critical hit"];
|
||||
if (EquInfo.rawin("magical critical hit")) MagicalCriticalHit = EquInfo["magical critical hit"];
|
||||
//命中率
|
||||
if (EquInfo.rawin("stuck")) Stuck = -EquInfo["stuck"];
|
||||
//四属抗
|
||||
if (EquInfo.rawin("dark resistance")) DarkResistance = EquInfo["dark resistance"];
|
||||
if (EquInfo.rawin("light resistance")) LightResistance = EquInfo["light resistance"];
|
||||
if (EquInfo.rawin("water resistance")) WaterResistance = EquInfo["water resistance"];
|
||||
if (EquInfo.rawin("fire resistance")) FireResistance = EquInfo["fire resistance"];
|
||||
//属性攻击
|
||||
if (EquInfo.rawin("elemental property")) ElementalProperty = EquInfo["elemental property"];
|
||||
//描述
|
||||
if (EquInfo.rawin("flavor text")) FlavorText = EquInfo["flavor text"];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -11,21 +11,89 @@ function TestStage() {
|
|||
|
||||
|
||||
// local Window = Sq_CreateWindow(_Login_Window, "登录界面窗口", 0, 0, 1066, 600, 0);
|
||||
// local Window = Sq_CreateWindow(_Select_Character_Window, "选择角色窗口", 0, 0, 1066, 600, 0);
|
||||
// local Window = Sq_CreateWindow(_CreateCharacter, "创建角色界面窗口", 0, 0, 1066, 600, 0);
|
||||
|
||||
|
||||
|
||||
// local Equ = GameItem.Equipment(27675);
|
||||
// local Window = Equ.GetEquipmentInfoWindow();
|
||||
// Window.SetPosition(100, 80);
|
||||
// Window.ResetFocus();
|
||||
|
||||
// local Equ = GameItem.Equipment(101020048);
|
||||
// local Window = Equ.GetEquipmentInfoWindow();
|
||||
// Window.SetPosition(350, 80);
|
||||
// Window.ResetFocus();
|
||||
|
||||
// local Equ = GameItem.Equipment(24144);
|
||||
// local Window = Equ.GetEquipmentInfoWindow();
|
||||
// Window.SetPosition(580, 80);
|
||||
// Window.ResetFocus();
|
||||
|
||||
local Window = Sq_CreateWindow(_Inventory, "背包窗口", 150, 12, 257, 555, 20);
|
||||
|
||||
// local Window = Sq_CreateWindow(_Inventory, "背包窗口", 150, 12, 257, 555, 20);
|
||||
// //大背景
|
||||
// local BackGround = CL_SpriteObject("sprite/map/npc/2019_halloween_blossom_normal.img", 0);
|
||||
// BackGround.SetPosition(300, 150);
|
||||
// BackGround.SetOutline(true);
|
||||
// T.Addchild(BackGround);
|
||||
|
||||
|
||||
// local Fontobj = Font();
|
||||
// local NPCobj = GameObject.NPC(2);
|
||||
// NPCobj.SetPosition(400, 400, 0);
|
||||
// T.Addchild(NPCobj);
|
||||
|
||||
// local TownObj = Town(1);
|
||||
// local Charc = GameObject.CreateCharacter(0, [101590007, 27675, 601500060, 601550060, 601560058, 601570053, 601520052, 601500060, 601510059, 601530051, 601540060, 601580023]);
|
||||
// Charc.SetPosition(356, 250, 0);
|
||||
// Charc.SetAnimation("RestAni");
|
||||
// TownObj.AddObject(Charc, true);
|
||||
// ClientCharacter = Charc;
|
||||
|
||||
|
||||
// local infoWindow = Sq_CreateWindow(_PersonalInfo, "个人信息窗口", 250, 60, 286, 530, 20);
|
||||
// local Window = Sq_CreateWindow(_Select_Character_Window, "选择角色界面窗口", 0, 0, 1066, 600, 0);
|
||||
// local T = {
|
||||
// loginImg = 1,
|
||||
// charac = [{
|
||||
// lv = 90,
|
||||
// name = "倾泪寒",
|
||||
// job = 0,
|
||||
// equip = [101020001, 601500060, 601550060, 601560058, 601570053, 601520052, 601500060, 601510059, 601530051, 601540060, 601580023, 609590003]
|
||||
// }, {
|
||||
// lv = 90,
|
||||
// name = "倾泪寒222",
|
||||
// job = 0,
|
||||
// equip = [101020023, 601500059, 601550059, 601560057, 601570052, 601520051, 601500059, 601510058, 601530050, 601540059, 601580022, 609590003]
|
||||
// }, {
|
||||
// lv = 90,
|
||||
// name = "Kina",
|
||||
// job = 0,
|
||||
// equip = [101020026, 601500058, 601550058, 601560056, 601570051, 601520050, 601500058, 601510057, 601530049, 601540058, 601580021, 609590003]
|
||||
// }, {
|
||||
// lv = 90,
|
||||
// name = "测试角色",
|
||||
// job = 0,
|
||||
// equip = [101020037, 601500061, 601550061, 601560059, 601570054, 601520053, 601500061, 601510060, 601530052, 601540061, 601580024, 609590003]
|
||||
// }]
|
||||
// };
|
||||
// Window.Init(T);
|
||||
|
||||
local Window = Sq_CreateWindow(_Inventory, "背包窗口", 150, 12, 259, 555, 20);
|
||||
// Window.SetScale(0.92, 0.92);
|
||||
|
||||
// local Actorobj = Actor();
|
||||
// Actorobj.ShowBorder(true);
|
||||
// Actorobj.SetSize(1500, 100);
|
||||
// local Name = FontAssetManager.GenerateNormal("是的呢参加考试你打", true, {
|
||||
// color = sq_RGBA(209, 185, 148, 255),
|
||||
// alignment = TextAlign.Center,
|
||||
// wrap_width = 50
|
||||
// });
|
||||
// Name.ShowBorder(true);
|
||||
// Name.SetSize(1500, 100);
|
||||
// Name.SetPosition(200, 200);
|
||||
// Actorobj.Addchild(Name);
|
||||
// T.Addchild(Actorobj);
|
||||
|
||||
// print(ObjectCount);
|
||||
|
||||
// Sq_CreateWindow(_CreateCharacter, "创建角色界面窗口", 0, 0, 1066, 600, 0);
|
||||
|
||||
}
|
||||
|
|
@ -12,7 +12,7 @@ class Yosin_TopTitle extends Yosin_CommonUi {
|
|||
base.constructor(0, 0, W, H);
|
||||
|
||||
//内容背景
|
||||
if (drawBackground){
|
||||
if (drawBackground) {
|
||||
local background = Yosin_NineBoxStretch(-1, 15, W + 1, H - 15, "sprite/interface/lenheartwindowcommon.img", 97);
|
||||
AddUIChild(background);
|
||||
}
|
||||
|
|
@ -24,7 +24,7 @@ class Yosin_TopTitle extends Yosin_CommonUi {
|
|||
// 标题亮色背景
|
||||
local BackgroundBright = CL_SpriteObject("sprite/interface/lenheartwindowcommon.img", 483);
|
||||
local scaleW = (W / BackgroundBright.GetSize().w).tofloat();
|
||||
BackgroundBright.SetScale( scaleW , 1);
|
||||
BackgroundBright.SetScale(scaleW, 1);
|
||||
BackgroundBright.SetPosition(0, 1);
|
||||
Addchild(BackgroundBright);
|
||||
|
||||
|
|
|
|||
|
|
@ -1,53 +0,0 @@
|
|||
/*
|
||||
文件名:5_Inventory.nut
|
||||
路径:User/UI/Window/5_Inventory.nut
|
||||
创建日期:2025-01-02 12:37
|
||||
文件用途: 背包窗口
|
||||
*/
|
||||
|
||||
class _Inventory extends Yosin_Window {
|
||||
|
||||
item = null;
|
||||
dressUpTitleBtn = null;
|
||||
petTitleBtn = null;
|
||||
stoneTitleBtn = null;
|
||||
|
||||
constructor(gObjectId, gX, gY, gWidth, gHeight, gTitleH) {
|
||||
base.constructor(gObjectId, gX, gY, gWidth, gHeight, gTitleH);
|
||||
|
||||
local title = Yosin_TopTitle(gWidth, gHeight, "装备栏(I)");
|
||||
AddUIChild(title);
|
||||
|
||||
local item2 = Yosin_EmeStretch(100, 100, 80, 25, "sprite/interface/lenheartwindowcommon.img", 160);
|
||||
Addchild(item2);
|
||||
|
||||
//注册控件
|
||||
RegisterWidget();
|
||||
}
|
||||
|
||||
function RegisterWidget() {
|
||||
|
||||
//, "装扮", "宠物", "护石"
|
||||
local titlesBtn = Yosin_RowMoreTitleBtn(10, 25, ["物品栏"]);
|
||||
AddUIChild(titlesBtn);
|
||||
|
||||
titlesBtn.LBDownOnClick = function(btns, index) {
|
||||
|
||||
};
|
||||
|
||||
|
||||
local item = Yosin_SplicingButton(10, 50, 80, 25, "sprite/interface/lenheartwindowcommon.img", 160, true, false);
|
||||
AddUIChild(item);
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
//逻辑入口
|
||||
function Proc(Dt) {
|
||||
SyncPos(X, Y);
|
||||
base.Proc(Dt);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -1,4 +1,3 @@
|
|||
|
||||
/*
|
||||
文件名:Inventory_EquipmentPage.nut
|
||||
路径:User/UI/Window/5_Inventory/Inventory_EquipmentPage.nut
|
||||
|
|
@ -7,7 +6,7 @@
|
|||
*/
|
||||
|
||||
// 背包装备页面
|
||||
class Inventory_EquipmentPage extends Yosin_CommonUi{
|
||||
class Inventory_EquipmentPage extends Yosin_CommonUi {
|
||||
|
||||
constructor(x, y, w, h) {
|
||||
base.constructor(x, y, w, h);
|
||||
|
|
@ -28,7 +27,7 @@ class Inventory_EquipmentPage extends Yosin_CommonUi{
|
|||
|
||||
|
||||
// 上半部分 人物装备穿戴
|
||||
class Inventory_CharactersEquipment extends Yosin_CommonUi{
|
||||
class Inventory_CharactersEquipment extends Yosin_CommonUi {
|
||||
|
||||
// 展示其他装备
|
||||
showOtherEquipment = null;
|
||||
|
|
@ -56,24 +55,24 @@ class Inventory_CharactersEquipment extends Yosin_CommonUi{
|
|||
|
||||
// 装备栏背景
|
||||
local equipmentBackground = CL_SpriteObject("sprite/interface/newstyle/windows/inventory/inventory.img", 21);
|
||||
equipmentBackground.SetPosition( 5, 5);
|
||||
equipmentBackground.SetPosition(5, 5);
|
||||
Addchild(equipmentBackground);
|
||||
|
||||
|
||||
// 顶部光线
|
||||
local topLight = CL_SpriteObject("sprite/interface/newstyle/windows/inventory/inventory.img", 178);
|
||||
topLight.SetPosition( Width / 2 - topLight.GetSize().w/2, 0);
|
||||
topLight.SetPosition(Width / 2 - topLight.GetSize().w / 2, 0);
|
||||
Addchild(topLight);
|
||||
|
||||
// todo 角色展示
|
||||
|
||||
// 结婚戒指槽位
|
||||
local ringSlotBg = CL_SpriteObject("sprite/interface/newstyle/windows/inventory/inventory_cn.img", 0);
|
||||
ringSlotBg.SetPosition( Width / 2 - ringSlotBg.GetSize().w/2, 5);
|
||||
ringSlotBg.SetPosition(Width / 2 - ringSlotBg.GetSize().w / 2, 5);
|
||||
Addchild(ringSlotBg);
|
||||
|
||||
// 首饰
|
||||
if (showOtherEquipment){
|
||||
if (showOtherEquipment) {
|
||||
// 辅助装备
|
||||
local assist = CL_SpriteObject("sprite/interface/newstyle/windows/inventory/inventory.img", 19);
|
||||
assist.SetPosition(179, 69);
|
||||
|
|
@ -126,12 +125,15 @@ class InventoryItem extends Yosin_CommonUi {
|
|||
Addchild(weight);
|
||||
|
||||
// 重量进度条
|
||||
<<<<<<< HEAD
|
||||
local weightSchedule = Yosin_Schedule(weight.right() + 2, weight.Y + 4 , 125, 10, "sprite/interface/newstyle/windows/inventory/inventory.img", 1, 0.7);
|
||||
=======
|
||||
local weightSchedule = Yosin_Schedule(weight.right() + 2, weight.Y + 4, 125, 10, "sprite/interface/newstyle/windows/inventory/inventory.img", 1);
|
||||
weightSchedule.SetPercentage(0.6);
|
||||
>>>>>>> origin/dong
|
||||
Addchild(weightSchedule);
|
||||
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
|
@ -8,7 +8,7 @@
|
|||
|
||||
|
||||
// 物品栏
|
||||
class itemCollection extends Yosin_CommonUi{
|
||||
class itemCollection extends Yosin_CommonUi {
|
||||
|
||||
// 行
|
||||
column = null;
|
||||
|
|
@ -22,7 +22,7 @@ class itemCollection extends Yosin_CommonUi{
|
|||
columnNum = null;
|
||||
rowNum = null;
|
||||
|
||||
constructor(x, y, w, h, columnNum,rowNum ) {
|
||||
constructor(x, y, w, h, columnNum, rowNum) {
|
||||
base.constructor(x, y, w, h);
|
||||
this.columnNum = columnNum;
|
||||
this.rowNum = rowNum;
|
||||
|
|
@ -36,9 +36,9 @@ class itemCollection extends Yosin_CommonUi{
|
|||
|
||||
local itemX = 4;
|
||||
local itemY = 3;
|
||||
for (local i = 0; i < columnNum; i++) {
|
||||
for (local i = 0; i< columnNum; i++) {
|
||||
local cells = [];
|
||||
for (local i = 0; i < rowNum; i++) {
|
||||
for (local i = 0; i< rowNum; i++) {
|
||||
local bg = CL_SpriteObject("sprite/interface/newstyle/windows/inventory/inventory.img", 49);
|
||||
bg.SetPosition(itemX, itemY);
|
||||
Addchild(bg);
|
||||
|
|
@ -65,7 +65,7 @@ class itemCollection extends Yosin_CommonUi{
|
|||
function OnMouseProc(MousePos_X, MousePos_Y) {
|
||||
base.OnMouseProc(MousePos_X, MousePos_Y);
|
||||
|
||||
if (isInRect){
|
||||
if (isInRect) {
|
||||
local WorldPosition = this.GetWorldPosition();
|
||||
local xx = MousePos_X - WorldPosition.x;
|
||||
local yy = MousePos_Y - WorldPosition.y;
|
||||
|
|
@ -73,20 +73,20 @@ class itemCollection extends Yosin_CommonUi{
|
|||
local row = (xx / 30).tointeger();
|
||||
|
||||
|
||||
local inRadius = column < columnNum && row < rowNum;
|
||||
local inRadius = column< columnNum && row< rowNum;
|
||||
local change = column != this.column || row != this.row;
|
||||
// 移动到另一个槽
|
||||
if ( change && inRadius) {
|
||||
if (change && inRadius) {
|
||||
|
||||
this.column = column;
|
||||
this.row = row;
|
||||
|
||||
rect.SetVisible(true);
|
||||
rect.SetPosition( row * 30, column * 30);
|
||||
rect.SetPosition(row * 30, column * 30);
|
||||
|
||||
}
|
||||
|
||||
}else{
|
||||
} else {
|
||||
this.column = null;
|
||||
this.row = null;
|
||||
rect.SetVisible(false);
|
||||
|
|
|
|||
Loading…
Reference in New Issue