mirror of
https://gitlab.com/YuukiPS/GSServer-CBT.git
synced 2025-08-03 02:10:12 +03:00
melon
This commit is contained in:
29
soggy_resources/lua/Actor/Cutscene/CutsceneActorProxy.lua
Normal file
29
soggy_resources/lua/Actor/Cutscene/CutsceneActorProxy.lua
Normal file
@@ -0,0 +1,29 @@
|
||||
----------------------
|
||||
-- 这是Lua端CutsceneActorProxy的基类,包含一些全局控制函数。继承自SubGlobalActorProxy
|
||||
-- @classmod CutsceneActorProxy
|
||||
require('Actor/ActorCommon')
|
||||
local subGlobalActorProxy = require('Actor/SubGlobal/SubGlobalActorProxy')
|
||||
|
||||
local CutsceneActorProxy = class("CutsceneActorProxy", subGlobalActorProxy)
|
||||
|
||||
CutsceneActorProxy.actorType = ActorType.CUTSCENE_ACTOR
|
||||
|
||||
--- SubGlobalActorProxy alias
|
||||
CutsceneActorProxy.defaultAlias = "Cutscene"
|
||||
|
||||
local super = nil
|
||||
|
||||
function CutsceneActorProxy:OnPreInit()
|
||||
super = self.__super
|
||||
super:OnPreInit()
|
||||
end
|
||||
|
||||
function CutsceneActorProxy:CreateUActor(alias)
|
||||
local uActor = actorUtils.CreateActor(self, ActorType.CUTSCENE_ACTOR, alias, self.metaPath)
|
||||
return uActor
|
||||
end
|
||||
|
||||
function CutsceneActorProxy:Start()
|
||||
end
|
||||
|
||||
return CutsceneActorProxy
|
@@ -0,0 +1,20 @@
|
||||
require('Actor/ActorCommon')
|
||||
local cutsceneActorProxy = require('Actor/Cutscene/CutsceneActorProxy')
|
||||
|
||||
local CutsceneActor_Goddess1201 = class("CutsceneActor_Goddess1201", cutsceneActorProxy)
|
||||
|
||||
function CutsceneActor_Goddess1201:Start()
|
||||
print("spawn local monster for goddess 1201")
|
||||
self:SpawnLocalMonster("show101", 21010201, 1, M.Pos(2404, 206, -5385), 0, 0, 1.0)
|
||||
self:SpawnLocalMonster("show102", 21010201, 1, M.Pos(2406, 206, -5386), 0, 0, 1.0)
|
||||
self:SpawnLocalMonster("show103", 21010301, 1, M.Pos(2406, 206, -5388), 0, 0, 1.0)
|
||||
end
|
||||
|
||||
function CutsceneActor_Goddess1201:OnDestroy()
|
||||
print("unspawn local mosnter for goddess 1201")
|
||||
self:UnSpawn("show101")
|
||||
self:UnSpawn("show102")
|
||||
self:UnSpawn("show103")
|
||||
end
|
||||
|
||||
return CutsceneActor_Goddess1201
|
@@ -0,0 +1,34 @@
|
||||
require('Actor/ActorCommon')
|
||||
local cutsceneActorProxy = require('Actor/Cutscene/CutsceneActorProxy')
|
||||
|
||||
local CutsceneActor_GoddessLvup = class("CutsceneActor_GoddessLvup", cutsceneActorProxy)
|
||||
|
||||
local alias = "mywind"
|
||||
local airFlowActor
|
||||
|
||||
local function PlayEffect()
|
||||
local effctPos = airFlowActor:GetPos()
|
||||
airFlowActor:PlayEffect("FlyRace_Marker_Active_AS", effctPos)
|
||||
end
|
||||
|
||||
function CutsceneActor_GoddessLvup:Start()
|
||||
print("****************CutsceneActor_GoddessLvup:Start*******************")
|
||||
airFlowActor = actorMgr:GetActor(alias)
|
||||
if airFlowActor == nil or airFlowActor == actorMgr.dummyActor then
|
||||
airFlowActor = nil
|
||||
print("can not find " .. alias)
|
||||
else
|
||||
airFlowActor:SetActive(false)
|
||||
self:CallDelay(1, PlayEffect)
|
||||
end
|
||||
end
|
||||
|
||||
function CutsceneActor_GoddessLvup:OnDestroy()
|
||||
print("#################CutsceneActor_GoddessLvup:OnDestroy()##################")
|
||||
if airFlowActor ~= nil then
|
||||
airFlowActor:SetActive(true)
|
||||
airFlowActor = nil
|
||||
end
|
||||
end
|
||||
|
||||
return CutsceneActor_GoddessLvup
|
@@ -0,0 +1,66 @@
|
||||
require('Actor/ActorCommon')
|
||||
local cutsceneActorProxy = require('Actor/Cutscene/CutsceneActorProxy')
|
||||
|
||||
local CutsceneActor_GoddessLvup = class("CutsceneActor_GoddessLvup", cutsceneActorProxy)
|
||||
|
||||
local airFlowActor
|
||||
local alias = {"WindField_Vertical_01", "WindField_Horizontal_01", "WindField_Horizontal_02", "WindField_Horizontal_03"}
|
||||
|
||||
function CutsceneActor_GoddessLvup:CreateWindLocal()
|
||||
if airFlowActor ~= nil then
|
||||
local pos = airFlowActor:GetPos()
|
||||
actorMgr:CreateActorWithPos("localWind", "Actor/Gadget/AirflowFieldActor", 70610101, 0, pos, {x=0,y=0,z=0}, true, false)
|
||||
end
|
||||
end
|
||||
|
||||
function CutsceneActor_GoddessLvup:DestroyWindLocal()
|
||||
local localWind = actorMgr:GetActor("localWind")
|
||||
if localWind == nil or localWind == actorMgr.dummyActor then
|
||||
print("can not find localWind")
|
||||
else
|
||||
localWind:DestroySelf()
|
||||
end
|
||||
end
|
||||
|
||||
function CutsceneActor_GoddessLvup:ShowEffect()
|
||||
if airFlowActor ~= nil then
|
||||
local effctPos = airFlowActor:GetPos()
|
||||
self:PlayEffect("WindSource01_PowerUp", effctPos)
|
||||
--self:CallDelay(2, self.CreateWindLocal)
|
||||
end
|
||||
end
|
||||
|
||||
function CutsceneActor_GoddessLvup:Start()
|
||||
print("****************CutsceneActor_GoddessLvup:Start*******************")
|
||||
for i,v in ipairs(alias) do
|
||||
local actor = actorMgr:GetActor(v)
|
||||
if actor == nil or actor == actorMgr.dummyActor then
|
||||
print("can not find " .. v)
|
||||
else
|
||||
--print(i)
|
||||
if i == 1 then
|
||||
airFlowActor = actor
|
||||
end
|
||||
actor:SetActive(false)
|
||||
end
|
||||
end
|
||||
|
||||
if airFlowActor ~= nil then
|
||||
self:CallDelay(9, self.ShowEffect)
|
||||
end
|
||||
end
|
||||
|
||||
function CutsceneActor_GoddessLvup:OnDestroy()
|
||||
print("#################CutsceneActor_GoddessLvup:OnDestroy()##################")
|
||||
self:DestroyWindLocal()
|
||||
|
||||
for _,v in ipairs(alias) do
|
||||
local actor = actorMgr:GetActor(v)
|
||||
if actor ~= nil and actor ~= actorMgr.dummyActor then
|
||||
actor:SetActive(true)
|
||||
end
|
||||
end
|
||||
airFlowActor = nil
|
||||
end
|
||||
|
||||
return CutsceneActor_GoddessLvup
|
16
soggy_resources/lua/Actor/Cutscene/TestCutsceneActor.lua
Normal file
16
soggy_resources/lua/Actor/Cutscene/TestCutsceneActor.lua
Normal file
@@ -0,0 +1,16 @@
|
||||
require('Actor/ActorCommon')
|
||||
local cutsceneActorProxy = require('Actor/Cutscene/CutsceneActorProxy')
|
||||
|
||||
local TestCutsceneActor = class("TestCutsceneActor", cutsceneActorProxy)
|
||||
|
||||
function TestCutsceneActor:Start()
|
||||
print("***********************************")
|
||||
self:SpawnLocalMonster("show102", 21010301, 1, M.Pos(371.25, 205.46, -258.35), 0, 0, 1.0)
|
||||
end
|
||||
|
||||
function TestCutsceneActor:OnDestroy()
|
||||
print("###################################")
|
||||
self:UnSpawn("show102")
|
||||
end
|
||||
|
||||
return TestCutsceneActor
|
Reference in New Issue
Block a user