Stellaria (Tech Demo) - The best MATLAB shooting game ever
14 May 2011
(Updated 25 Sep 2012)
If you think you have played the best MATLAB game before. Think again after you try this one.
function stageTableOver = stl_enterEnemies
% STL_ENTERENEMIES - add enemies to this global object queues as described
% in the stage script file.
% stageTableOver = stl_enterEnemies
% stageTableOver - if there are no more objects to be added to the global
% If the TimeTable is empty,
% it means there are no more enemies to be added
stageTableOver = true;
stageTableOver = false;
% If it is time one or several enemies should be added to the stage
% ***** Please note that if there are several objects to be added at the same time
% ***** They must be of the same TYPE.
% ***** If not, all objects but the first would be added to the wrong queue.
if CurrentFrameNo == thisStageTimeTable(1)
enterEnemiesLogicalIndex = (thisStageTimeTable == CurrentFrameNo);
enemiesToAdd = thisStageActors(enterEnemiesLogicalIndex);
if enemiesToAdd(1).Type == TYPE_ENEMY_CRAFT
[addedEnemyIndices, nEnemies] = stl_addToGlobalEnemies(enemiesToAdd);
[addedEnemyIndices, nEnemies] = stl_addToGlobalNeutralObjects(enemiesToAdd);
% Delete the enemies from the waiting list
thisStageTimeTable(enterEnemiesLogicalIndex) = ;
thisStageActors(enterEnemiesLogicalIndex) = ;