LuaSTG-x Core API
plus::ReplayManager Class Reference

Public Member Functions

function GetRecord (local slot)
 
function GetReplayDirectory ()
 写入文件头 More...
 
function GetSlotCount ()
 
function init (local replayDirectory)
 
function MakeReplayFilename (local slot)
 
static function ReadReplayInfo (local path)
 刷新录像数据 More...
 
function Refresh ()
 
static function SaveReplayInfo (local path, local data)
 读取文件头 More...
 

Member Function Documentation

◆ GetRecord()

function GetRecord ( local  slot)

获取录像信息

Parameters
slotnumber 录像槽

◆ GetReplayDirectory()

function GetReplayDirectory ( )

写入文件头

版本号1 游戏数据 玩家信息 关卡数据 获取录像目录

◆ GetSlotCount()

function GetSlotCount ( )

获取录像数量

◆ init()

function init ( local  replayDirectory)

构造ReplayManager

Parameters
replayDirectorystring 录像文件夹

◆ MakeReplayFilename()

function MakeReplayFilename ( local  slot)

构造录像文件名称

◆ ReadReplayInfo()

static function ReadReplayInfo ( local  path)

刷新录像数据

[静态函数]读取录像数据

返回的录像数据信息以下述格式表述:

{

path = "文件路径",

fileVersion = 1, gameName = "游戏名称", gameVersion = 1, gameExtendInfo = "",

userName = "用户名", userExtendInfo = "用户额外信息",

stages = {

{

stageName = "关卡名称", stageExtendInfo = "", score = 0, randomSeed = 0,

stageTime = 0, stageDate = 0, stagePlayer=lstg.var.rep_player,

frameCount = 300, frameDataPosition = 12345

}

}

}

◆ Refresh()

function Refresh ( )

刷新

◆ SaveReplayInfo()

static function SaveReplayInfo ( local  path,
local  data 
)

读取文件头

版本号1 游戏数据 玩家信息 关卡数据 [静态函数] 写入录像数据

输入的录像信息需要满足下述表述:

{

 gameName = "游戏名称", gameVersion = 1, gameExtendInfo = "额外信息",

 userName = "用户名", userExtendInfo = "用户额外信息",

 stages = {

  {

   stageName = "关卡名称", stageExtendInfo = "", score = 0, randomSeed = 0,

   stageTime = 0, stageDate = 0, stagePlayer=lstg.var.rep_player,

   frameData = ReplayFrameWriter()

  }

 }

}


The documentation for this class was generated from the following file: