|
function AdjustPlayerStateBJ takes integer delta, player whichPlayer, playerstate whichPlayerState returns nothing
// If the change was positive, apply the difference to the player's
// gathered resources property as well.
if (delta > 0) then
if (whichPlayerState == PLAYER_STATE_RESOURCE_GOLD) then
call AdjustPlayerStateSimpleBJ(whichPlayer, PLAYER_STATE_GOLD_GATHERED, delta)
elseif (whichPlayerState == PLAYER_STATE_RESOURCE_LUMBER) then
call AdjustPlayerStateSimpleBJ(whichPlayer, PLAYER_STATE_LUMBER_GATHERED, delta)
endif
endif
call AdjustPlayerStateSimpleBJ(whichPlayer, whichPlayerState, delta)
endfunction
乍一看 貌似 只有call AdjustPlayerStateSimpleBJ(whichPlayer, whichPlayerState, delta)
也可以的
求解 为什么要加上面的判断 |
|