資源簡介
OK的

代碼片段和文件信息
function?[addedEnemyIndices?nEnemies]?=?stl_addToGlobalEnemies(enemiesToAdd)
%%?STL_ADDTOGLOBALENEMIES?-?Add?several?enemies?to?the?global?enemy
%?queue?(將數個敵人的數據添加至全局敵人隊列中)
%
%?*?Please?note?that?the?word?“enemy“?represents?all?hostile?vessels
%?*?bullets?and?even?bonus?objects.?In?a?word?an?“enemy“?is?an?object?that
%?*?interacts?with?the?player?craft?and?bullets
%?
%%?USAGE?用法:
%?------
%?[addedEnemyIndices?nEnemies]?=?stl_addToGlobalEnemies(enemiesToAdd)
%?
%%?Input?輸入參數:
%?------
%?enemiesToAdd:?Contains?the?enemy?structures?to?add?an?1?X?nEnemies?struct?
%???????????????that?contains?fields?as?can?be?found?in?stl_initVariables
%??????????????要添加的敵人數據,為1?x?nEnemies?大小的結構體數組。域的名稱請
%???????????????參見stl_initVariables:
%
%%?Output?輸出參數:
%?-------
%?addedEnemyIndices:?The?indices?of?the?enemy?added?must?be?an?1?x?nEnemies?(output)
%????????????????????cell?array
%???????????????????????在全局敵人隊列中,那些剛剛被加入的敵人的下標.?為
%???????????????????????1?x?nEnemies?(輸出值)的元胞數組
%?nEnemies:?The?actual?number?of?enemies?added?must?be?equal?or?lower?than
%???????????the?length?of?enemiesToAdd?
%???????????被實際加入的敵人的個數,必定小于或等于enemiesToAdd的長度
%?
%%?Dependencies?依賴關系:
%?-------
%?--?Global?Variables?Created:
%???????none
%?--?Global?Variables?Used:
%???????queueGlobalEnemies
%???????availGlobalEnemies
%???????numAvailGlobalEnemies
%?--?Global?Variables?Modifed:
%???????queueGlobalEnemies
%???????availGlobalEnemies
%???????numAvailGlobalEnemies
%?--?Functions?Used:
%???????stl_addToGlobalImage
%
%%?Created?by?Mingjing?Zhang?Stellari?Studio?2011.
%%?Update?History
%
%??Date?????????????????????Updater?????????????????Modifications?Made
%?--------------????????????-----------------???????--------------------
%??Mar?15?2011?????????????M.?Zhang????????????????wrote?it
%?--------------????????????-----------------???????--------------------
%%?--------------------Code?Starts?Here?-------------------------
%%?Declare?the?Global?Variables?定義全局變量
global?queueGlobalEnemies???%?The?Global?Enemy?Queue
global?availGlobalEnemies???%?The?indices?of?unused?enemy?queue?elements
global?numAvailGlobalEnemies????%?The?number?of?unused?enemie?queue?elements
global?usedGlobalEnemies
%%?Exception?Processing?例外處理
%?If?the?number?of?available?enemies?is?smaller?than?the?number?of?enemies?to
%?add?then?add?only?the?number?of?available?enemies.
%?如果在全局隊列中,可使用的enemy隊列數目小于需要添加的敵人數目。那么,就只把全局隊列
%?填滿為止,多余的敵人將不被顯示。
nEnemies?=?min(numel(enemiesToAdd)?numAvailGlobalEnemies);
%?If?no?enemy?is?added?at?all?then?return?immediately?with?empty?return
%?values.
%?如果根本沒有敵人被添加,那么返回空矩陣
%?If?not?create?the?return?value?with?the?given?size.
%?如果不是這樣,那么預創(chuàng)建返回矩陣
if?nEnemies?<=?0
????addedEnemyIndices?=?[];
????return;
else
????addedEnemyIndices?=?zeros(1?nEnemies);
end
%%?Main?Code
%?Assign?image?handles?to?the?newly?added?enemies
%?分配圖形對象
[addedImageIndices?addedImageHandle?nImages]?=?stl_addToGlobalImageHandles(nEn
?屬性????????????大小?????日期????時間???名稱
-----------?---------??----------?-----??----
?????文件???????74247??2011-05-08?01:19??ENEMY_ANIM.mat
?????文件????????4093??2011-05-09?02:24??ENEMY_BULLET_ANIM.mat
?????文件????????2252??2011-05-08?01:19??ENEMY_BULLET_ANIM2.mat
?????文件??????134362??2011-05-08?01:19??EXPLO_ANIM.mat
?????文件????????2765??2011-05-08?01:19??Math\stlm_HitDetect_BoxesVSPoints.m
?????文件????????2986??2011-05-08?01:19??Math\stlm_HitDetect_BoxVSBoxes.asv
?????文件????????3039??2011-05-08?01:19??Math\stlm_HitDetect_BoxVSBoxes.m
?????文件????????5015??2011-10-04?04:43??Music\aiwojiugenwozou.mid
?????文件???????17423??2011-05-08?01:19??Music\FlowerDance.mid
?????文件????????5320??2011-05-08?01:19??Music\MOTN11.mid
?????文件????????4604??2011-05-08?01:19??Music\MOTN2.mid
?????文件????????5055??2011-05-08?01:19??Music\MOTN8.mid
?????文件???????56205??2011-05-08?01:19??OBJ_GENERIC_ANIM.mat
?????文件??????108082??2011-05-08?01:19??Pla
?????文件???????40122??2011-05-08?01:19??Pla
?????文件????????3732??2011-05-14?14:03??README.txt
?????文件???????17794??2011-05-14?13:58??ScreenShot1.png
?????文件???????16434??2011-08-27?01:58??Stages\stl_STAGE_Credits.m
?????文件??????147363??2011-05-14?10:19??Stages\stl_STAGE_stage1.m
?????文件????????5333??2011-05-14?13:43??Stages\stl_STAGE_ti
?????文件??????714325??2012-09-25?04:07??Stellaria?Demo.mlappinstall
?????文件????????6499??2012-09-25?04:07??Stellaria?Demo.prj
?????文件???????13894??2012-09-25?03:38??Util\midi\readmidi2.m
?????文件???????19486??2011-05-08?01:20??Util\midi\readmidiNew.asv
?????文件???????19489??2011-05-08?01:19??Util\midi\readmidiNew.m
?????文件???????27388??2011-05-08?01:22??Util\midi\sound\290.wav
?????文件???????26250??2011-05-08?01:22??Util\midi\sound\291.wav
?????文件???????22380??2011-05-08?01:22??Util\midi\sound\292.wav
?????文件???????19638??2011-05-08?01:22??Util\midi\sound\293.wav
?????文件???????21076??2011-05-08?01:22??Util\midi\sound\294.wav
?????文件???????15220??2011-05-08?01:22??Util\midi\sound\295.wav
............此處省略63個文件信息
評論
共有 條評論