资源简介
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.
% 如果不是这样,那么预创建返回矩阵
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个文件信息
相关资源
- matlab_OFDM调制解调(来自剑桥大学)
- Matlab路面裂缝识别69319
- 高灵敏度GPS接收机MATLAB仿真,附捕获
- 基于MATLAB的质点弹道计算与外弹道优
- 阵列天线的matlab仿真
- MATLAB 经典程序源代码大全
- MATLAB小波软阈值去噪代码33473
- 天线阵的波束形成在MATLAB仿真程序及
- 非线性SVM算法-matlab实现
- 《MATLAB 智能算法超级学习手册》-程序
- 组合导航matlab程序
- 读取txt文件内容matlab代码实现
- Matlab实现基于相关的模板匹配程序
- matlab优化工具箱讲解
- 基于MATLAB的快速傅里叶变换
- 光纤传输中的分布傅立叶算法matlab实
- 基于matlab的图像处理源程序
- matlab 椭圆拟合程序
- 算术编码解码matlab源代码
- optical_flow 光流法 matlab 实现程序
- 引导图像滤波器 Matlab实现
- 分形几何中一些经典图形的Matlab画法
- OFDM系统MATLAB仿真代码
- SVM工具箱(matlab中运行)
- 图像小波变换MatLab源代码
- LU分解的MATLAB实现
- 冈萨雷斯数字图像处理matlab版(第三
- 替代数据法的matlab程序
- 用matlab实现的多站定位系统性能仿真
- 通过不同方法进行粗糙集属性约简m
评论
共有 条评论