OK的
代码片段和文件信息
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
文件 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 Mathstlm_HitDetect_BoxesVSPoints.m
文件 2986 2011-05-08 01:19 Mathstlm_HitDetect_BoxVSBoxes.asv
文件 3039 2011-05-08 01:19 Mathstlm_HitDetect_BoxVSBoxes.m
文件 5015 2011-10-04 04:43 Musicaiwojiugenwozou.mid
文件 17423 2011-05-08 01:19 MusicFlowerDance.mid
文件 5320 2011-05-08 01:19 MusicMOTN11.mid
文件 4604 2011-05-08 01:19 MusicMOTN2.mid
文件 5055 2011-05-08 01:19 MusicMOTN8.mid
文件 56205 2011-05-08 01:19 OBJ_GENERIC_ANIM.mat
文件 108082 2011-05-08 01:19 Player_ANIM.mat
文件 40122 2011-05-08 01:19 Player_SFX.mat
文件 3732 2011-05-14 14:03 README.txt
文件 17794 2011-05-14 13:58 ScreenShot1.png
文件 16434 2011-08-27 01:58 Stagesstl_STAGE_Credits.m
文件 147363 2011-05-14 10:19 Stagesstl_STAGE_stage1.m
文件 5333 2011-05-14 13:43 Stagesstl_STAGE_titleScreen.m
文件 714325 2012-09-25 04:07 Stellaria Demo.mlappinstall
文件 6499 2012-09-25 04:07 Stellaria Demo.prj
文件 13894 2012-09-25 03:38 Utilmidi
eadmidi2.m
文件 19486 2011-05-08 01:20 Utilmidi
eadmidiNew.asv
文件 19489 2011-05-08 01:19 Utilmidi
eadmidiNew.m
文件 27388 2011-05-08 01:22 Utilmidisound290.wav
文件 26250 2011-05-08 01:22 Utilmidisound291.wav
文件 22380 2011-05-08 01:22 Utilmidisound292.wav
文件 19638 2011-05-08 01:22 Utilmidisound293.wav
文件 21076 2011-05-08 01:22 Utilmidisound294.wav
文件 15220 2011-05-08 01:22 Utilmidisound295.wav
............此处省略63个文件信息
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.
% 如果不是这样,那么预创建返回矩阵
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 Mathstlm_HitDetect_BoxesVSPoints.m
文件 2986 2011-05-08 01:19 Mathstlm_HitDetect_BoxVSBoxes.asv
文件 3039 2011-05-08 01:19 Mathstlm_HitDetect_BoxVSBoxes.m
文件 5015 2011-10-04 04:43 Musicaiwojiugenwozou.mid
文件 17423 2011-05-08 01:19 MusicFlowerDance.mid
文件 5320 2011-05-08 01:19 MusicMOTN11.mid
文件 4604 2011-05-08 01:19 MusicMOTN2.mid
文件 5055 2011-05-08 01:19 MusicMOTN8.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 Stagesstl_STAGE_Credits.m
文件 147363 2011-05-14 10:19 Stagesstl_STAGE_stage1.m
文件 5333 2011-05-14 13:43 Stagesstl_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 Utilmidi
eadmidi2.m
文件 19486 2011-05-08 01:20 Utilmidi
eadmidiNew.asv
文件 19489 2011-05-08 01:19 Utilmidi
eadmidiNew.m
文件 27388 2011-05-08 01:22 Utilmidisound290.wav
文件 26250 2011-05-08 01:22 Utilmidisound291.wav
文件 22380 2011-05-08 01:22 Utilmidisound292.wav
文件 19638 2011-05-08 01:22 Utilmidisound293.wav
文件 21076 2011-05-08 01:22 Utilmidisound294.wav
文件 15220 2011-05-08 01:22 Utilmidisound295.wav
............此处省略63个文件信息
版权声明:本文内容由互联网用户自发贡献,该文观点仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容, 请发送邮件举报,一经查实,本站将立刻删除。
评论列表(条)