增加文档
This commit is contained in:
@@ -1,25 +1,35 @@
|
||||
/*
|
||||
文件名:ActiveObject.nut
|
||||
路径:Game/ObjectClass/ActiveObject.nut
|
||||
创建日期:2025-10-03 02:50
|
||||
文件用途:
|
||||
*/
|
||||
|
||||
/**
|
||||
* Description placeholder
|
||||
* @global
|
||||
* @param {*} Object
|
||||
*/
|
||||
class ActiveObject extends BaseObject {
|
||||
constructor(Object) {
|
||||
base.constructor(Object);
|
||||
}
|
||||
|
||||
constructor(Object) {
|
||||
base.constructor(Object);
|
||||
}
|
||||
/**
|
||||
*
|
||||
* @function
|
||||
* @param {integer} x
|
||||
* @param {integer} y
|
||||
* @param {integer} z
|
||||
* @returns {void}
|
||||
*/
|
||||
function SetSpeed(x, y, z) {
|
||||
local CurSpeed = sq_GetSpeed(C_Object);
|
||||
if (x == null) x = CurSpeed.x;
|
||||
if (y == null) y = CurSpeed.y;
|
||||
if (z == null) z = CurSpeed.z;
|
||||
sq_SetSpeed(C_Object, x, y, z);
|
||||
}
|
||||
|
||||
function SetSpeed(x, y, z) {
|
||||
local CurSpeed = sq_GetSpeed(C_Object);
|
||||
if (x == null) x = CurSpeed.x;
|
||||
if (y == null) y = CurSpeed.y;
|
||||
if (z == null) z = CurSpeed.z;
|
||||
sq_SetSpeed(C_Object, x, y, z);
|
||||
}
|
||||
|
||||
function GetSpeed() {
|
||||
return sq_GetSpeed(C_Object);
|
||||
}
|
||||
}
|
||||
/**
|
||||
*
|
||||
* @function
|
||||
* @returns {any}
|
||||
*/
|
||||
function GetSpeed() {
|
||||
return sq_GetSpeed(C_Object);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,32 +1,75 @@
|
||||
/**
|
||||
* Description placeholder
|
||||
* @param {*} Object
|
||||
*/
|
||||
class BaseObject {
|
||||
//c++对象指针
|
||||
C_Object = null;
|
||||
//c++对象指针
|
||||
C_Object = null;
|
||||
|
||||
constructor(Object) {
|
||||
C_Object = Object;
|
||||
}
|
||||
constructor(Object) {
|
||||
C_Object = Object;
|
||||
}
|
||||
|
||||
function GetPosition() {
|
||||
return sq_GetPosition(C_Object);
|
||||
}
|
||||
/**
|
||||
*
|
||||
* @function
|
||||
* @returns {any}
|
||||
*/
|
||||
function GetPosition() {
|
||||
return sq_GetPosition(C_Object);
|
||||
}
|
||||
//
|
||||
/**
|
||||
*
|
||||
* @function
|
||||
* @param {integer} x
|
||||
* @param {integer} y
|
||||
* @param {integer} z
|
||||
* @returns {void}
|
||||
*/
|
||||
function SetPosition(x, y, z) {
|
||||
sq_SetPosition(C_Object, x, y, z);
|
||||
}
|
||||
|
||||
function SetPosition(x, y, z) {
|
||||
sq_SetPosition(C_Object, x, y, z);
|
||||
}
|
||||
/**
|
||||
*
|
||||
* @function
|
||||
* @param {string} Name
|
||||
* @param {any} Type
|
||||
* @returns {any}
|
||||
*/
|
||||
function GetVars(Name, Type) {
|
||||
return sq_GetVars(C_Object, Name, Type);
|
||||
}
|
||||
|
||||
function GetVars(Name, Type) {
|
||||
return sq_GetVars(C_Object, Name, Type);
|
||||
}
|
||||
/**
|
||||
*
|
||||
* @function
|
||||
* @param {string} Name
|
||||
* @param {any} Type
|
||||
* @param {any} Value
|
||||
* @returns {void}
|
||||
*/
|
||||
function SetVars(Name, Type, Value) {
|
||||
sq_SetVars(C_Object, Name, Type, Value);
|
||||
}
|
||||
|
||||
function SetVars(Name, Type, Value) {
|
||||
sq_SetVars(C_Object, Name, Type, Value);
|
||||
}
|
||||
/**
|
||||
*
|
||||
* @function
|
||||
* @returns {integer}
|
||||
*/
|
||||
function GetDirection() {
|
||||
return sq_GetDirection(C_Object);
|
||||
}
|
||||
|
||||
function GetDirection() {
|
||||
return sq_GetDirection(C_Object);
|
||||
}
|
||||
|
||||
function SetDirection(Dir) {
|
||||
sq_SetDirection(C_Object, Dir);
|
||||
}
|
||||
}
|
||||
/**
|
||||
*
|
||||
* @function
|
||||
* @param {integer} Dir
|
||||
* @returns {void}
|
||||
*/
|
||||
function SetDirection(Dir) {
|
||||
sq_SetDirection(C_Object, Dir);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,23 +1,38 @@
|
||||
/*
|
||||
文件名:CharacterObject.nut
|
||||
路径:Game/ObjectClass/CharacterObject.nut
|
||||
创建日期:2025-10-03 02:50
|
||||
文件用途:
|
||||
*/
|
||||
/**
|
||||
* Description placeholder
|
||||
* @param {*} Object
|
||||
*/
|
||||
class CharacterObject extends ActiveObject {
|
||||
constructor(Object) {
|
||||
base.constructor(Object);
|
||||
}
|
||||
constructor(Object) {
|
||||
base.constructor(Object);
|
||||
}
|
||||
|
||||
function GetState() {
|
||||
return sq_GetState(C_Object);
|
||||
}
|
||||
/**
|
||||
*
|
||||
* @function
|
||||
* @returns {*}
|
||||
*/
|
||||
function GetState() {
|
||||
return sq_GetState(C_Object);
|
||||
}
|
||||
|
||||
function SetState(State) {
|
||||
sq_SetState(C_Object, State);
|
||||
}
|
||||
/**
|
||||
*
|
||||
* @function
|
||||
* @param {integer} State
|
||||
* @returns {void}
|
||||
*/
|
||||
function SetState(State) {
|
||||
sq_SetState(C_Object, State);
|
||||
}
|
||||
|
||||
function SetAction(key) {
|
||||
sq_SetAction(C_Object, key);
|
||||
}
|
||||
}
|
||||
/**
|
||||
*
|
||||
* @function
|
||||
* @param {any} key
|
||||
* @returns {void}
|
||||
*/
|
||||
function SetAction(key) {
|
||||
sq_SetAction(C_Object, key);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user