五月天青色头像情侣网名,国产亚洲av片在线观看18女人,黑人巨茎大战俄罗斯美女,扒下她的小内裤打屁股

歡迎光臨散文網(wǎng) 會(huì)員登陸 & 注冊(cè)

jass基礎(chǔ)-農(nóng)場(chǎng)加錢漂字

2023-08-12 23:15 作者:龐各莊大棚  | 我要投稿

#include "../../jass/BlizzardAPI.j"

library demo initializer test

? ? // 漂浮文字案例 - 農(nóng)場(chǎng)加錢漂字

? ? globals

? ? ? ? integer nm = 'h003'

? ? ? ? integer nc1 = 'h001'

? ? ? ? integer nc2 = 'h002'

? ? ? ? integer nc3 = 'h000'


? ? ? ? integer maxCount = 5

? ? ? ? hashtable ht

? ? ? ? timer tm = null

? ? ? ? unit array farmArr

? ? endglobals


? ? function doSomething takes nothing returns nothing


? ? endfunction


? ? function addMoney takes nothing returns nothing

? ? ? ? local integer i = 0

? ? ? ? local texttag tt

? ? ? ? loop

? ? ? ? ? ? exitwhen i >= maxCount

? ? ? ? ? ? if farmArr[i] != null then

? ? ? ? ? ? ? ? call SetPlayerState(Player(0), PLAYER_STATE_RESOURCE_GOLD, GetPlayerState(Player(0), PLAYER_STATE_RESOURCE_GOLD) + LoadInteger(ht, StringHash("農(nóng)場(chǎng)"), GetUnitTypeId(farmArr[i])))

? ? ? ? ? ? ? ? set tt = CreateTextTagUnitBJ("+" + I2S(LoadInteger(ht, StringHash("農(nóng)場(chǎng)"), GetUnitTypeId(farmArr[i]))), farmArr[i], 0, 14, 0, 100, 0, 0)

? ? ? ? ? ? ? ? call SetTextTagVelocityBJ(tt, 50, 90)

? ? ? ? ? ? ? ? call SetTextTagLifespan(tt, 2)

? ? ? ? ? ? ? ? call SetTextTagFadepoint(tt, 1)

? ? ? ? ? ? ? ? call SetTextTagPermanent(tt, false)

? ? ? ? ? ? endif

? ? ? ? ? ? set i = i + 1

? ? ? ? endloop

? ? ? ? set tt = null

? ? endfunction


? ? function getFreeIndex takes nothing returns integer

? ? ? ? local integer i = 0

? ? ? ? loop

? ? ? ? ? ? exitwhen i >= maxCount

? ? ? ? ? ? if farmArr[i] == null then

? ? ? ? ? ? ? ? return i

? ? ? ? ? ? endif

? ? ? ? ? ? set i = i + 1

? ? ? ? endloop

? ? ? ? return - 1

? ? endfunction


? ? function buildAction takes nothing returns nothing

? ? ? ? local integer index = getFreeIndex()

? ? ? ? if tm == null then

? ? ? ? ? ? set tm = CreateTimer()

? ? ? ? ? ? call TimerStart(tm, 1, true, function addMoney)

? ? ? ? endif

? ? ? ? set farmArr[index] = GetTriggerUnit()

? ? endfunction


? ? function deathAction takes nothing returns nothing

? ? ? ? local unit u = GetTriggerUnit()

? ? ? ? local integer i = 0

? ? ? ? loop

? ? ? ? ? ? exitwhen i >= maxCount

? ? ? ? ? ? if farmArr[i] == u then

? ? ? ? ? ? ? ? set farmArr[i] = null

? ? ? ? ? ? ? ? return

? ? ? ? ? ? endif

? ? ? ? ? ? set i = i + 1

? ? ? ? endloop

? ? ? ? set u = null

? ? endfunction


? ? function triggerInit takes nothing returns nothing

? ? ? ? local trigger t = CreateTrigger()

? ? ? ? local trigger t2 = CreateTrigger()

? ? ? ? local trigger t3 = CreateTrigger()

? ? ? ? call TriggerRegisterPlayerChatEvent(t, Player(0), "1", true)

? ? ? ? call TriggerAddAction(t, function doSomething)


? ? ? ? call TriggerRegisterAnyUnitEventBJ(t2, EVENT_PLAYER_UNIT_CONSTRUCT_FINISH)

? ? ? ? call TriggerAddAction(t2, function buildAction)


? ? ? ? call TriggerRegisterAnyUnitEventBJ(t3, EVENT_PLAYER_UNIT_DEATH)

? ? ? ? call TriggerAddAction(t3, function deathAction)

? ? ? ? set t = null

? ? ? ? set t2 = null

? ? ? ? set t3 = null

? ? endfunction


? ? function gameInit takes nothing returns nothing

? ? ? ? call FogEnable(false)

? ? ? ? call FogMaskEnable(false)

? ? ? ? set ht = InitHashtable()

? ? ? ? call SaveInteger(ht, StringHash("農(nóng)場(chǎng)"), nc1, 5)

? ? ? ? call SaveInteger(ht, StringHash("農(nóng)場(chǎng)"), nc2, 10)

? ? ? ? call SaveInteger(ht, StringHash("農(nóng)場(chǎng)"), nc3, 15)

? ? ? ? call CreateUnit(Player(0), nm, 0, 0, 0)

? ? ? ? call SetPlayerState(Player(0), PLAYER_STATE_RESOURCE_GOLD, 10000)

? ? ? ? call SetPlayerState(Player(0), PLAYER_STATE_RESOURCE_LUMBER, 10000)

? ? ? ? call SetPlayerTechMaxAllowed(Player(0), nc1, maxCount)

? ? endfunction


? ? function test takes nothing returns nothing

? ? ? ? call gameInit()

? ? ? ? call triggerInit()

? ? endfunction

endlibrary

jass基礎(chǔ)-農(nóng)場(chǎng)加錢漂字的評(píng)論 (共 條)

分享到微博請(qǐng)遵守國(guó)家法律
大名县| 武川县| 体育| 洛宁县| 和林格尔县| 盐边县| 南澳县| 屏东市| 疏附县| 南充市| 株洲县| 黄冈市| 湖南省| 沙洋县| 鹤壁市| 太湖县| 卢龙县| 洪洞县| 东辽县| 三门峡市| 乌拉特前旗| 定南县| 金溪县| 舞阳县| 永清县| 大关县| 宁德市| 新余市| 巴南区| 张家港市| 安吉县| 和林格尔县| 汉寿县| 保定市| 开远市| 延寿县| 五家渠市| 齐河县| 金塔县| 额尔古纳市| 龙游县|