Merge remote-tracking branch 'origin/dong' into yi
# Conflicts: # sqr/SquirrelFileConfig.cfg
This commit is contained in:
		
						commit
						97383b8cd6
					
				|  | @ -4,3 +4,5 @@ Yosin_Game_Reloading.Sign | ||||||
| Script.pvf | Script.pvf | ||||||
| Yosin_Engine.pdb | Yosin_Engine.pdb | ||||||
| *.pvf | *.pvf | ||||||
|  | sqr/.vscode/launch.json | ||||||
|  | Music/ | ||||||
|  |  | ||||||
							
								
								
									
										
											BIN
										
									
								
								Yosin_Engine.exe
								
								
								
								
							
							
						
						
									
										
											BIN
										
									
								
								Yosin_Engine.exe
								
								
								
								
							
										
											Binary file not shown.
										
									
								
							|  | @ -1,20 +0,0 @@ | ||||||
| { |  | ||||||
|     // 使用 IntelliSense 了解相关属性。  |  | ||||||
|     // 悬停以查看现有属性的描述。 |  | ||||||
|     // 欲了解更多信息,请访问: https://go.microsoft.com/fwlink/?linkid=830387 |  | ||||||
|     "version": "0.2.0", |  | ||||||
|     "configurations": [ |  | ||||||
|         { |  | ||||||
|             "type": "squirrel", |  | ||||||
|             "request": "attach", |  | ||||||
|             "name": "Server", |  | ||||||
|             "port": 2222 |  | ||||||
|         }, |  | ||||||
|         { |  | ||||||
|             "type": "squirrel", |  | ||||||
|             "request": "attach", |  | ||||||
|             "name": "Client", |  | ||||||
|             "port": 2222 |  | ||||||
|         } |  | ||||||
|     ] |  | ||||||
| } |  | ||||||
|  | @ -222,7 +222,7 @@ class Animation extends Actor { | ||||||
|                 } |                 } | ||||||
|             } |             } | ||||||
|         } |         } | ||||||
|         //Animation类下只会有精灵 因此不需要对子对象进行更新 |         //Animation类下只会有精灵 因此不需要对子对象进行更新  还有可能有als  还得想办法优化 | ||||||
|         // base.OnUpdate(dt); |         base.OnUpdate(dt); | ||||||
|     } |     } | ||||||
| } | } | ||||||
|  | @ -4,6 +4,7 @@ | ||||||
| 创建日期:2024-05-05	00:22 | 创建日期:2024-05-05	00:22 | ||||||
| 文件用途:舞台类 | 文件用途:舞台类 | ||||||
| */ | */ | ||||||
|  | if (!getroottable().rawin("GlobalCurrentStage")) GlobalCurrentStage <- null; | ||||||
| class CL_StageObject extends CL_BaseObject { | class CL_StageObject extends CL_BaseObject { | ||||||
| 
 | 
 | ||||||
|     constructor(...) { |     constructor(...) { | ||||||
|  | @ -28,9 +29,8 @@ class CL_StageObject extends CL_BaseObject { | ||||||
|         //如果进入场景要绑定Update |         //如果进入场景要绑定Update | ||||||
|         BindenvUpdate(); |         BindenvUpdate(); | ||||||
| 
 | 
 | ||||||
|         //并且绑定摄像机 先移除父对象在绑定 |         //添加到全局 | ||||||
|         // if (CameraObject.ParentId) CameraObject.RemoveSelf(); |         GlobalCurrentStage = this; | ||||||
|         // Addchild(CameraObject); |  | ||||||
|     } |     } | ||||||
| 
 | 
 | ||||||
|     function OnUpdate(Dt) { |     function OnUpdate(Dt) { | ||||||
|  | @ -40,3 +40,8 @@ class CL_StageObject extends CL_BaseObject { | ||||||
|     } |     } | ||||||
| 
 | 
 | ||||||
| } | } | ||||||
|  | 
 | ||||||
|  | //获取当前场景 | ||||||
|  | function sq_GetCurrentStage() { | ||||||
|  |     return GlobalCurrentStage; | ||||||
|  | } | ||||||
|  | @ -252,6 +252,16 @@ class Math { | ||||||
| 
 | 
 | ||||||
|     } |     } | ||||||
| 
 | 
 | ||||||
|  |     //判断一个点是否存在于一个矩形中 | ||||||
|  |     function PointIsInSquare(x1, y1, SquareArr) { | ||||||
|  |         return Sq_Is_Point_In_Square(x1, y1, SquareArr); | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     //判断一个点是否存在于一个矩形中 返回是哪一个矩形 | ||||||
|  |     function PointIsInWhichRectangle(x1, y1, SquareArr) { | ||||||
|  |         return Sq_Is_Point_In_WhichRectangle(x1, y1, SquareArr); | ||||||
|  |     } | ||||||
|  | 
 | ||||||
| 
 | 
 | ||||||
|     //获得给定4个点形成的四边形面积 |     //获得给定4个点形成的四边形面积 | ||||||
|     function get4PointArea(x1, y1, x2, y2, x3, y3, x4, y4) { |     function get4PointArea(x1, y1, x2, y2, x3, y3, x4, y4) { | ||||||
|  | @ -336,14 +346,14 @@ class Math { | ||||||
|     } |     } | ||||||
| 
 | 
 | ||||||
| 
 | 
 | ||||||
|     function getMax(a, b) { |     function Max(a, b) { | ||||||
|         if (a< b) |         if (a< b) | ||||||
|             return b; |             return b; | ||||||
|         return a; |         return a; | ||||||
|     } |     } | ||||||
| 
 | 
 | ||||||
| 
 | 
 | ||||||
|     function getMin(a, b) { |     function Min(a, b) { | ||||||
|         if (a > b) |         if (a > b) | ||||||
|             return b; |             return b; | ||||||
|         return a; |         return a; | ||||||
|  |  | ||||||
|  | @ -15,7 +15,7 @@ enum MouseButton { | ||||||
| }; | }; | ||||||
| enum KeyCode { | enum KeyCode { | ||||||
|     nknown ///< 未知 |     nknown ///< 未知 | ||||||
|     p ///< 上键 |     Up ///< 上键 | ||||||
|     Left ///< 左键 |     Left ///< 左键 | ||||||
|     Right ///< 右键 |     Right ///< 右键 | ||||||
|     Down ///< 下键 |     Down ///< 下键 | ||||||
|  |  | ||||||
|  | @ -4,9 +4,17 @@ | ||||||
| 创建日期:2024-12-01	12:25 | 创建日期:2024-12-01	12:25 | ||||||
| 文件用途:游戏进程 | 文件用途:游戏进程 | ||||||
| */ | */ | ||||||
|  | //游戏逻辑函数Map | ||||||
|  | _Game_Logic_Func_ <- {}; | ||||||
|  | 
 | ||||||
| function _Yosin_Game_Logic_(Dt, GameLister) { | function _Yosin_Game_Logic_(Dt, GameLister) { | ||||||
|     //Socket连接嗅探处理包 |     //Socket连接嗅探处理包 | ||||||
|     foreach(SocketObj in _Socket_Map_) { |     foreach(SocketObj in _Socket_Map_) { | ||||||
|         SocketObj.DispatchPacket(); |         SocketObj.DispatchPacket(); | ||||||
|     } |     } | ||||||
|  | 
 | ||||||
|  |     //游戏逻辑函数 | ||||||
|  |     foreach(Key, Func in _Game_Logic_Func_) { | ||||||
|  |         Func(Dt, GameLister); | ||||||
|  |     } | ||||||
| } | } | ||||||
|  | @ -0,0 +1,39 @@ | ||||||
|  | /* | ||||||
|  | 文件名:InputClass.nut | ||||||
|  | 路径:Core/InputClass/InputClass.nut | ||||||
|  | 创建日期:2024-12-21	07:27 | ||||||
|  | 文件用途:输入类 | ||||||
|  | */ | ||||||
|  | 
 | ||||||
|  | //输入逻辑函数Map | ||||||
|  | _Game_Input_Func_ <- {}; | ||||||
|  | 
 | ||||||
|  | class _Input_ { | ||||||
|  |     constructor() { | ||||||
|  |         _Game_Input_Func_.rawset("SystemInput", SystemInput.bindenv(this)); | ||||||
|  |         // _Game_Logic_Func_.rawset("SystemInput", Proc.bindenv(this)); | ||||||
|  |         getroottable().Input <- this; | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     //系统对游戏的输入 | ||||||
|  |     function SystemInput(Code, Type) { | ||||||
|  | 
 | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     //Proc逻辑 | ||||||
|  |     function Proc(Dt, GameLister) { | ||||||
|  | 
 | ||||||
|  |     } | ||||||
|  | } | ||||||
|  | 
 | ||||||
|  | 
 | ||||||
|  | //输入逻辑入口 | ||||||
|  | function _Yosin_Game_Input_Logic_(Code, Type) { | ||||||
|  |     foreach(Key, Func in _Game_Input_Func_) { | ||||||
|  |         local Ret = Func(Code, Type); | ||||||
|  |         //主体对象释放 删除自己 | ||||||
|  |         if (Ret == -1) { | ||||||
|  |             _Game_Input_Func_.rawdelete(Key); | ||||||
|  |         } | ||||||
|  |     } | ||||||
|  | } | ||||||
|  | @ -25,9 +25,17 @@ e:\Yosin&Kiwano_DOF\sqr\Core\extraCalss\Socket\Socket.nut | ||||||
| 
 | 
 | ||||||
| e:\Yosin&Kiwano_DOF\sqr\Core\Game_Proc\Game_Proc.nut | e:\Yosin&Kiwano_DOF\sqr\Core\Game_Proc\Game_Proc.nut | ||||||
| 
 | 
 | ||||||
|  | <<<<<<< HEAD | ||||||
| e:\Yosin&Kiwano_DOF\sqr\Core\UI_Class\UI_Cursor.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_Core.nut | ||||||
| e:\Yosin&Kiwano_DOF\sqr\Core\UI_Class\UI_Widget.nut | e:\Yosin&Kiwano_DOF\sqr\Core\UI_Class\UI_Widget.nut | ||||||
|  | ======= | ||||||
|  | e:\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 | ||||||
|  | >>>>>>> origin/dong | ||||||
| 
 | 
 | ||||||
| 
 | 
 | ||||||
| e:\Yosin&Kiwano_DOF\sqr\User\_eNUM\global_object.nut | e:\Yosin&Kiwano_DOF\sqr\User\_eNUM\global_object.nut | ||||||
|  | @ -44,11 +52,17 @@ e:\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\Item.nut | ||||||
| e:\Yosin&Kiwano_DOF\sqr\User\Asset\Item\equipment.nut | e:\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 | ||||||
|  | 
 | ||||||
| e:\Yosin&Kiwano_DOF\sqr\User\Object\StateMachine\StateMachineClass.nut | e:\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\BaseObject.nut | ||||||
| e:\Yosin&Kiwano_DOF\sqr\User\Object\Object\AnimationObject.nut | e:\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\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 | e:\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\GameObjectClass.nut | ||||||
|  |  | ||||||
|  | @ -12,6 +12,8 @@ class _AssetManager_ { | ||||||
|     CharacterInfoList = null; |     CharacterInfoList = null; | ||||||
|     //地图列表 |     //地图列表 | ||||||
|     MapList = null; |     MapList = null; | ||||||
|  |     //城镇列表 | ||||||
|  |     TownList = null; | ||||||
|     //装备列表 |     //装备列表 | ||||||
|     EquipmentList = null; |     EquipmentList = null; | ||||||
| 
 | 
 | ||||||
|  | @ -134,7 +136,23 @@ class _AssetManager_ { | ||||||
|         }); |         }); | ||||||
|     } |     } | ||||||
| 
 | 
 | ||||||
|  |     function InitTownList() { | ||||||
|  |         TownList = ScriptData.GetFileData("town/town.lst", function(DataTable, Data) { | ||||||
|  |             while (!Data.Eof()) { | ||||||
|  |                 local Key = Data.Get(); | ||||||
|  |                 //注册城镇列表 路径写入 数据未读取 | ||||||
|  |                 DataTable.rawset(Key, { | ||||||
|  |                     Path = Data.Get(), | ||||||
|  |                     Data = null | ||||||
|  |                 }); | ||||||
|  |             } | ||||||
|  |             if (_DEBUG_) print("加载城镇List完成, 共" + DataTable.len() + "个"); | ||||||
|  |         }); | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|     constructor() { |     constructor() { | ||||||
|  |         //初始化城镇列表 | ||||||
|  |         InitTownList(); | ||||||
|         //初始化地图列表 |         //初始化地图列表 | ||||||
|         InitMapList(); |         InitMapList(); | ||||||
|         //初始化角色 |         //初始化角色 | ||||||
|  | @ -143,7 +161,6 @@ class _AssetManager_ { | ||||||
|         InitEquipmentList(); |         InitEquipmentList(); | ||||||
| 
 | 
 | ||||||
| 
 | 
 | ||||||
| 
 |  | ||||||
|         getroottable().AssetManager <- this; |         getroottable().AssetManager <- this; | ||||||
|     } |     } | ||||||
| 
 | 
 | ||||||
|  |  | ||||||
|  | @ -0,0 +1,80 @@ | ||||||
|  | /* | ||||||
|  | 文件名:Controller.nut | ||||||
|  | 路径:User/Controller/Controller.nut | ||||||
|  | 创建日期:2024-12-21	07:31 | ||||||
|  | 文件用途:控制器类 | ||||||
|  | */ | ||||||
|  | class _GameController_ extends _Input_ { | ||||||
|  | 
 | ||||||
|  |     //最新键码输入 | ||||||
|  |      | ||||||
|  | 
 | ||||||
|  |     KeyCode = null; | ||||||
|  |     GameKeyCode = null; | ||||||
|  |     GameKeyCodeCallback = null; | ||||||
|  | 
 | ||||||
|  |     constructor() { | ||||||
|  |         base.constructor(); | ||||||
|  |         GameKeyCodeCallback = {}; | ||||||
|  | 
 | ||||||
|  |         //建立键码表 按下flag全部为false | ||||||
|  |         this.KeyCode = {}; | ||||||
|  |         foreach(value in getconsttable().KeyCode) { | ||||||
|  |             this.KeyCode.rawset(value, false); | ||||||
|  |         } | ||||||
|  | 
 | ||||||
|  |         //建立游戏键码表 | ||||||
|  |         this.GameKeyCode = {}; | ||||||
|  |         foreach(Key, Value in getconsttable().CONTROLLER) { | ||||||
|  |             this.GameKeyCode.rawset(Key, Value); | ||||||
|  |         } | ||||||
|  |     } | ||||||
|  |     //系统对游戏的输入 | ||||||
|  |     function SystemInput(Code, Type) { | ||||||
|  |         SetKeyCode(Code, Type); | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     //设定键码状态 | ||||||
|  |     function SetKeyCode(Code, Status) { | ||||||
|  |         this.KeyCode[Code] = Status; | ||||||
|  | 
 | ||||||
|  |         //只遍历有回调的键码 | ||||||
|  |         foreach(Code, Callback in GameKeyCodeCallback) { | ||||||
|  |             //是否按下传递不同指令 | ||||||
|  |             if (GetGameKeyCode(Code)) { | ||||||
|  |                 Callback(true); | ||||||
|  |             } else { | ||||||
|  |                 Callback(false); | ||||||
|  |             } | ||||||
|  |         } | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     //获取键码状态 | ||||||
|  |     function GetKeyCode(Code) { | ||||||
|  |         return this.KeyCode[Code]; | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     //获取游戏键码状态 | ||||||
|  |     function GetGameKeyCode(Code) { | ||||||
|  |         if (!(GameKeyCode.rawin(Code))) return false; | ||||||
|  |         return GetKeyCode(GameKeyCode[Code]); | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     //注册游戏键码回调函数 | ||||||
|  |     function RegisterGameKeyCode(Code, Callback) { | ||||||
|  |         GameKeyCodeCallback[Code] <- Callback; | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     //Proc逻辑 | ||||||
|  |     function Proc(Dt, GameLister) { | ||||||
|  |         // //只遍历有回调的键码 | ||||||
|  |         // foreach(Code, Callback in GameKeyCodeCallback) { | ||||||
|  |         //     //是否按下传递不同指令 | ||||||
|  |         //     if (GetGameKeyCode(Code)) { | ||||||
|  |         //         Callback(true); | ||||||
|  |         //     } else { | ||||||
|  |         //         Callback(false); | ||||||
|  |         //     } | ||||||
|  |         // } | ||||||
|  |     } | ||||||
|  | } | ||||||
|  | @ -0,0 +1,103 @@ | ||||||
|  | /* | ||||||
|  | 文件名:ObjectController.nut | ||||||
|  | 路径:User/Controller/ObjectController.nut | ||||||
|  | 创建日期:2024-12-21	14:16 | ||||||
|  | 文件用途: | ||||||
|  | */ | ||||||
|  | 
 | ||||||
|  | //输入指令集 | ||||||
|  | class InputInstructionSpecial { | ||||||
|  |     //指令表 | ||||||
|  |     InstructionArray = null; | ||||||
|  |     //指令等待帧数 | ||||||
|  |     WaitFrame = null; | ||||||
|  |     //动态数据 | ||||||
|  |     DynamicData = null; | ||||||
|  | 
 | ||||||
|  |     constructor(gInstructionArray, gWaitFrame) { | ||||||
|  |         this.InstructionArray = gInstructionArray; | ||||||
|  |         this.WaitFrame = gWaitFrame; | ||||||
|  |         DynamicData = { | ||||||
|  |             CurrentIndex = 0, | ||||||
|  |             Time = 0 | ||||||
|  |         }; | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     //指令集更新 | ||||||
|  |     function OnUpdate(Dt) { | ||||||
|  |         //比对值 | ||||||
|  |         local Match = false; | ||||||
|  |         //获取最新的按键键值 | ||||||
|  | 
 | ||||||
|  |     } | ||||||
|  | } | ||||||
|  | 
 | ||||||
|  | class Object_Controller { | ||||||
|  |     //控制对象 | ||||||
|  |     Parent = null; | ||||||
|  |     //控制器是否启用 | ||||||
|  |     Enabled = true; | ||||||
|  | 
 | ||||||
|  | 
 | ||||||
|  | 
 | ||||||
|  |     constructor(gParent) { | ||||||
|  |         this.Parent = gParent.weakref(); | ||||||
|  | 
 | ||||||
|  | 
 | ||||||
|  |         Move_Instruction_Horizontal = []; | ||||||
|  |         Move_Instruction_Vertical = []; | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     //启用控制器 | ||||||
|  |     function Enable() { | ||||||
|  |         this.Enabled = true; | ||||||
|  |     } | ||||||
|  |     //关闭控制器 | ||||||
|  |     function Disable() { | ||||||
|  |         this.Enabled = false; | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  | 
 | ||||||
|  |     //横向移动方向List | ||||||
|  |     Move_Instruction_Horizontal = null; | ||||||
|  |     //纵向移动方向List | ||||||
|  |     Move_Instruction_Vertical = null; | ||||||
|  |     //检查按键与移动方向 | ||||||
|  |     function CheckMove(Key, Flag, Buffer) { | ||||||
|  |         //上 0 下 1 左 2 右 3 | ||||||
|  |         local Move_Index = Buffer.find(Flag); | ||||||
|  |         if (Input.GetGameKeyCode(Key)) { | ||||||
|  |             if (Move_Index == null) Buffer.push(Flag); | ||||||
|  |         } else { | ||||||
|  |             if (Move_Index != null) Buffer.remove(Move_Index); | ||||||
|  |         } | ||||||
|  |     } | ||||||
|  |     //方向移动控制 | ||||||
|  |     function MoveControl(Dt) { | ||||||
|  |         //上 0 下 1 左 2 右 3 | ||||||
|  |         CheckMove("OPTION_HOTKEY_MOVE_UP", 0, Move_Instruction_Vertical); | ||||||
|  |         CheckMove("OPTION_HOTKEY_MOVE_DOWN", 1, Move_Instruction_Vertical); | ||||||
|  |         CheckMove("OPTION_HOTKEY_MOVE_LEFT", 2, Move_Instruction_Horizontal); | ||||||
|  |         CheckMove("OPTION_HOTKEY_MOVE_RIGHT", 3, Move_Instruction_Horizontal); | ||||||
|  | 
 | ||||||
|  |         //获取横向移动方向 | ||||||
|  |         local Move_Horizontal = Move_Instruction_Horizontal.len() ? Move_Instruction_Horizontal.top() : null; | ||||||
|  |         //获取纵向移动方向 | ||||||
|  |         local Move_Vertical = Move_Instruction_Vertical.len() ? Move_Instruction_Vertical.top() : null; | ||||||
|  | 
 | ||||||
|  |         local X = 0, Y = 0; | ||||||
|  |         if (Move_Horizontal == 2) X = -1; | ||||||
|  |         else if (Move_Horizontal == 3) X = 1; | ||||||
|  |         if (Move_Vertical == 0) Y = -1; | ||||||
|  |         else if (Move_Vertical == 1) Y = 1; | ||||||
|  |         //至少有一个方向才会调用 | ||||||
|  |         Parent.Move(Dt, X, Y); | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     //控制器更新 | ||||||
|  |     function OnUpdate(Dt) { | ||||||
|  |         if (!this.Enabled) return; | ||||||
|  |         //方向移动控制 | ||||||
|  |         MoveControl(Dt); | ||||||
|  |     } | ||||||
|  | } | ||||||
|  | @ -21,6 +21,9 @@ class GameObject.Character extends GameObject.ActiveObject { | ||||||
|     //动画对象管理器 |     //动画对象管理器 | ||||||
|     AnimationManager = null; |     AnimationManager = null; | ||||||
| 
 | 
 | ||||||
|  |     //传送阵Flag | ||||||
|  |     TransmitFlag = false; | ||||||
|  | 
 | ||||||
|     //属性对象 |     //属性对象 | ||||||
|     Attribute = null; |     Attribute = null; | ||||||
| 
 | 
 | ||||||
|  | @ -30,6 +33,13 @@ class GameObject.Character extends GameObject.ActiveObject { | ||||||
|     //职业编号 |     //职业编号 | ||||||
|     Job = 0; |     Job = 0; | ||||||
| 
 | 
 | ||||||
|  |     //控制器 | ||||||
|  |     Controller = null; | ||||||
|  | 
 | ||||||
|  |     function _typeof() { | ||||||
|  |         return "character"; | ||||||
|  |     } | ||||||
|  | 
 | ||||||
| 
 | 
 | ||||||
|     function Init(Idx) { |     function Init(Idx) { | ||||||
|         //初始化动画组 |         //初始化动画组 | ||||||
|  | @ -51,6 +61,9 @@ class GameObject.Character extends GameObject.ActiveObject { | ||||||
|         } |         } | ||||||
|         //构造属性对象 |         //构造属性对象 | ||||||
|         // Attribute = AttributeClass(); |         // Attribute = AttributeClass(); | ||||||
|  | 
 | ||||||
|  |         //分配控制器 | ||||||
|  |         Controller = Object_Controller(this); | ||||||
|     } |     } | ||||||
| 
 | 
 | ||||||
| 
 | 
 | ||||||
|  | @ -94,7 +107,6 @@ class GameObject.Character extends GameObject.ActiveObject { | ||||||
|         if (AnimationManager) AnimationManager.SetAnimation(Ani); |         if (AnimationManager) AnimationManager.SetAnimation(Ani); | ||||||
|     } |     } | ||||||
| 
 | 
 | ||||||
| 
 |  | ||||||
|     //切换装备 |     //切换装备 | ||||||
|     function ChangeEquipment(Equ) { |     function ChangeEquipment(Equ) { | ||||||
|         //如果当前装备槽已经有装备则移除 |         //如果当前装备槽已经有装备则移除 | ||||||
|  | @ -126,6 +138,42 @@ class GameObject.Character extends GameObject.ActiveObject { | ||||||
|         AnimationManager.SetName(Name); |         AnimationManager.SetName(Name); | ||||||
|         base.SetName(Name); |         base.SetName(Name); | ||||||
|     } |     } | ||||||
|  | 
 | ||||||
|  | 
 | ||||||
|  |     //移动速度 | ||||||
|  |     Move_Speed = 500; | ||||||
|  | 
 | ||||||
|  |     //移动逻辑 | ||||||
|  |     function Move(Dt, X, Y) { | ||||||
|  |         if (!Parent) return; | ||||||
|  |         //在城镇里 | ||||||
|  |         if (typeof Parent == "townmap") { | ||||||
|  |             if (X == 0 && Y == 0) { | ||||||
|  |                 //设置回站立动画 | ||||||
|  |                 if (AnimationManager.CurrentAni != AnimationManager.RestAni) { | ||||||
|  |                     AnimationManager.SetAnimation("RestAni"); | ||||||
|  |                 } | ||||||
|  |             } else { | ||||||
|  |                 //设置移动动画 | ||||||
|  |                 if (AnimationManager.CurrentAni != AnimationManager.MoveAni) { | ||||||
|  |                     AnimationManager.SetAnimation("MoveAni"); | ||||||
|  |                 } | ||||||
|  |                 //设置人物朝向 | ||||||
|  |                 if (X > 0) SetDirection(DIRECTION.RIGHT); | ||||||
|  |                 else if (X< 0) SetDirection(DIRECTION.LEFT); | ||||||
|  |                 MoveBy(Dt * X * Move_Speed * 0.001, Dt * Y * Move_Speed * 0.001 * 0.71, 0); | ||||||
|  |             } | ||||||
|  |         } | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  | 
 | ||||||
|  | 
 | ||||||
|  |     //更新 | ||||||
|  |     function OnUpdate(Dt) { | ||||||
|  |         base.OnUpdate(Dt); | ||||||
|  |         //控制器逻辑更新 | ||||||
|  |         Controller.OnUpdate(Dt); | ||||||
|  |     } | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| //通过职业和装备列表来构造一个角色 | //通过职业和装备列表来构造一个角色 | ||||||
|  |  | ||||||
|  | @ -0,0 +1,122 @@ | ||||||
|  | /* | ||||||
|  | 文件名:MapCamera.nut | ||||||
|  | 路径:User/Object/Map/MapCamera.nut | ||||||
|  | 创建日期:2024-12-22	21:56 | ||||||
|  | 文件用途: | ||||||
|  | */ | ||||||
|  | class MapCamera { | ||||||
|  |     //摄像机坐标 | ||||||
|  |     X = 0; | ||||||
|  |     Y = 0; | ||||||
|  |     Z = 0; | ||||||
|  | 
 | ||||||
|  |     NextX = 0; | ||||||
|  | 
 | ||||||
|  |     //镜头可行坐标 | ||||||
|  |     MovableAreaX = 0; | ||||||
|  |     MovableAreaY = 0; | ||||||
|  | 
 | ||||||
|  | 
 | ||||||
|  |     //背景偏移量 | ||||||
|  |     BackgroundOffset = 0; | ||||||
|  |     //背景层移动速率 | ||||||
|  |     BackgroundMoveSpeed = 1.0; | ||||||
|  |     //人物中线长度 | ||||||
|  |     CharacterLineLength = 0; | ||||||
|  | 
 | ||||||
|  |     //地图对象 | ||||||
|  |     MyMapParent = null; | ||||||
|  |     //跟随对象 | ||||||
|  |     MyFromParent = null; | ||||||
|  |     //摄像机朝向 | ||||||
|  |     Direction = 1; | ||||||
|  |     //摄像机朝向时间 | ||||||
|  |     DirectionTime = 1; | ||||||
|  | 
 | ||||||
|  |     //缩放比率 | ||||||
|  |     CameraRate = 1.0; | ||||||
|  | 
 | ||||||
|  |     constructor(gMap) { | ||||||
|  |         MyMapParent = gMap.weakref(); | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  | 
 | ||||||
|  |     /* | ||||||
|  |      * @函数作用:设置跟随对象 | ||||||
|  |      */ | ||||||
|  |     function SetFromParent(FromParent) { | ||||||
|  |         MyFromParent = FromParent.weakref(); | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  | 
 | ||||||
|  |     /* | ||||||
|  |      * @函数作用: | ||||||
|  |      */ | ||||||
|  |     function SetPosition(gx, gy, gz) { | ||||||
|  |         X = gx * CameraRate; | ||||||
|  |         Y = gy * CameraRate; | ||||||
|  |         Z = gz * CameraRate; | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     /* | ||||||
|  |      * @函数作用: 增加坐标偏移 | ||||||
|  |      */ | ||||||
|  |     function AddPosition(Type, Value) { | ||||||
|  |         switch (Type) { | ||||||
|  |             case 0: //X | ||||||
|  |                 X += Value; | ||||||
|  |                 break; | ||||||
|  |             case 1: //Y | ||||||
|  |                 Y += Value; | ||||||
|  |                 break; | ||||||
|  |             case 2: //Z | ||||||
|  |                 Z += Value; | ||||||
|  |                 break; | ||||||
|  |         } | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     /* | ||||||
|  |      * @函数作用: 通过父对象同步自身坐标 | ||||||
|  |      */ | ||||||
|  |     function SyncPosByFromParent(MillisecondsDuration) { | ||||||
|  |         if (MyFromParent) { | ||||||
|  |             local R_X, R_Y, R_Z; | ||||||
|  | 
 | ||||||
|  |             // //X轴移动特殊判断 | ||||||
|  |             // R_X = MyFromParent.X; | ||||||
|  |             // //为超出中线长度时摄像机不会改变位置 | ||||||
|  |             // if (R_X <= (X + CharacterLineLength) && R_X >= (X - CharacterLineLength)) R_X = X; | ||||||
|  |             // //超出以后 补足位置 | ||||||
|  |             // else if (R_X > (X + CharacterLineLength)) R_X = R_X - CharacterLineLength; | ||||||
|  |             // else if (R_X<(X - CharacterLineLength)) R_X = R_X + CharacterLineLength; | ||||||
|  | 
 | ||||||
|  | 
 | ||||||
|  |             //判断是否超出可行区域 | ||||||
|  |             R_X = Math.Min(Math.Max(MyFromParent.X, 533), MovableAreaX - 533); | ||||||
|  |             R_Y = Math.Min(Math.Max(MyFromParent.Y, 300), MovableAreaY - 300); | ||||||
|  |             R_Z = MyFromParent.Z; | ||||||
|  | 
 | ||||||
|  |             SetPosition(R_X, R_Y, R_Z); | ||||||
|  |         } | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     /* | ||||||
|  |      * @函数作用:Update | ||||||
|  |      */ | ||||||
|  |     function OnUpdate(Dt) { | ||||||
|  |         //同步自身与跟随对象的坐标 | ||||||
|  |         SyncPosByFromParent(Dt); | ||||||
|  | 
 | ||||||
|  |         //刷新地图图层的坐标 | ||||||
|  |         foreach(Name, Layer in MyMapParent.LayerObject) { | ||||||
|  |             //X屏幕宽度一般 Y屏幕宽度一半 +Z轴运算  在加统一120的偏移 在家background的偏移 | ||||||
|  |             if (Name == "distantback") { | ||||||
|  |                 Layer.SetPosition((-X + 533) * BackgroundMoveSpeed, -Y + Z + 300 + 120 + BackgroundOffset); | ||||||
|  |             } else { | ||||||
|  |                 Layer.SetPosition((-X + 533), -Y + Z + 300 + 120 + BackgroundOffset); | ||||||
|  |             } | ||||||
|  |         } | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  | 
 | ||||||
|  | } | ||||||
|  | @ -4,10 +4,17 @@ | ||||||
| 创建日期:2024-11-22	19:40 | 创建日期:2024-11-22	19:40 | ||||||
| 文件用途:地图对象 | 文件用途:地图对象 | ||||||
| */ | */ | ||||||
|  | class MapLayer extends Actor { | ||||||
|  |     function _typeof() { | ||||||
|  |         return "townmap"; | ||||||
|  |     } | ||||||
|  | } | ||||||
| class Map extends Actor { | class Map extends Actor { | ||||||
|     //图层对象Map |     //图层对象Map | ||||||
|     LayerObject = null; |     LayerObject = null; | ||||||
| 
 | 
 | ||||||
|  |     //所属城镇 | ||||||
|  |     m_town = 0; | ||||||
|     //地图编号 |     //地图编号 | ||||||
|     m_mapId = 0; |     m_mapId = 0; | ||||||
|     //数据 |     //数据 | ||||||
|  | @ -15,20 +22,35 @@ class Map extends Actor { | ||||||
| 
 | 
 | ||||||
|     //地图长度 |     //地图长度 | ||||||
|     m_length = 0; |     m_length = 0; | ||||||
|  |     //地图高度 | ||||||
|  |     m_height = 0; | ||||||
|  | 
 | ||||||
|  |     //摄像机 | ||||||
|  |     m_camera = null; | ||||||
|  |     //地图的摄像机最大可移动参数 | ||||||
|  |     CameraMovableAreaX = null; | ||||||
|  |     CameraMovableAreaY = null; | ||||||
|  | 
 | ||||||
|  |     //背景音乐 | ||||||
|  |     BackGroundMusic = null; | ||||||
|  | 
 | ||||||
|  |     function _typeof() { | ||||||
|  |         return "townmap"; | ||||||
|  |     } | ||||||
| 
 | 
 | ||||||
|     //初始化图层对象 |     //初始化图层对象 | ||||||
|     function InitLayer() { |     function InitLayer() { | ||||||
|         //图层ObjMap |         //图层ObjMap | ||||||
|         LayerObject = { |         LayerObject = { | ||||||
|             contact = Actor(), |             contact = MapLayer(), | ||||||
|             normal = Actor(), |             distantback = MapLayer(), | ||||||
|             bottom = Actor(), |             middleback = MapLayer(), | ||||||
|             close = Actor(), |             bottom = MapLayer(), | ||||||
|             closeback = Actor(), |             closeback = MapLayer(), | ||||||
|             middleback = Actor(), |             normal = MapLayer(), | ||||||
|             distantback = Actor(), |             close = MapLayer(), | ||||||
|             cover = Actor(), |             cover = MapLayer(), | ||||||
|             max = Actor() |             max = MapLayer() | ||||||
|         }; |         }; | ||||||
|         //把所有图层Obj挂上Map的子对象 |         //把所有图层Obj挂上Map的子对象 | ||||||
|         foreach(LayerObj in LayerObject) { |         foreach(LayerObj in LayerObject) { | ||||||
|  | @ -37,6 +59,8 @@ class Map extends Actor { | ||||||
| 
 | 
 | ||||||
|         local FristOrder = 10000; |         local FristOrder = 10000; | ||||||
|         //按照层级给Layer设置层级 |         //按照层级给Layer设置层级 | ||||||
|  |         LayerObject.contact.SetZOrder(FristOrder); | ||||||
|  |         FristOrder += 50000; | ||||||
|         LayerObject.distantback.SetZOrder(FristOrder); |         LayerObject.distantback.SetZOrder(FristOrder); | ||||||
|         FristOrder += 50000; |         FristOrder += 50000; | ||||||
|         LayerObject.middleback.SetZOrder(FristOrder); |         LayerObject.middleback.SetZOrder(FristOrder); | ||||||
|  | @ -45,13 +69,11 @@ class Map extends Actor { | ||||||
|         FristOrder += 50000; |         FristOrder += 50000; | ||||||
|         LayerObject.closeback.SetZOrder(FristOrder); |         LayerObject.closeback.SetZOrder(FristOrder); | ||||||
|         FristOrder += 50000; |         FristOrder += 50000; | ||||||
|         LayerObject.close.SetZOrder(FristOrder); |  | ||||||
|         FristOrder += 50000; |  | ||||||
|         LayerObject.normal.SetZOrder(FristOrder); |         LayerObject.normal.SetZOrder(FristOrder); | ||||||
|         FristOrder += 50000; |         FristOrder += 50000; | ||||||
|         LayerObject.cover.SetZOrder(FristOrder); |         LayerObject.close.SetZOrder(FristOrder); | ||||||
|         FristOrder += 50000; |         FristOrder += 50000; | ||||||
|         LayerObject.contact.SetZOrder(FristOrder); |         LayerObject.cover.SetZOrder(FristOrder); | ||||||
|         FristOrder += 50000; |         FristOrder += 50000; | ||||||
|         LayerObject.max.SetZOrder(FristOrder); |         LayerObject.max.SetZOrder(FristOrder); | ||||||
|     }; |     }; | ||||||
|  | @ -59,12 +81,17 @@ class Map extends Actor { | ||||||
|     //初始化数据 |     //初始化数据 | ||||||
|     function InitData(path) { |     function InitData(path) { | ||||||
|         m_data = ScriptData.GetFileData(path, function(DataTable, Data) { |         m_data = ScriptData.GetFileData(path, function(DataTable, Data) { | ||||||
|  |             //在这里添加一些初始化的默认值 | ||||||
|  |             DataTable.wide_mode_camer_vertical_correction <- 0; | ||||||
|  |             DataTable.background_pos <- 80; | ||||||
|             while (!Data.Eof()) { |             while (!Data.Eof()) { | ||||||
|                 local str = Data.Get(); |                 local str = Data.Get(); | ||||||
|                 if (str == "[background pos]") { |                 if (str == "[background pos]") { | ||||||
|                     DataTable.background_pos <- (Data.Get()); |                     DataTable.background_pos <- (Data.Get()); | ||||||
|                 } else if (str == "[map name]") { |                 } else if (str == "[map name]") { | ||||||
|                     DataTable.name <- Data.Get(); |                     DataTable.name <- Data.Get(); | ||||||
|  |                 } else if (str == "[wide mode camera vertical correction]") { | ||||||
|  |                     DataTable.wide_mode_camer_vertical_correction <- Data.Get(); | ||||||
|                 } else if (str == "[tile]") { |                 } else if (str == "[tile]") { | ||||||
|                     DataTable.tile <- []; |                     DataTable.tile <- []; | ||||||
|                     while (true) { |                     while (true) { | ||||||
|  | @ -132,27 +159,29 @@ class Map extends Actor { | ||||||
|                     } |                     } | ||||||
|                 } else if (str == "[town movable area]") { |                 } else if (str == "[town movable area]") { | ||||||
|                     DataTable.town_movable_area <- []; |                     DataTable.town_movable_area <- []; | ||||||
|  |                     DataTable.town_movable_area_info <- []; | ||||||
|                     while (true) { |                     while (true) { | ||||||
|                         local areadata = Data.Get(); |                         local areadata = Data.Get(); | ||||||
|                         if (areadata == "[/town movable area]") break; |                         if (areadata == "[/town movable area]") break; | ||||||
|                         local info = []; |                         DataTable.town_movable_area.push(areadata); | ||||||
|                         info.push(areadata); |                         for (local i = 0; i< 3; i++) { | ||||||
|                         for (local i = 0; i< 5; i++) { |                             DataTable.town_movable_area.push(Data.Get()); | ||||||
|                             info.push(Data.Get()) |  | ||||||
|                         } |                         } | ||||||
|                         DataTable.town_movable_area.push(info); |                         local T = { | ||||||
|  |                             town = Data.Get(), | ||||||
|  |                             area = Data.Get(), | ||||||
|  |                         } | ||||||
|  |                         DataTable.town_movable_area_info.push(T); | ||||||
|                     } |                     } | ||||||
|                 } else if (str == "[virtual movable area]") { |                 } else if (str == "[virtual movable area]") { | ||||||
|                     DataTable.virtual_movable_area <- []; |                     DataTable.virtual_movable_area <- []; | ||||||
|                     while (true) { |                     while (true) { | ||||||
|                         local areadata = Data.Get(); |                         local areadata = Data.Get(); | ||||||
|                         if (areadata == "[/virtual movable area]") break; |                         if (areadata == "[/virtual movable area]") break; | ||||||
|                         local info = []; |                         DataTable.virtual_movable_area.push(areadata); | ||||||
|                         info.push(areadata); |                         DataTable.virtual_movable_area.push(Data.Get()); | ||||||
|                         for (local i = 0; i< 3; i++) { |                         DataTable.virtual_movable_area.push(Data.Get()); | ||||||
|                             info.push(Data.Get()) |                         DataTable.virtual_movable_area.push(Data.Get()); | ||||||
|                         } |  | ||||||
|                         DataTable.virtual_movable_area.push(info); |  | ||||||
|                     } |                     } | ||||||
|                 } |                 } | ||||||
|             } |             } | ||||||
|  | @ -163,25 +192,35 @@ class Map extends Actor { | ||||||
| 
 | 
 | ||||||
|     //初始化地板 |     //初始化地板 | ||||||
|     function InitTile() { |     function InitTile() { | ||||||
|  |         local NormalTileCount = 0; | ||||||
|         //普通地板 |         //普通地板 | ||||||
|         if ("tile" in m_data) { |         if ("tile" in m_data) { | ||||||
|  |             NormalTileCount = m_data.tile.len(); | ||||||
|  |             //计算地图长度 | ||||||
|  |             m_length = NormalTileCount * 224; | ||||||
|             foreach(pos, path in m_data.tile) { |             foreach(pos, path in m_data.tile) { | ||||||
|                 local realpath = m_data.dirpath + path.tolower(); |                 local realpath = m_data.dirpath + path.tolower(); | ||||||
|                 local TileObj = Tile(realpath); |                 local TileObj = Tile(realpath); | ||||||
|                 TileObj.SetAnchor(0.0, 0.0); |                 TileObj.SetAnchor(0.0, 0.0); | ||||||
|                 TileObj.SetPosition(pos * 224, 0); |                 TileObj.SetPosition(pos * 224, -120 - m_data.background_pos); | ||||||
|                 LayerObject.bottom.Addchild(TileObj); |                 LayerObject.bottom.Addchild(TileObj); | ||||||
|                 //计算地图长度 |  | ||||||
|                 m_length += 224; |  | ||||||
|             } |             } | ||||||
|  |             //默认地板 + 摄像机偏移 + 默认需要有一个40的添加地板 | ||||||
|  |             m_height = 560; | ||||||
|         } |         } | ||||||
|         //补充地板 |         //补充地板 | ||||||
|         if ("extended_tile" in m_data) { |         if ("extended_tile" in m_data) { | ||||||
|  |             local ExTileCount = m_data.extended_tile.len(); | ||||||
|  |             //计算地图高度 | ||||||
|  |             local Buffer = (ExTileCount / NormalTileCount); | ||||||
|  |             //这里默认加了40的高度 然后要读取pvf的 [wide mode camera vertical correction] | ||||||
|  |             m_height += (Buffer< 1 ? 1 : Buffer) * 40; | ||||||
|             foreach(pos, path in m_data.extended_tile) { |             foreach(pos, path in m_data.extended_tile) { | ||||||
|                 local realpath = m_data.dirpath + path.tolower(); |                 local realpath = m_data.dirpath + path.tolower(); | ||||||
|                 local TileObj = Tile(realpath); |                 local TileObj = Tile(realpath); | ||||||
|                 TileObj.SetAnchor(0.0, 0.0); |                 TileObj.SetAnchor(0.0, 0.0); | ||||||
|                 TileObj.SetPosition(pos * 224, 560); |                 //根据基础地板的数量判断是第几排 | ||||||
|  |                 TileObj.SetPosition((pos % NormalTileCount) * 224, 560 - 120 - m_data.background_pos + ((pos / NormalTileCount) * 40)); | ||||||
|                 LayerObject.bottom.Addchild(TileObj); |                 LayerObject.bottom.Addchild(TileObj); | ||||||
|             } |             } | ||||||
|         } |         } | ||||||
|  | @ -189,6 +228,8 @@ class Map extends Actor { | ||||||
| 
 | 
 | ||||||
|     //初始化背景动画 |     //初始化背景动画 | ||||||
|     function InitBackgroundAnimation() { |     function InitBackgroundAnimation() { | ||||||
|  |         local Rate = m_data.rawin("far_sight_scroll") ? (m_data.far_sight_scroll.tofloat() / 100.0) : 1.0; | ||||||
|  |         m_camera.BackgroundMoveSpeed = Rate; | ||||||
|         //背景动画 |         //背景动画 | ||||||
|         if ("background_animation" in m_data) { |         if ("background_animation" in m_data) { | ||||||
|             foreach(Info in m_data.background_animation) { |             foreach(Info in m_data.background_animation) { | ||||||
|  | @ -198,14 +239,15 @@ class Map extends Actor { | ||||||
|                 local AniObj = Animation(realpath); |                 local AniObj = Animation(realpath); | ||||||
|                 local width = AniObj.GetSize().w; |                 local width = AniObj.GetSize().w; | ||||||
|                 AniList.push(AniObj); |                 AniList.push(AniObj); | ||||||
|                 for (local i = 1; i< width; i++) { |                 for (local i = 1; i<((m_length * Rate) / width + 1); i++) { | ||||||
|                     local AniObj = Animation(realpath); |                     local AniObj = Animation(realpath); | ||||||
|                     AniList.push(AniObj); |                     AniList.push(AniObj); | ||||||
|                 } |                 } | ||||||
|                 foreach(pos, ani in AniList) { |                 foreach(pos, ani in AniList) { | ||||||
|                     ani.SetAnchor(0.0, 0.0); |                     ani.SetAnchor(0.0, 0.0); | ||||||
|                     ani.SetPosition(pos * AniObj.GetSize().w, m_data.background_pos); |                     ani.SetPosition(pos * AniObj.GetSize().w, -120); | ||||||
|                     LayerObject[Info.layer].Addchild(ani); |                     LayerObject[Info.layer].Addchild(ani); | ||||||
|  |                     ani.SetZOrder(-1000000); | ||||||
|                 } |                 } | ||||||
|             } |             } | ||||||
|         } |         } | ||||||
|  | @ -217,13 +259,99 @@ class Map extends Actor { | ||||||
|             local realpath = m_data.dirpath + info.filename.tolower(); |             local realpath = m_data.dirpath + info.filename.tolower(); | ||||||
|             local AniObj = AnimationObject(realpath); |             local AniObj = AnimationObject(realpath); | ||||||
|             AniObj.SetAnchor(0.0, 0.0); |             AniObj.SetAnchor(0.0, 0.0); | ||||||
|             //注意这里默认要增加120的Y轴偏移 |             if (info.layer != "normal") AniObj.SetPositionNoLayer(info.xpos, info.ypos, info.zpos); | ||||||
|             if (info.layer != "normal") AniObj.SetPositionNoLayer(info.xpos, info.ypos + m_data.background_pos + 120, info.zpos); |             else AniObj.SetPosition(info.xpos, info.ypos, info.zpos); | ||||||
|             else AniObj.SetPosition(info.xpos, info.ypos + m_data.background_pos + 120, info.zpos); |  | ||||||
|             LayerObject[info.layer].Addchild(AniObj); |             LayerObject[info.layer].Addchild(AniObj); | ||||||
|         } |         } | ||||||
|     } |     } | ||||||
| 
 | 
 | ||||||
|  | 
 | ||||||
|  | 
 | ||||||
|  |     //添加对象 | ||||||
|  |     function AddObject(obj, IsPlayer = false) { | ||||||
|  |         //角色对象 | ||||||
|  |         if (typeof obj == "character") { | ||||||
|  |             //如果已经处于某个地图中 | ||||||
|  |             if (obj.Parent) { | ||||||
|  |                 obj.Parent.Removechild(obj); | ||||||
|  |             } | ||||||
|  |             LayerObject.normal.Addchild(obj); | ||||||
|  |             obj.MySelfMap = this.weakref(); | ||||||
|  |             //如果是玩家自己 | ||||||
|  |             if (IsPlayer) { | ||||||
|  |                 m_camera.SetFromParent(obj); | ||||||
|  |                 if (BackGroundMusic == null) BackGroundMusic = {}; | ||||||
|  |                 foreach(SoundName in m_data.sound) { | ||||||
|  |                     local BgMusic = Audio(getconsttable().MUSIC[SoundName]); | ||||||
|  |                     BgMusic.Play(); | ||||||
|  |                     BackGroundMusic[SoundName] <- BgMusic; | ||||||
|  |                 } | ||||||
|  |             } | ||||||
|  |         } | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     //移动城镇的添加对象 | ||||||
|  |     function AddObjectByChangeTown(obj, FromMapobj) { | ||||||
|  |         //角色对象 | ||||||
|  |         if (typeof obj == "character") { | ||||||
|  |             //如果已经处于某个地图中 | ||||||
|  |             if (obj.Parent) { | ||||||
|  |                 obj.Parent.Removechild(obj); | ||||||
|  |             } | ||||||
|  |             LayerObject.normal.Addchild(obj); | ||||||
|  |             //将地图信息写入角色中 | ||||||
|  |             obj.MySelfMap = this.weakref(); | ||||||
|  |             //绑定摄像机 | ||||||
|  |             m_camera.SetFromParent(obj); | ||||||
|  |             //获取应该设置的坐标 | ||||||
|  |             foreach(index, info in m_data.town_movable_area_info) { | ||||||
|  |                 if (info.town == FromMapobj.m_town && info.area == FromMapobj.m_mapId) { | ||||||
|  |                     local pos = { | ||||||
|  |                         x = m_data.town_movable_area[index * 4] + m_data.town_movable_area[index * 4 + 2] / 2, | ||||||
|  |                         y = m_data.town_movable_area[index * 4 + 1] + m_data.town_movable_area[index * 4 + 3] / 2, | ||||||
|  |                         z = 0 | ||||||
|  |                     } | ||||||
|  |                     obj.SetPosition(pos); | ||||||
|  |                     break; | ||||||
|  |                 } | ||||||
|  |             } | ||||||
|  | 
 | ||||||
|  |             //获取当前场景 | ||||||
|  |             local Stage = sq_GetCurrentStage(); | ||||||
|  |             if (GlobalTownManager.CurrentTown) { | ||||||
|  |                 Stage.Removechild(GlobalTownManager.CurrentTown); | ||||||
|  |             } | ||||||
|  |             Stage.Addchild(this); | ||||||
|  |             //添加全局 | ||||||
|  |             GlobalTownManager.CurrentTown = this.weakref(); | ||||||
|  | 
 | ||||||
|  | 
 | ||||||
|  |             //背景音乐处理 | ||||||
|  |             BackGroundMusic = {}; | ||||||
|  |             if (FromMapobj.BackGroundMusic != null) { | ||||||
|  |                 //把老地图的音频先获取过来 | ||||||
|  |                 foreach(SoundName, Music in FromMapobj.BackGroundMusic) { | ||||||
|  |                     //如果有背景音乐是新地图存在的 就添加 | ||||||
|  |                     if (this.m_data.sound.find(SoundName) != null) { | ||||||
|  |                         BackGroundMusic[SoundName] <- Music; | ||||||
|  |                     } | ||||||
|  |                 } | ||||||
|  |                 //销毁老地图的音频列表 | ||||||
|  |                 FromMapobj.BackGroundMusic = null; | ||||||
|  | 
 | ||||||
|  |                 //检查当前地图的背景音乐 | ||||||
|  |                 foreach(SoundName in this.m_data.sound) { | ||||||
|  |                     //如果有一个背景音乐是新地图不存在的 就停止播放 | ||||||
|  |                     if (!(BackGroundMusic.rawin(SoundName))) { | ||||||
|  |                         local BgMusic = Audio(getconsttable().MUSIC[SoundName]); | ||||||
|  |                         BgMusic.Play(); | ||||||
|  |                         BackGroundMusic[SoundName] <- BgMusic; | ||||||
|  |                     } | ||||||
|  |                 } | ||||||
|  |             } | ||||||
|  |         } | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|     constructor(arg) { |     constructor(arg) { | ||||||
|         base.constructor(); |         base.constructor(); | ||||||
| 
 | 
 | ||||||
|  | @ -233,6 +361,9 @@ class Map extends Actor { | ||||||
|             InitData(arg); |             InitData(arg); | ||||||
|         } |         } | ||||||
| 
 | 
 | ||||||
|  |         //初始化摄像机 | ||||||
|  |         m_camera = MapCamera(this); | ||||||
|  | 
 | ||||||
|         //初始化图层 |         //初始化图层 | ||||||
|         InitLayer(); |         InitLayer(); | ||||||
| 
 | 
 | ||||||
|  | @ -242,5 +373,87 @@ class Map extends Actor { | ||||||
|         InitBackgroundAnimation(); |         InitBackgroundAnimation(); | ||||||
|         //初始化场景Ani |         //初始化场景Ani | ||||||
|         InitAnimation(); |         InitAnimation(); | ||||||
|  | 
 | ||||||
|  |         //设置摄像机的最大可行区域 | ||||||
|  |         m_camera.MovableAreaX = m_length; | ||||||
|  |         m_camera.MovableAreaY = m_height - m_data.wide_mode_camer_vertical_correction; | ||||||
|  | 
 | ||||||
|  |         m_camera.BackgroundOffset = m_data.background_pos; | ||||||
|  | 
 | ||||||
|  |         // OpenMovableAreaBorder(); | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     //DEBUG方法 | ||||||
|  |     function OpenMovableAreaBorder() { | ||||||
|  |         for (local i = 0; i< m_data.virtual_movable_area.len(); i += 4) { | ||||||
|  |             local x = m_data.virtual_movable_area[i]; | ||||||
|  |             local y = m_data.virtual_movable_area[i + 1]; | ||||||
|  |             local w = m_data.virtual_movable_area[i + 2]; | ||||||
|  |             local h = m_data.virtual_movable_area[i + 3]; | ||||||
|  |             local Ac = Actor(); | ||||||
|  |             Ac.SetPosition(x, y); | ||||||
|  |             Ac.SetSize(w, h); | ||||||
|  |             Ac.ShowBorder(true); | ||||||
|  |             LayerObject.max.Addchild(Ac); | ||||||
|  |         } | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     //判断区域是否可行 | ||||||
|  |     function CheckMovableArea(gx, gxoffset, gy, gyoffset) { | ||||||
|  |         local pos = { | ||||||
|  |             x = gxoffset, | ||||||
|  |             y = gyoffset | ||||||
|  |         } | ||||||
|  |         //都符合 | ||||||
|  |         if (Math.PointIsInSquare(gx + gxoffset, gy + gyoffset, m_data.virtual_movable_area)) {} | ||||||
|  |         //X符合 | ||||||
|  |         else if (Math.PointIsInSquare(gx + gxoffset, gy, m_data.virtual_movable_area)) { | ||||||
|  |             pos.y = 0; | ||||||
|  |         } | ||||||
|  |         //Y符合 | ||||||
|  |         else if (Math.PointIsInSquare(gx, gy + gyoffset, m_data.virtual_movable_area)) { | ||||||
|  |             pos.x = 0; | ||||||
|  |         } else { | ||||||
|  |             pos.x = 0; | ||||||
|  |             pos.y = 0; | ||||||
|  |         } | ||||||
|  |         return pos; | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     //判断区域是否传送 | ||||||
|  |     function CheckMovableAreaTransmit(obj, gx, gy) { | ||||||
|  |         local Index = Math.PointIsInWhichRectangle(gx, gy, m_data.town_movable_area); | ||||||
|  |         //走进了传送阵 | ||||||
|  |         if (Index != -1) { | ||||||
|  |             if (!obj.TransmitFlag) { | ||||||
|  |                 local info = m_data.town_movable_area_info[Index]; | ||||||
|  |                 //这里是未加载的城镇 | ||||||
|  |                 if (!(GlobalTownManager.TownList.rawin(info.town))) { | ||||||
|  |                     Town(info.town); | ||||||
|  |                 } | ||||||
|  |                 local MapObj = GlobalTownManager.TownList[info.town].map[info.area]; | ||||||
|  |                 MapObj.AddObjectByChangeTown(obj, this); | ||||||
|  |                 obj.TransmitFlag = true; | ||||||
|  |             } | ||||||
|  |         } else { | ||||||
|  |             obj.TransmitFlag = false; | ||||||
|  |         } | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     //音乐逻辑 | ||||||
|  |     function MusicLogic() { | ||||||
|  |         if (BackGroundMusic == null) return; | ||||||
|  |         foreach(Music in BackGroundMusic) { | ||||||
|  |             if (!Music.IsPlaying()) Music.Play(); | ||||||
|  |         } | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     function OnUpdate(Dt) { | ||||||
|  |         base.OnUpdate(Dt); | ||||||
|  |         //更新摄像机 | ||||||
|  |         m_camera.OnUpdate(Dt); | ||||||
|  | 
 | ||||||
|  |         //更新音乐逻辑 | ||||||
|  |         MusicLogic(); | ||||||
|     } |     } | ||||||
| } | } | ||||||
|  | @ -0,0 +1,118 @@ | ||||||
|  | /* | ||||||
|  | 文件名:TownObject.nut | ||||||
|  | 路径:User/Object/Map/TownObject.nut | ||||||
|  | 创建日期:2024-12-24	14:49 | ||||||
|  | 文件用途:城镇对象 | ||||||
|  | */ | ||||||
|  | if (!getroottable().rawin("GlobalTownManager")) { | ||||||
|  |     GlobalTownManager <- {}; | ||||||
|  |     GlobalTownManager.TownList <- {}; | ||||||
|  |     GlobalTownManager.CurrentTown <- null; | ||||||
|  | } | ||||||
|  | class Town { | ||||||
|  |     //城镇编号 | ||||||
|  |     TownID = 0; | ||||||
|  |     //数据 | ||||||
|  |     t_data = null; | ||||||
|  |     //地图管理器 | ||||||
|  |     map = null; | ||||||
|  |     //赛丽亚房间编号 | ||||||
|  |     SariaRoomID = 0; | ||||||
|  |     //赛利亚房间进入时的坐标 | ||||||
|  |     SariaRoomPos = null; | ||||||
|  | 
 | ||||||
|  | 
 | ||||||
|  |     //初始化城镇数据 | ||||||
|  |     function InitData(Path) { | ||||||
|  |         Path = "town/" + Path; | ||||||
|  |         t_data = ScriptData.GetFileData(Path, function(DataTable, Data) { | ||||||
|  |             //在这里添加一些初始化的默认值 | ||||||
|  |             DataTable.area <- {}; | ||||||
|  |             while (!Data.Eof()) { | ||||||
|  |                 local str = Data.Get(); | ||||||
|  |                 //进入城镇时的标题动画 | ||||||
|  |                 if (str == "[entering title]") { | ||||||
|  |                     DataTable.entering_title <- (Data.Get()); | ||||||
|  |                 } | ||||||
|  |                 //进入城镇时的过场标题图像 | ||||||
|  |                 else if (str == "[cutscene image]") { | ||||||
|  |                     DataTable.cutscene_image <- {}; | ||||||
|  |                     DataTable.cutscene_image.path <- Data.Get().tolower(); | ||||||
|  |                     DataTable.cutscene_image.idx <- Data.Get(); | ||||||
|  |                 } | ||||||
|  |                 //进入城镇的前置副本 | ||||||
|  |                 else if (str == "[dungeon what must be cleared]") { | ||||||
|  |                     DataTable.dungeon_what_must_be_cleared <- Data.Get(); | ||||||
|  |                 } | ||||||
|  |                 //城镇区域 | ||||||
|  |                 else if (str == "[area]") { | ||||||
|  |                     local DataT = {}; | ||||||
|  |                     local MapId = Data.Get(); | ||||||
|  |                     DataT.path <- Data.Get().tolower(); | ||||||
|  |                     DataT.type <- Data.Get(); | ||||||
|  |                     //赛利亚房间 | ||||||
|  |                     if (DataT.type == "[gate]") { | ||||||
|  |                         SariaRoomID = MapId; | ||||||
|  |                         SariaRoomPos = { | ||||||
|  |                             x = Data.Get(), | ||||||
|  |                             y = Data.Get(), | ||||||
|  |                             z = 0 | ||||||
|  |                         } | ||||||
|  |                     } else if (DataT.type == "[dungeon gate]") { | ||||||
|  |                         DataT.dungeon_gate <- Data.Get(); | ||||||
|  |                     } | ||||||
|  |                     DataTable.area[MapId] <- DataT; | ||||||
|  |                 } | ||||||
|  |                 //城镇名称 | ||||||
|  |                 else if (str == "[name]") { | ||||||
|  |                     DataTable.name <- (Data.Get()); | ||||||
|  |                 } | ||||||
|  |                 //城镇可进入最低等级 | ||||||
|  |                 else if (str == "[limit level]") { | ||||||
|  |                     DataTable.limit_level <- Data.Get(); | ||||||
|  |                 } | ||||||
|  |             } | ||||||
|  |         }.bindenv(this)); | ||||||
|  |         t_data.path <- Path; | ||||||
|  |         t_data.dirpath <- Path.slice(0, Path.lastfind("/") + 1); | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     //构造地图 | ||||||
|  |     function InitMap() { | ||||||
|  |         map = {}; | ||||||
|  |         foreach(pos, info in t_data.area) { | ||||||
|  |             local MapObj = Map("map/" + info.path); | ||||||
|  |             MapObj.m_town = TownID; | ||||||
|  |             MapObj.m_mapId = pos; | ||||||
|  |             map[pos] <- MapObj; | ||||||
|  |         } | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     //添加角色对象 (注意 这里是第一次上线 或者是使用瞬间移动药剂走的逻辑 因为会默认在赛丽亚房间) | ||||||
|  |     function AddObject(obj, IsPlayer = false) { | ||||||
|  |         //获取当前场景 | ||||||
|  |         local Stage = sq_GetCurrentStage(); | ||||||
|  |         if (GlobalTownManager.CurrentTown) { | ||||||
|  |             Stage.Removechild(GlobalTownManager.CurrentTown); | ||||||
|  |         } | ||||||
|  |         local SariaRoomMap = map[SariaRoomID]; | ||||||
|  |         Stage.Addchild(SariaRoomMap); | ||||||
|  |         //添加全局 | ||||||
|  |         GlobalTownManager.CurrentTown = SariaRoomMap.weakref(); | ||||||
|  |         SariaRoomMap.AddObject(obj, IsPlayer); | ||||||
|  |         obj.SetPosition(SariaRoomPos); | ||||||
|  |         obj.SetAnimation("RestAni"); | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  |     constructor(Index) { | ||||||
|  |         TownID = Index; | ||||||
|  |         local TownPath = AssetManager.TownList[Index].Path; | ||||||
|  |         //初始化数据 | ||||||
|  |         InitData(TownPath); | ||||||
|  |         //构造地图 | ||||||
|  |         InitMap(); | ||||||
|  | 
 | ||||||
|  |         //加入全局 | ||||||
|  |         GlobalTownManager.TownList[Index] <- this; | ||||||
|  |     } | ||||||
|  | } | ||||||
|  | @ -6,6 +6,9 @@ | ||||||
| */ | */ | ||||||
| class BaseObject extends Actor { | class BaseObject extends Actor { | ||||||
| 
 | 
 | ||||||
|  |     //所在地图 | ||||||
|  |     MySelfMap = null; | ||||||
|  | 
 | ||||||
|     //方向 |     //方向 | ||||||
|     Direction = 1; |     Direction = 1; | ||||||
| 
 | 
 | ||||||
|  | @ -73,24 +76,41 @@ class BaseObject extends Actor { | ||||||
|             Z = vargv[1]; |             Z = vargv[1]; | ||||||
|             base.MoveTo(Value, vargv[0] - vargv[1]); |             base.MoveTo(Value, vargv[0] - vargv[1]); | ||||||
|         } |         } | ||||||
| 
 |         SetZOrder(Y); | ||||||
| 
 |  | ||||||
|     } |     } | ||||||
| 
 | 
 | ||||||
|     //传入坐标 xyz 的table  或者 单独传 xyz |     //传入坐标 xyz 的table  或者 单独传 xyz | ||||||
|     function MoveBy(Value, ...) { |     function MoveBy(Value, ...) { | ||||||
|         if (vargv.len() == 0) { |         if (vargv.len() == 0) { | ||||||
|             X += Value.x; |             //如果在地图中 判断是否可行 | ||||||
|             Y += Value.y; |             if (MySelfMap) { | ||||||
|  |                 local pos = MySelfMap.CheckMovableArea(X, Value.x, Y, Value.y); | ||||||
|  |                 X += pos.x; | ||||||
|  |                 Y += pos.y; | ||||||
|  |                 base.MoveBy(pos.x, pos.y - Value.z); | ||||||
|  |             } else { | ||||||
|  |                 X += Value.x; | ||||||
|  |                 Y += Value.y; | ||||||
|  |                 Value.y = Value.y - Value.z; | ||||||
|  |                 base.MoveBy(Value); | ||||||
|  |             } | ||||||
|             Z += Value.z; |             Z += Value.z; | ||||||
|             Value.y = Value.y - Value.z; |  | ||||||
|             base.MoveBy(Value); |  | ||||||
|         } else if (vargv.len() == 2) { |         } else if (vargv.len() == 2) { | ||||||
|             X += Value; |             //如果在地图中 判断是否可行 | ||||||
|             Y += vargv[0]; |             if (MySelfMap) { | ||||||
|  |                 local pos = MySelfMap.CheckMovableArea(X, Value, Y, vargv[0]); | ||||||
|  |                 X += pos.x; | ||||||
|  |                 Y += pos.y; | ||||||
|  |                 base.MoveBy(pos.x, pos.y - vargv[1]); | ||||||
|  |             } else { | ||||||
|  |                 X += Value; | ||||||
|  |                 Y += vargv[0]; | ||||||
|  |                 base.MoveBy(Value, vargv[0] - vargv[1]); | ||||||
|  |             } | ||||||
|             Z += vargv[1]; |             Z += vargv[1]; | ||||||
|             base.MoveBy(Value, vargv[0] - vargv[1]); |  | ||||||
|         } |         } | ||||||
|  |         SetZOrder(Y); | ||||||
|  |         MySelfMap.CheckMovableAreaTransmit(this, X, Y); | ||||||
|     } |     } | ||||||
| 
 | 
 | ||||||
|     //设置方向 |     //设置方向 | ||||||
|  |  | ||||||
|  | @ -10,7 +10,7 @@ function InitGame() { | ||||||
|     // MySocket("127.0.0.1", 19666); |     // MySocket("127.0.0.1", 19666); | ||||||
| 
 | 
 | ||||||
|     //设定全局默认音量 |     //设定全局默认音量 | ||||||
|     _Globa_Audio_Volume_ = 0.3; |     _Globa_Audio_Volume_ = 0.1; | ||||||
|     _Globa_Sound_Volume_ = 0.3; |     _Globa_Sound_Volume_ = 0.3; | ||||||
| 
 | 
 | ||||||
|     Script(); |     Script(); | ||||||
|  | @ -21,6 +21,8 @@ function InitGame() { | ||||||
|     _FontAssetManager_(); |     _FontAssetManager_(); | ||||||
|     //初始化鼠标 |     //初始化鼠标 | ||||||
|     _IMouse_(); |     _IMouse_(); | ||||||
|  |     //初始化控制器 | ||||||
|  |     _GameController_(); | ||||||
| 
 | 
 | ||||||
|     //预加载 |     //预加载 | ||||||
|     Animation("ui/charactercreate/dust.ani"); |     Animation("ui/charactercreate/dust.ani"); | ||||||
|  |  | ||||||
|  | @ -11,44 +11,25 @@ function TestStage() { | ||||||
| 
 | 
 | ||||||
| 
 | 
 | ||||||
| 
 | 
 | ||||||
|     local Window = Sq_CreateWindow(_Login_Window, "登录界面窗口", 0, 0, 1066, 600, 0); |     // local Window = Sq_CreateWindow(_Login_Window, "登录界面窗口", 0, 0, 1066, 600, 0); | ||||||
| 
 | 
 | ||||||
| 
 | 
 | ||||||
| 
 | 
 | ||||||
|     // local Fontobj = Font(); |     // local Fontobj = Font(); | ||||||
| 
 | 
 | ||||||
|     // local MapObj = Map("map/cataclysm/town/elvengard/new_elvengard.map"); |     local TownObj = Town(2); | ||||||
|  | 
 | ||||||
|  | 
 | ||||||
|  |     // local MapObj = Map("map/cataclysm/town/seria_room/elvengard.map"); | ||||||
|  |     // // local MapObj = Map("map/cataclysm/town/hendonmyre/new_backstreet_2.map"); | ||||||
|     // // local MapObj = Map("map/cataclysm/town/seria_room/elvengard.map"); |     // // local MapObj = Map("map/cataclysm/town/seria_room/elvengard.map"); | ||||||
|     // // local MapObj = Map("map/cataclysm/town/sainthorn_heaven/sainthorn_heaven_ship_rear_down.map"); |     // // local MapObj = Map("map/cataclysm/town/sainthorn_heaven/sainthorn_heaven_ship_rear_down.map"); | ||||||
|     // T.Addchild(MapObj); |     // T.Addchild(MapObj); | ||||||
| 
 | 
 | ||||||
| 
 |     local Charc = GameObject.CreateCharacter(0, [101590007, 27675, 601500060, 601550060, 601560058, 601570053, 601520052, 601500060, 601510059, 601530051, 601540060, 601580023]); | ||||||
|     // // local Equ = GameItem.Equipment(601500060); |     // Charc.SetPosition(356, 250, 0); | ||||||
|     // local Charc = GameObject.CreateCharacter(0, [601500060, 601550060, 601560058, 601570053, 601520052, 601500060, 601510059, 601530051, 601540060, 601580023]); |  | ||||||
|     // // Charc.coat = Equ; |  | ||||||
|     // // Charc.Init(0); |  | ||||||
|     // // Charc.SetUpdateFunc(function(Chr, dt) { |  | ||||||
|     // //     if (!("time" in Chr.Var)) Chr.Var.time <- 0; |  | ||||||
|     // //     Chr.Var.time += dt; |  | ||||||
|     // //     if (Chr.Var.time > 2000 && Chr.Var.time< 3000) { |  | ||||||
|     // //         local Equ = GameItem.Equipment(601500060); |  | ||||||
|     // //         Chr.ChangeEquipment(Equ); |  | ||||||
|     // //         Chr.Var.time = 3000; |  | ||||||
|     // //     } else if (Chr.Var.time > 4000 && Chr.Var.time< 5000) { |  | ||||||
|     // //         local Equ = GameItem.Equipment(601500059); |  | ||||||
|     // //         Chr.ChangeEquipment(Equ); |  | ||||||
|     // //         Chr.Var.time = 5000; |  | ||||||
|     // //     } else if (Chr.Var.time > 6000 && Chr.Var.time< 7000) { |  | ||||||
|     // //         local Equ = GameItem.Equipment(601500058); |  | ||||||
|     // //         Chr.ChangeEquipment(Equ); |  | ||||||
|     // //         Chr.Var.time = 8000; |  | ||||||
|     // //     } |  | ||||||
|     // // }) |  | ||||||
| 
 |  | ||||||
|     // Charc.SetPosition(356, 430, 0); |  | ||||||
|     // Charc.SetAnimation("RestAni"); |     // Charc.SetAnimation("RestAni"); | ||||||
|     // Charc.SetZOrder(99999999); |     TownObj.AddObject(Charc, true); | ||||||
|     // MapObj.Addchild(Charc); |  | ||||||
| 
 | 
 | ||||||
| 
 | 
 | ||||||
|     // local Window = Sq_CreateWindow(_Select_Character_Window, "选择角色界面窗口", 0, 0, 1066, 600, 0); |     // local Window = Sq_CreateWindow(_Select_Character_Window, "选择角色界面窗口", 0, 0, 1066, 600, 0); | ||||||
|  |  | ||||||
|  | @ -41,6 +41,98 @@ enum AvatarType { | ||||||
|     weapon = "weapon" //武器 |     weapon = "weapon" //武器 | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
|  | //控制器枚举 | ||||||
|  | enum CONTROLLER { | ||||||
|  |     OPTION_HOTKEY__UNDEFINED = -1 //  未知 | ||||||
|  |     OPTION_HOTKEY_MOVE_UP = 1 //  移动键 上 | ||||||
|  |     OPTION_HOTKEY_MOVE_LEFT = 2 //  移动键 左 | ||||||
|  |     OPTION_HOTKEY_MOVE_DOWN = 4 //  移动键 下 | ||||||
|  |     OPTION_HOTKEY_MOVE_RIGHT = 3 //  移动键 右 | ||||||
|  |     OPTION_HOTKEY_ATTACK = 4 //  攻击键 | ||||||
|  |     OPTION_HOTKEY_JUMP = 5 //  跳跃键 | ||||||
|  |     OPTION_HOTKEY_SKILL = 6 //  快捷技能键 | ||||||
|  |     OPTION_HOTKEY_SKILL2 = 7 //  Buff技能键 | ||||||
|  |     OPTION_HOTKEY_CREATURE_SKILL = 8 //  宠物技能键 | ||||||
|  |     OPTION_HOTKEY_STATUS_WINDOW = 9 //  (M) | ||||||
|  |     OPTION_HOTKEY_SKILL_WINDOW = 10 //  (K) | ||||||
|  |     OPTION_HOTKEY_ITEM_INVENTORY = 11 //  (I) | ||||||
|  |     OPTION_HOTKEY_OPTION_WINDOW = 12 //  (O) | ||||||
|  |     OPTION_HOTKEY_NORMAL_QUEST_WINDOW = 13 //  (Q) | ||||||
|  |     OPTION_HOTKEY_AVATAR_INVENTORY = 14 //  (U) | ||||||
|  |     OPTION_HOTKEY_CERASHOP = 15 //  (T) | ||||||
|  |     OPTION_HOTKEY_MINIMAP = 16 // 疫띸옫 ?먩젚獒?N) | ||||||
|  |     OPTION_HOTKEY_CREATURE_WINDOW = 17 //  (Y) | ||||||
|  |     OPTION_HOTKEY_TOOLTIP_ = 18 // 庸삥뮢弱붹솱 ?わ읂??R) | ||||||
|  |     OPTION_HOTKEY_EPIC_QUEST_WINDOW = 19 //  (W) | ||||||
|  |     OPTION_HOTKEY_QUICK_SKILL1 = 20 //  ?띌돱 ?쀧뀥(A, S, D, F, G, H) | ||||||
|  |     OPTION_HOTKEY_QUICK_SKILL2 = 21 | ||||||
|  |     OPTION_HOTKEY_QUICK_SKILL3 = 22 | ||||||
|  |     OPTION_HOTKEY_QUICK_SKILL4 = 23 | ||||||
|  |     OPTION_HOTKEY_QUICK_SKILL5 = 24 | ||||||
|  |     OPTION_HOTKEY_QUICK_SKILL6 = 25 | ||||||
|  |     OPTION_HOTKEY_EXSKILL1 = 26 //  ?멩퐤?띌돱 ?쀧뀥(F1 - F6) | ||||||
|  |     OPTION_HOTKEY_EXSKILL2 = 27 | ||||||
|  |     OPTION_HOTKEY_EXSKILL3 = 28 | ||||||
|  |     OPTION_HOTKEY_EXSKILL4 = 29 | ||||||
|  |     OPTION_HOTKEY_EXSKILL5 = 30 | ||||||
|  |     OPTION_HOTKEY_EXSKILL6 = 31 | ||||||
|  |     OPTION_HOTKEY_ITEM_QUICKSLOT1 = 32 //  爺닸¨?????쀧뀥(1 - 6) | ||||||
|  |     OPTION_HOTKEY_ITEM_QUICKSLOT2 = 33 | ||||||
|  |     OPTION_HOTKEY_ITEM_QUICKSLOT3 = 34 | ||||||
|  |     OPTION_HOTKEY_ITEM_QUICKSLOT4 = 35 | ||||||
|  |     OPTION_HOTKEY_ITEM_QUICKSLOT5 = 36 | ||||||
|  |     OPTION_HOTKEY_ITEM_QUICKSLOT6 = 37 | ||||||
|  |     OPTION_HOTKEY_TOGGLE_ITEM_NAME_IN_DUNGEON = 38 //  疫띸옫煐f?爺닸¨??旅㎬뜡弱붹솱(ctrl) | ||||||
|  |     OPTION_HOTKEY_HIDE_MAIN_HUD = 39 //  與?릣?닸¨???쀦솱??Tab) | ||||||
|  |     OPTION_HOTKEY_TOGGLE_TITLE_ANIMATION = 40 //  汝e빝閭?冶쒎컮 壅낁릢 歷쀯읂(E) | ||||||
|  |     OPTION_HOTKEY_TOGGLE_SKILL_INFORMATION = 41 //  ?띌돱 營먲썞 ?묋? 壅낁릢 ?わ읂(F7) | ||||||
|  |     OPTION_HOTKEY_PAUSE_IN_TOWER = 42 //  耀듣쐜??褥?艅얍뜪冶쒑쇋 | ||||||
|  |     OPTION_HOTKEY_CAPTURE_MOVING_PICTURE = 43 //  玲뺠댇庸?瘟듣뜱(Pause) | ||||||
|  |     OPTION_HOTKEY_MENU_MY_INFO = 44 //  窈뜹컮倻뉛엨 瑥→솺(7) | ||||||
|  |     OPTION_HOTKEY_MENU_COMMUNITY = 45 //  ?닷뿽?뽳썙 瑥→솺(8) | ||||||
|  |     OPTION_HOTKEY_MENU_CONTENTS = 46 //  ?잒샇??瑥→솺(9) | ||||||
|  |     OPTION_HOTKEY_MENU_SERVICE = 47 //  ?껆뼁??瑥→솺(0) | ||||||
|  |     OPTION_HOTKEY_MENU_SYSTEM__CLOSE_ALL_WINDOW = 48 // 壅낁땶?뷸츐??Esc) | ||||||
|  |     OPTION_HOTKEY_PVP = 49 //  恙든삮逆?P) | ||||||
|  |     OPTION_HOTKEY_RECOMMEND_USER = 50 //  瓮룩뙢玲뺟뙼([) | ||||||
|  |     OPTION_HOTKEY_PARTY_MATCHING = 51 //  ?뷂썙烏숃뒭(]) | ||||||
|  |     OPTION_HOTKEY_FRIEND = 52 //  ???L) | ||||||
|  |     OPTION_HOTKEY_GUILD = 53 //  ?쏂릢(;) | ||||||
|  |     OPTION_HOTKEY_MEMBER = 54 //  屋밧맑(') | ||||||
|  |     OPTION_HOTKEY_BLACKLIST = 55 //  獵삯뮚 | ||||||
|  |     OPTION_HOTKEY_PVP_BUDDY = 56 //  恙든삮??? | ||||||
|  |     OPTION_HOTKEY_WAR_AREA_LIST = 57 //  ?ょ댌?썹쓰瓦밭깱??,) | ||||||
|  |     OPTION_HOTKEY_AUCTION_WINDOW = 58 //  ?녘줂逆?B) | ||||||
|  |     OPTION_HOTKEY_GOBLIN_PAD = 59 //  ?싩뻬?쇽썱?? | ||||||
|  |     OPTION_HOTKEY_HOTKEY_SETTING_WINDOW = 60 //  ??뭅???묈쭨?? | ||||||
|  |     OPTION_HOTKEY_WAR_AREA_INFORMATION = 61 //  ?ょ댌?썹쓰 冶쒎컮??End) | ||||||
|  |     OPTION_HOTKEY_HELLMODE_INFORMATION = 62 //  易?旅㏝섶 耀듣쑬?얕쇋 壤딀뙟 | ||||||
|  |     OPTION_HOTKEY_FAVOR_CHECK_WINDOW = 63 //  易?旅㏝섶 耀듣쑬?얕쇋 壤딀뙟 | ||||||
|  |     OPTION_HOTKEY_EXPERT_JOB = 64 //  ?や쑤?쒏쑛 ??젉 | ||||||
|  |     OPTION_HOTKEY_EMOTION_EXPRESSION = 65 //  要у쭨?믭옡 ??젉 | ||||||
|  |     OPTION_HOTKEY_EVENT = 66 //  旅㎪툙?얗깺(shift) | ||||||
|  |     OPTION_HOTKEY_PVP_MSSION = 67 //  ?먩슢耶븀눈?? | ||||||
|  |     OPTION_HOTKEY_PVP_RECORD = 68 //  ?ょ옾弱붹솱?? | ||||||
|  |     OPTION_HOTKEY_QUICK_CHAT_0 = 69 | ||||||
|  |     OPTION_HOTKEY_QUICK_CHAT_1 = 70 | ||||||
|  |     OPTION_HOTKEY_QUICK_CHAT_2 = 71 | ||||||
|  |     OPTION_HOTKEY_QUICK_CHAT_3 = 72 | ||||||
|  |     OPTION_HOTKEY_QUICK_CHAT_4 = 73 | ||||||
|  |     OPTION_HOTKEY_QUICK_CHAT_5 = 74 | ||||||
|  |     OPTION_HOTKEY_QUICK_CHAT_6 = 75 | ||||||
|  |     OPTION_HOTKEY_QUICK_CHAT_7 = 76 | ||||||
|  |     OPTION_HOTKEY_QUICK_CHAT_8 = 77 | ||||||
|  |     OPTION_HOTKEY_QUICK_CHAT_9 = 78 | ||||||
|  |     OPTION_HOTKEY_TOGGLE_ITEMINFO_COMPARE = 79 //  爺닸¨??瀯욘럷???わ읂??(Default: F8) | ||||||
|  |     OPTION_HOTKEY_TITLEBOOK = 80 //  ??윮髥? | ||||||
|  |     OPTION_HOTKEY_THIS_DUNGEON = 81 //  ?η눈?? | ||||||
|  |     OPTION_HOTKEY_ANOTHER_DUNGEON = 82 //  汝삭뎴 疫띸옫 榮ョ옫 | ||||||
|  |     OPTION_HOTKEY_RETURN_TO_TOWN = 83 //  ?녶눤??瀯쇿Т?쎿솱 | ||||||
|  |     OPTION_HOTKEY_MERCENARY_SYSTEM = 84 //  渦①끋 ?ヨ씢?? | ||||||
|  |     OPTION_HOTKEY_ITEM_DICTIONARY = 85 | ||||||
|  |     OPTION_HOTKEY_QUICK_PARTY_REGISTER = 86 //  瀯よ뎴 ?뷂썙 ?붺깱 癰귟녃 | ||||||
|  | } | ||||||
|  | 
 | ||||||
| //方向枚举表 | //方向枚举表 | ||||||
| enum DIRECTION { | enum DIRECTION { | ||||||
|     //左 |     //左 | ||||||
|  |  | ||||||
|  | @ -7,6 +7,321 @@ | ||||||
| enum MUSIC { | enum MUSIC { | ||||||
|     M_CHARACTER_SELECT = "music/characterSelectStage.ogg" |     M_CHARACTER_SELECT = "music/characterSelectStage.ogg" | ||||||
| 
 | 
 | ||||||
|  | 
 | ||||||
|  |     //map | ||||||
|  |     M_FOREST_TOWN = "music/forest_town.ogg" | ||||||
|  |     M_FOREST_02 = "music/forest02.ogg" | ||||||
|  |     M_CHARACTER_SELECT = "music/characterSelectStage.ogg" | ||||||
|  |     M_GRAKKARAK_01 = "music/grakkarak.ogg" | ||||||
|  |     M_GRAKKARAK_BOSS = "music/grakkarak_new_boss.ogg" | ||||||
|  |     M_SKYCASTLE_01 = "music/sc_01.ogg" | ||||||
|  |     M_SKYCASTLE_BOSS_03 = "music/sc_b03.ogg" | ||||||
|  |     M_TAVERN_01 = "music/tavern.ogg" | ||||||
|  |     M_HENDONMYRE = "music/hendonmyre_new.ogg" | ||||||
|  |     M_WESTCOAST = "music/westcoast_new.ogg" | ||||||
|  |     SERA_SHOP = "music/sera_shop.ogg" | ||||||
|  |     AVATA_SHOP = "music/avata.ogg" | ||||||
|  |     M_ALFHLYRA = "music/alfhlyra_new.ogg" | ||||||
|  |     M_UNDERFOOT = "music/underfoot.ogg" | ||||||
|  |     M_SHALLOWKEEP = "music/shallow_keep.ogg" | ||||||
|  |     M_SHALLOWKEEP_BOSS = "music/shallow_keep_b01.ogg" | ||||||
|  |     M_OCEAN = "music/mocean.ogg" | ||||||
|  |     FLOAT_CASTLE = "music/float_castle.ogg" | ||||||
|  |     GRENSELOS_BATTLE_01 = "music/grenselos_battle.ogg" | ||||||
|  |     GRENSELOS_READY = "music/grenselos_ready.ogg" | ||||||
|  |     GRENSELOS_TRUCE = "music/grenselos_truce.ogg" | ||||||
|  |     M_KINGS_RUINS = "music/kings_ruins.ogg" | ||||||
|  |     M_MAGMA_CAVE = "music/magma_cave.ogg" | ||||||
|  |     M_VILMARK = "music/vilmark.ogg" | ||||||
|  |     M_VILMARK_BOSS = "music/vilmark_boss.ogg" | ||||||
|  |     M_DARKELF_BOSS = "music/darkelf_boss.ogg" | ||||||
|  |     DARKELF_AMB = "music/darkelf_amb.ogg" | ||||||
|  |     M_CHARNAKRIDGE_BOSS = "music/charnakridge_boss.ogg" | ||||||
|  |     M_CHARNAKRIDGE = "music/charnakridge.ogg" | ||||||
|  |     M_STORMPASS = "music/storm_pass.ogg" | ||||||
|  |     M_COLD_BOY = "music/cold_boy.ogg" | ||||||
|  |     M_BLOODHELL = "music/bloodhell.ogg" | ||||||
|  |     M_BLOODHELL_BOSS = "music/bloodhell_boss.ogg" | ||||||
|  |     M_HELLMONSTER = "music/hellmonster.ogg" | ||||||
|  |     M_THIEF = "music/thief.ogg" | ||||||
|  |     M_THIEF_BOSS = "music/thief_boss.ogg" | ||||||
|  |     M_HAMELN = "music/hameln.ogg" | ||||||
|  |     M_HAMELN_BOSS = "music/hameln_boss.ogg" | ||||||
|  |     M_TUTORIAL = "music/intro.ogg" | ||||||
|  |     M_UNDERFOOT_ENTER = "music/underfoot_enterence.ogg" | ||||||
|  |     M_UNDERFOOT_ENTER_BOSS = "music/underfoot_enterence_boss.ogg" | ||||||
|  |     M_SCREAMING_CAVE = "music/screaming_cave.ogg" | ||||||
|  |     M_SCREAMING_CAVE_BOSS = "music/screaming_cave_boss.ogg" | ||||||
|  |     M_TOWN_GHOST = "music/town_ghost.ogg" | ||||||
|  |     M_TOWN_PVP = "music/town_pvp.ogg" | ||||||
|  |     M_EVILSPIRIT = "music/evilspirit.ogg" | ||||||
|  |     M_EVILTOWER_01 = "music/eviltower_01.ogg" | ||||||
|  |     M_EVILTOWER_02 = "music/eviltower_02.ogg" | ||||||
|  |     M_DRACONIAN_TOWER = "music/draconian_tower.ogg" | ||||||
|  |     M_DRACONIAN_TOWER_BOSS = "music/draconian_tower_boss.ogg" | ||||||
|  |     M_HALL_OF_DOLL = "music/hall_of_doll.ogg" | ||||||
|  |     M_HALL_OF_DOLL_BOSS = "music/hall_of_doll_boss.ogg" | ||||||
|  |     M_GOLEM_TOWER = "music/golem_tower.ogg" | ||||||
|  |     M_GOLEM_TOWER_BOSS = "music/golem_tower_boss.ogg" | ||||||
|  |     M_DARKNESS_ENTER = "music/darkness_enter.ogg" | ||||||
|  |     M_DARKNESS_ENTER_BOSS = "music/darkness_enter_boss.ogg" | ||||||
|  |     M_PALACE_OF_LOAD = "music/palace_of_load.ogg" | ||||||
|  |     M_PALACE_OF_LOAD_BOSS = "music/palace_of_load_boss.ogg" | ||||||
|  |     M_PURGATORY = "music/purgatory.ogg" | ||||||
|  |     M_SHADOW_MAZE = "music/shadow_maze.ogg" | ||||||
|  |     M_SHADOW_MAZE_BOSS = "music/shadow_maze_boss.ogg" | ||||||
|  |     M_CAROL_SHOP = "music/carol_shop.ogg" | ||||||
|  |     M_CAROL_GATE = "music/carol_gate.ogg" | ||||||
|  |     M_BEHEMOTH_BOSS_01_1 = "music/behemoth_b01_1.ogg" | ||||||
|  |     M_ILLUSIONTOWER = "music/illusiontower.ogg" | ||||||
|  |     M_ICEPALACE = "music/icepalace.ogg" | ||||||
|  |     M_ICEPALACE_BOSS = "music/icepalace_boss.ogg" | ||||||
|  |     M_SKASA = "music/skasa.ogg" | ||||||
|  |     M_SKASA_BOSS = "music/skasa_boss.ogg" | ||||||
|  |     M_RIKU_CAVE = "music/riku_cave.ogg" | ||||||
|  |     M_RIKU_BOSS = "music/riku_boss.ogg" | ||||||
|  |     M_GBLARAD = "music/GBLarad.ogg" | ||||||
|  |     M_GBLARAD_BOSS = "music/GBLarad_boss.ogg" | ||||||
|  |     M_GENTGATE = "music/gentgate.ogg" | ||||||
|  |     M_GENTGATE_BOSS = "music/gentgate_boss.ogg" | ||||||
|  |     M_GENTGATE_OUTSIDE = "music/gentgate_outside.ogg" | ||||||
|  |     M_GENTGATE_OUTSIDE_BOSS = "music/gentgate_outside_boss.ogg" | ||||||
|  |     M_SKYSTAIR = "music/gent.ogg" | ||||||
|  |     M_TEMP_MAGEE = "music/temp_mcgee.ogg" | ||||||
|  |     M_TEMP_ODESA = "music/odesa_new.ogg" | ||||||
|  |     M_ODESA_BOSS = "music/odesa_boss_new.ogg" | ||||||
|  |     M_GROZNY_BOSS = "music/grozny_boss_new.ogg" | ||||||
|  |     M_BWANGA = "music/bwanga.ogg" | ||||||
|  |     M_BWANGA_BOSS = "music/bwanga_boss.ogg" | ||||||
|  |     M_AGANZO = "music/aganzo.ogg" | ||||||
|  |     M_AGANZO_BOSS = "music/aganzo_boss.ogg" | ||||||
|  |     M_GSEEKER01 = "music/Gseeker01.ogg" | ||||||
|  |     M_GSEEKER01_BOSS = "music/Gseeker01_boss.ogg" | ||||||
|  |     M_SERASHOP_NEW = "music/sera_shop_new.ogg" | ||||||
|  |     M_CHARACTER_SELECT_NEW = "music/characterSelectStage_new.ogg" | ||||||
|  |     M_GATE_NEW = "music/gate_new.ogg" | ||||||
|  |     M_FOREST_01_NEW = "music/forest01_new.ogg" | ||||||
|  |     M_CAROL_ROCK = "music/carol_rock.ogg" | ||||||
|  |     M_NPERA = "music/Npera.ogg" | ||||||
|  |     M_NPERA_BOSS = "music/Npera_boss.ogg" | ||||||
|  |     M_JOB_GUIDE = "music/job_guide.ogg" | ||||||
|  |     M_BATTLE_FESTA_01 = "music/Battle_Festa_01.ogg" | ||||||
|  |     M_BATTLE_FESTA_02 = "music/Battle_Festa_02.ogg" | ||||||
|  |     M_BATTLE_FESTA_WAITING = "music/Battle_Festa_waiting.ogg" | ||||||
|  |     M_BLOODTOWER_01 = "music/Bloodtower_01.ogg" | ||||||
|  |     M_BLOODTOWER_02 = "music/Bloodtower_02.ogg" | ||||||
|  |     M_BLOODTOWER_03 = "music/Bloodtower_03.ogg" | ||||||
|  |     M_GUILD_AGIT = "music/Guild_agit.ogg" | ||||||
|  |     M_BATTLE_FESTA_LOADING = "music/Battle_Festa_loading.ogg" | ||||||
|  |     M_VDEFENCE = "music/vdefence.ogg" | ||||||
|  |     M_INTERCEPTION = "music/interception.ogg" | ||||||
|  |     M_INTERCEPTION_BOSS = "music/interception_boss.ogg" | ||||||
|  |     M_NIGHTATTACK = "music/nightattack.ogg" | ||||||
|  |     M_NIGHTATTACK_BOSS = "music/nightattack_boss.ogg" | ||||||
|  |     M_PURSUIT = "music/pursuit.ogg" | ||||||
|  |     M_PURSUIT_BOSS = "music/pursuit_boss.ogg" | ||||||
|  |     M_BLOODBUTTERFLY = "music/bloodbutterfly.ogg" | ||||||
|  |     M_BLOODBUTTERFLY_BOSS = "music/bloodbutterfly_boss.ogg" | ||||||
|  |     M_PIRATE = "music/pirate.ogg" | ||||||
|  |     M_PIRATE_BOSS = "music/pirate_boss.ogg" | ||||||
|  |     M_SEATRAIN = "music/seatrain.ogg" | ||||||
|  |     M_SEATRAIN_BOSS = "music/seatrain_boss.ogg" | ||||||
|  |     M_SEATRAIN_KONG = "music/seatrain_kong.ogg" | ||||||
|  |     M_SUSPICION = "music/suspicion.ogg" | ||||||
|  |     M_SUSPICION_BOSS = "music/suspicion_boss.ogg" | ||||||
|  |     M_LUFTHAFEN = "music/lufthafen.ogg" | ||||||
|  |     M_MIRKWOOD = "music/mirkwood.ogg" | ||||||
|  |     M_MIRKWOOD_BOSS = "music/mirkwood_boss.ogg" | ||||||
|  |     M_SUNDERLAND = "music/sunderland.ogg" | ||||||
|  |     M_SUNDERLAND_BOSS = "music/sunderland_boss.ogg" | ||||||
|  |     M_GRAKKARAK = "music/grakkarak_new.ogg" | ||||||
|  |     M_EVENTBGM = "music/eventBGM.ogg" | ||||||
|  |     M_GHOSTTRAIN = "music/ghost_train.ogg" | ||||||
|  |     M_GHOSTTRAIN_BOSS = "music/ghost_train_boss.ogg" | ||||||
|  |     M_LESHPHON = "music/leshphon.ogg" | ||||||
|  |     M_LESHPHON_BOSS = "music/leshphon_boss.ogg" | ||||||
|  |     M_PVP_BWANGA = "music/pvp_bwanga.ogg" | ||||||
|  |     M_PVP_COUNTER = "music/pvp_counter.ogg" | ||||||
|  |     M_PVP_ODESA = "music/pvp_odesa.ogg" | ||||||
|  |     M_PVP_PUB = "music/pvp_pub.ogg" | ||||||
|  |     M_PVP_TOWER = "music/pvp_tower.ogg" | ||||||
|  |     M_PVP_PRACTICE = "music/pvp_practice.ogg" | ||||||
|  |     M_GENTGATE_NORTH = "music/gentgate_north.ogg" | ||||||
|  |     M_GENTGATE_NORTH_BOSS = "music/gentgate_north_boss.ogg" | ||||||
|  |     M_GENTGATE_DEFENCE = "music/gentgate_defence.ogg" | ||||||
|  |     M_GENTGATE_DEFENCE_BOSS = "music/gentgate_defence_boss.ogg" | ||||||
|  |     M_OUTER_TEMPLE = "music/outer_temple.ogg" | ||||||
|  |     M_DENDROID = "music/dendroid.ogg" | ||||||
|  |     M_PURGATORY_BOSS = "music/purgatory_boss.ogg" | ||||||
|  |     M_WHITENIGHT = "music/whitenight.ogg" | ||||||
|  |     M_WHITENIGHT_BOSS = "music/whitenight_boss.ogg" | ||||||
|  |     M_1ST_SPINE = "music/1st_spine.ogg" | ||||||
|  |     M_1ST_SPINE_BOSS = "music/1st_spine_boss.ogg" | ||||||
|  |     M_2ND_SPINE = "music/2nd_spine.ogg" | ||||||
|  |     M_2ND_SPINE_BOSS = "music/2nd_spine_boss.ogg" | ||||||
|  |     M_SPIDER = "music/spider.ogg" | ||||||
|  |     M_SPIDER_BOSS = "music/spider_boss.ogg" | ||||||
|  |     M_WHITELAND = "music/whiteland.ogg" | ||||||
|  |     M_WHITELAND_BOSS = "music/whiteland_boss.ogg" | ||||||
|  |     M_GENTGATE_EAST = "music/gentgate_east.ogg" | ||||||
|  |     M_GENTGATE_EAST_BOSS = "music/gentgate_east_boss.ogg" | ||||||
|  |     M_GBLARAD_LAB = "music/GBLarad_lab.ogg" | ||||||
|  |     M_GBLARAD_LAB_BOSS = "music/GBLarad_lab_boss.ogg" | ||||||
|  |     M_GBLARAD_HATCHERY = "music/GBLarad_hatchery.ogg" | ||||||
|  |     M_GBLARAD_HATCHERY_BOSS = "music/GBLarad_hatchery_boss.ogg" | ||||||
|  |     M_ARDEN = "music/arden.ogg" | ||||||
|  |     M_ARDEN_BOSS = "music/arden_boss.ogg" | ||||||
|  |     M_BREEDING_PLACE = "music/breeding_place.ogg" | ||||||
|  |     M_BREEDING_PLACE_BOSS = "music/breeding_place_boss.ogg" | ||||||
|  |     M_GODDESS_TEMPLE = "music/goddess_temple.ogg" | ||||||
|  |     M_GODDESS_TEMPLE_BOSS = "music/goddess_temple_boss.ogg" | ||||||
|  |     M_HAZE = "music/haze.ogg" | ||||||
|  |     M_HAZE_BOSS = "music/haze_boss.ogg" | ||||||
|  |     M_SHONAN = "music/shonan.ogg" | ||||||
|  |     M_TOURNAMENT_READY = "music/tournament_ready.ogg" | ||||||
|  |     M_TOURNAMENT_STAGE_01 = "music/tournament_stage_01.ogg" | ||||||
|  |     M_TOURNAMENT_STAGE_02 = "music/tournament_stage_02.ogg" | ||||||
|  |     M_GBLKINGDOM = "music/gblkingdom.ogg" | ||||||
|  |     M_GBLKINGDOM_BOSS = "music/gblkingdom_boss.ogg" | ||||||
|  |     M_SKYCASTLE = "music/skycastle.ogg" | ||||||
|  |     M_SKYCASTLE_BOSS = "music/skycastle_boss.ogg" | ||||||
|  |     M_SQUADWAR = "music/squadwar.ogg" | ||||||
|  |     M_SQUADWAR_BOSS = "music/squadwar_boss.ogg" | ||||||
|  |     M_BAKALCASTLE = "music/bakalcastle.ogg" | ||||||
|  |     M_BAKALCASTLE_BOSS_INTRO = "music/bakalcastle_intro.ogg" | ||||||
|  |     M_BAKALCASTLE_BOSS = "music/bakalcastle_boss.ogg" | ||||||
|  |     M_BLACKEARTH = "music/blackearth.ogg" | ||||||
|  |     M_BLACKEARTH_NAMED = "music/blackearth_named.ogg" | ||||||
|  |     M_BLACKEARTH_BOSS = "music/blackearth_boss.ogg" | ||||||
|  |     M_DIMENSIONSPACE = "music/dimensionspace.ogg" | ||||||
|  |     M_DIMENSIONSPACE_BOSS = "music/dimensionspace_boss.ogg" | ||||||
|  |     M_TIMEGATE = "music/timegate.ogg" | ||||||
|  |     M_NOBLE_SKY = "music/noble_sky.ogg" | ||||||
|  |     M_T_CONFLAGRATION = "music/t_chaos_begin(conflagration).ogg" | ||||||
|  |     M_T_CONFLAGRATION_BOSS = "music/t_rage(conflagration_boss).ogg" | ||||||
|  |     M_T_EPIDEMIC = "music/t_land_of_darkness(epidemic).ogg" | ||||||
|  |     M_T_EPIDEMIC_BOSS = "music/t_skull_knight(epidemic_boss).ogg" | ||||||
|  |     M_T_CARTEL = "music/t_we_are_desperado(cartel).ogg" | ||||||
|  |     M_T_CARTEL_BOSS = "music/t_adios_verrickt(cartel_boss).ogg" | ||||||
|  |     M_T_B_CHURCH = "music/t_black_holy_war(b_church).ogg" | ||||||
|  |     M_T_B_CHURCH_BOSS = "music/t_out_of_control(b_church_boss).ogg" | ||||||
|  |     M_T_S_AREA = "music/t_failed_metastasis(s_area).ogg" | ||||||
|  |     M_T_S_AREA_BOSS = "music/t_the_kerberos(s_area_boss).ogg" | ||||||
|  |     M_T_OLD_SCAVE = "music/t_conspiracy(old_scave).ogg" | ||||||
|  |     M_T_OLD_SCAVE_BOSS = "music/t_confrontation(old_scave_boss).ogg" | ||||||
|  |     M_T_BEGINNING = "music/t_three_dragons(beginning).ogg" | ||||||
|  |     M_T_BEGINNING_BOSS = "music/t_young_skasa(beginning_boss).ogg" | ||||||
|  |     M_T_CONSCIOUSNESS = "music/t_iris_song.ogg" | ||||||
|  |     M_T_CONSCIOUSNESS_BOSS = "music/t_consciousness.ogg" | ||||||
|  |     M_T_QUEST_THEME = "music/t_quest_theme.ogg" | ||||||
|  |     M_CARTEL_HEADQUATER = "music/cartel_headquater.ogg" | ||||||
|  |     M_CARTEL_HEADQUATER_BOSS = "music/cartel_headquater_boss.ogg" | ||||||
|  |     M_CARTEL_JUMP_DOWN = "music/cartel_jump_down.ogg" | ||||||
|  |     M_SLOUGH_INDUSTRIAL = "music/slough_industrial.ogg" | ||||||
|  |     M_FRUZ = "music/fruz.ogg" | ||||||
|  |     M_FRUZ_BOSS = "music/fruz_boss.ogg" | ||||||
|  |     M_GRANDINE = "music/grandine.ogg" | ||||||
|  |     M_GRANDINE_BOSS = "music/grandine_boss.ogg" | ||||||
|  |     M_KOHLE = "music/kohle.ogg" | ||||||
|  |     M_KOHLE_BOSS = "music/kohle_boss.ogg" | ||||||
|  |     M_TROMBE = "music/trombe.ogg" | ||||||
|  |     M_TROMBE_BOSS = "music/trombe_boss.ogg" | ||||||
|  |     M_DESPAIR_TOWER_UNDER = "music/despair_tower_under.ogg" | ||||||
|  |     M_DESPAIR_TOWER_TOP = "music/despair_tower_top.ogg" | ||||||
|  |     M_LARGUS_01 = "music/largus_01.ogg" | ||||||
|  |     M_LARGUS_02 = "music/largus_02.ogg" | ||||||
|  |     M_SAINT_HORN = "music/saint_horn.ogg" | ||||||
|  |     M_HENDON_CITYHALL = "music/hendon_cityhall.ogg" | ||||||
|  |     M_ROLLING_STONE = "music/black_stone.ogg" | ||||||
|  |     M_ROLLING_STONE_BOSS = "music/black_stone_boss.ogg" | ||||||
|  |     M_BLACK_STONE = "music/black_stone.ogg" | ||||||
|  |     M_BLACK_STONE_BOSS = "music/black_stone_boss.ogg" | ||||||
|  |     M_RED_STONE = "music/red_stone.ogg" | ||||||
|  |     M_RED_STONE_BOSS = "music/red_stone_boss.ogg" | ||||||
|  |     M_STREET_BATTLE = "music/street_battle.ogg" | ||||||
|  |     M_STREET_BATTLE_BOSS = "music/street_battle_boss.ogg" | ||||||
|  |     M_EMPIRE_REMPART = "music/empire_rempart.ogg" | ||||||
|  |     M_PVP_AREA = "music/pvp_area.ogg" | ||||||
|  |     M_PVP_GATE = "music/pvp_gate.ogg" | ||||||
|  |     M_AD_ALTAR_BOSS = "music/ad_altar_boss.ogg" | ||||||
|  |     M_AD_ALTAR_HUGEWAVE = "music/ad_altar_hugewave.ogg" | ||||||
|  |     M_AD_ALTAR_NORMAL = "music/ad_altar_normal.ogg" | ||||||
|  |     M_SHONAN_OUTSIDE = "music/shonan_outside.ogg" | ||||||
|  |     M_NEN_AREA = "music/nen_area.ogg" | ||||||
|  |     M_NEN_AREA_BOSS = "music/nen_area_boss.ogg" | ||||||
|  |     M_IN_CAVE = "music/in_cave.ogg" | ||||||
|  |     M_IN_CAVE_BOSS = "music/in_cave_boss.ogg" | ||||||
|  |     M_THE_NEST_OF_NEITRAM = "music/the_nest_of_neitram.ogg" | ||||||
|  |     M_HELIX_LAB = "music/helix_lab.ogg" | ||||||
|  |     M_HELIX_LAB_TRAP = "music/helix_lab_trap.ogg" | ||||||
|  |     M_HELIX_LAB_BOSS = "music/helix_lab_boss.ogg" | ||||||
|  |     M_CHURCH = "music/church.ogg" | ||||||
|  | 
 | ||||||
|  | 
 | ||||||
|  |     //AMB | ||||||
|  |     AMB_CAVE_01 = "music/amb_cave_01.ogg" | ||||||
|  |     AMB_CAVE_02 = "music/amb_cave_02.ogg" | ||||||
|  |     AMB_MAZE = "music/amb_maze.ogg" | ||||||
|  |     AMB_DARKSTAGE_01 = "music/amb_darkstage_01.ogg" | ||||||
|  |     AMB_DARKSTAGE_02 = "music/amb_darkstage_02.ogg" | ||||||
|  |     AMB_DIMENSION_01 = "music/amb_dimension_01.ogg" | ||||||
|  |     AMB_EVILTOWER_BASIC = "music/amb_eviltower_basic.ogg" | ||||||
|  |     AMB_FOREST_01 = "music/amb_forest_01.ogg" | ||||||
|  |     AMB_FOREST_02 = "music/amb_forest_02.ogg" | ||||||
|  |     AMB_FOREST_03 = "music/amb_forest_03.ogg" | ||||||
|  |     AMB_FOREST_04 = "music/amb_forest_04.ogg" | ||||||
|  |     AMB_INSIDE_01 = "music/amb_inside_01.ogg" | ||||||
|  |     AMB_PUB_01 = "music/amb_pub_01.ogg" | ||||||
|  |     AMB_RAIN_01 = "music/amb_rain_01.ogg" | ||||||
|  |     AMB_RAIN_02 = "music/amb_rain_02.ogg" | ||||||
|  |     AMB_RAIN_03 = "music/amb_rain_03.ogg" | ||||||
|  |     AMB_SNOWCAVE_01 = "music/amb_snowcave_01.ogg" | ||||||
|  |     AMB_SNOWWIND_01 = "music/amb_snowwind_01.ogg" | ||||||
|  |     AMB_SNOWWIND_02 = "music/amb_snowwind_02.ogg" | ||||||
|  |     AMB_THUNDER_01 = "music/amb_thunder_01.ogg" | ||||||
|  |     AMB_THUNDER_02 = "music/amb_thunder_02.ogg" | ||||||
|  |     AMB_TOWN_01 = "music/amb_town_01.ogg" | ||||||
|  |     AMB_TOWN_02 = "music/amb_town_02.ogg" | ||||||
|  |     AMB_TOWN_03 = "music/amb_town_03.ogg" | ||||||
|  |     AMB_TRAIN_01 = "music/amb_train_01.ogg" | ||||||
|  |     AMB_TRAIN_02 = "music/amb_train_02.ogg" | ||||||
|  |     AMB_TOWN_DARK_01 = "music/amb_town_dark_01.ogg" | ||||||
|  |     AMB_TOWN_DARK_02 = "music/amb_town_dark_02.ogg" | ||||||
|  |     AMB_TOWN_DARK_03 = "music/amb_town_dark_03.ogg" | ||||||
|  |     AMB_TOWN_DARK_04 = "music/amb_town_dark_04.ogg" | ||||||
|  |     AMB_VISCERAL_01 = "music/amb_visceral_01.ogg" | ||||||
|  |     AMB_WAR_01 = "music/amb_war_01.ogg" | ||||||
|  |     AMB_WAR_02 = "music/amb_war_02.ogg" | ||||||
|  |     AMB_WATER_01 = "music/amb_water_01.ogg" | ||||||
|  |     AMB_WIND_01 = "music/amb_wind_01.ogg" | ||||||
|  |     AMB_WIND_02 = "music/amb_wind_02.ogg" | ||||||
|  |     AMB_WIND_03 = "music/amb_wind_03.ogg" | ||||||
|  |     AMB_TRAINSTATION_01 = "music/amb_trainstation_01.ogg" | ||||||
|  |     AMB_PORT_01 = "music/amb_port_01.ogg" | ||||||
|  |     AMB_TRAIN_03 = "music/amb_train_03.ogg" | ||||||
|  |     AMB_CHURCH = "music/amb_church.ogg" | ||||||
|  |     AMB_TIME_DARKCASTLE = "music/amb_time_darkcastle.ogg" | ||||||
|  |     AMB_WIND_04 = "music/amb_wind_04.ogg" | ||||||
|  |     AMB_TOPSECRET = "music/amb_topsecret.ogg" | ||||||
|  |     AMB_WARNING = "music/amb_warning.ogg" | ||||||
|  |     AMB_FOREST_05 = "music/amb_forest_05.ogg" | ||||||
|  |     AMB_TIMEGATE = "music/amb_timegate.ogg" | ||||||
|  |     AMB_POWERSTATION_KOHLE = "music/amb_powerstation_kohle.ogg" | ||||||
|  |     AMB_POWERSTATION_FRUZ = "music/amb_powerstation_fruz.ogg" | ||||||
|  |     AMB_POWERSTATION_TROMBE = "music/amb_powerstation_trombe.ogg" | ||||||
|  |     AMB_POWERSTATION_GRANDINE = "music/amb_powerstation_grandine.ogg" | ||||||
|  |     AMB_RIDER = "music/amb_rider.ogg" | ||||||
|  |     AMB_ZOMBIE_VIRUS = "music/amb_zombie_virus.ogg" | ||||||
|  |     AMB_PRISON = "music/amb_prison.ogg" | ||||||
|  |     AMB_FOREST_06 = "music/amb_forest_06.ogg" | ||||||
|  |     AMB_WIND_05 = "music/amb_wind_05.ogg" | ||||||
|  |     AMB_FIRE = "music/amb_fire.ogg" | ||||||
|  |     AMB_CAVE_03 = "music/amb_cave_03.ogg" | ||||||
|  |     AMB_MINE = "music/amb_mine.ogg" | ||||||
|  |     AMB_UNDERGROUND = "music/amb_underground.ogg" | ||||||
|  |     AMB_FOUNTAIN = "music/amb_fountain.ogg" | ||||||
|  |     AMB_PORT_IN_RUINS = "music/amb_port_in_ruins.ogg" | ||||||
|  |     AMB_TREASURE = "music/amb_treasure.ogg" | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| enum SOUND { | enum SOUND { | ||||||
|  |  | ||||||
|  | @ -10,7 +10,6 @@ | ||||||
| 
 | 
 | ||||||
| function main(args) { | function main(args) { | ||||||
| 
 | 
 | ||||||
| 
 |  | ||||||
|     local Game = GameWindow(); |     local Game = GameWindow(); | ||||||
|     Game.title = "Yosin & Kiwano"; |     Game.title = "Yosin & Kiwano"; | ||||||
|     Game.bg_color = [255.0, 255.0, 255.0, 255.0]; |     Game.bg_color = [255.0, 255.0, 255.0, 255.0]; | ||||||
|  |  | ||||||
|  | @ -193,5 +193,50 @@ | ||||||
|     }, |     }, | ||||||
|     "User/_ENUM/enum_music.nut": { |     "User/_ENUM/enum_music.nut": { | ||||||
|         "description": "音乐枚举" |         "description": "音乐枚举" | ||||||
|  |     }, | ||||||
|  |     "Core/InputClass": { | ||||||
|  |         "description": "输入类" | ||||||
|  |     }, | ||||||
|  |     "User/Controller": { | ||||||
|  |         "description": "控制器" | ||||||
|  |     }, | ||||||
|  |     "User/Controller/Controller.nut": { | ||||||
|  |         "description": "游戏控制器" | ||||||
|  |     }, | ||||||
|  |     "User/Controller/ObjectController.nut": { | ||||||
|  |         "description": "对象控制器" | ||||||
|  |     }, | ||||||
|  |     "User/Object/Map/MapCrmera.nut": { | ||||||
|  |         "description": "地图摄像机" | ||||||
|  |     }, | ||||||
|  |     "User/Object/Map/TileObject.nut": { | ||||||
|  |         "description": "地板对象" | ||||||
|  |     }, | ||||||
|  |     "User/Object/ActiveObject/ActiveObjectClass.nut": { | ||||||
|  |         "description": "动态对象" | ||||||
|  |     }, | ||||||
|  |     "User/Object/ActiveObject/CharacterObjectClass_AI.nut": { | ||||||
|  |         "description": "APC对象" | ||||||
|  |     }, | ||||||
|  |     "User/Object/ActiveObject/CharacterObjectClass.nut": { | ||||||
|  |         "description": "角色对象" | ||||||
|  |     }, | ||||||
|  |     "User/Object/ActiveObject/MonsterObjectClass.nut": { | ||||||
|  |         "description": "怪物对象" | ||||||
|  |     }, | ||||||
|  |     "User/Object/ActiveObject/PassiveObjectClass.nut": { | ||||||
|  |         "description": "被动对象" | ||||||
|  |     }, | ||||||
|  |     "User/Object/ActiveObject/StaticObjectClass.nut": { | ||||||
|  |         "description": "静态对象" | ||||||
|  |     }, | ||||||
|  |     "User/Object/Map/TownObject.nut": { | ||||||
|  |         "description": "城镇类" | ||||||
|  |     }, | ||||||
|  |     "User/Object/Map/MapCamera.nut": { | ||||||
|  |         "description": "摄像机类" | ||||||
|  |     }, | ||||||
|  |     "User/UI/Window/3_Top_tool.nut": { | ||||||
|  |         "description": "顶部工具条" | ||||||
|     } |     } | ||||||
| } | } | ||||||
		Loading…
	
		Reference in New Issue