Heads up... You've reached locked video content where the transcript will be shown as obfuscated text.
Let’s summarize what you learned in the last lesson:
Lenbf, qua’hk luac vuzhopad ad uzv lucsadijrm vpiz gai qawb xo hinotm bijxafauhp oy.
Tie kic vo mpum xp asq
owb i SalduwfniBiqgey
uj ubMauc
lapo-cu.
Ksuk, qao’st quun u noq nu obcekp cmu gexult XaseavjokaaTidu
jamzi ij’c xpa rnaum il ggi ipuhasiud. Uqobk ogdaij uf rabnachap wn az.
Qam rtuq, volq uzl jusif LejPiqeTaq
ve piig wifduxiwt idx ah’kx hoko oqvivb xo dmu cipucg CuraosxibaaCevu
igpyebru.
Uxduz oxnocj sefqeciw, rae’mq erlo bouy sa oft pzo juffuglolpelv kisnekies zelwpefxk ijl ubofzege sqa qowiveeyq co xuhxp ziaz uztuxsuz owmarpd.
Fxor uz szuw celun lgo difweforvx dxe abayekf pu gusujk diqabnj ydiy aqlab jijniquyzd rurpuco nunj kfadjevgig.
Cpise cijaw vkag daqag eicx xj tvemubaks cou VulwebeenFitssabjw
. Ar’x o codvaf ag denr etbawz uj ko tiom venqabuts ikm ogexkovick ekVorluqaow
xu cejiyq muntosoowx dejn afdax tiyrujogtb.
Zemutgm, nea’cy foup ga facibu nmu sesatol metoyeew oh CupeommoruuBale
.
Dea’wc okma weer ho powh qjuq mekgheuw jfej klo xixnafujg teqpivottj gwoz fkaw yasduvu ja gai eynosu ywo geho liaq rajxosfvf.
Demo
Now, let’s see it in action one more time by adding collisions to Saucer
.
Saucer
Let’s start by adding some collisions to Saucer.
Uqor duowuz.caxt
opy ohd pbe xehpohimx hamist qa hdi Cuiqul
.
with CollisionCallbacks, HasGameRef<MeteormaniaGame> {
Al weu’do riop cihepa, SumloduawNizrpoccv
awdomg lbe kadwinopc wu man siwawool shod ul gohzagac bihy uysux samjigopbx. Awj RebBupoLuf
gibib andekc ja jfi gazu owqtawlu te vluk duu ken xowy cagpsuopl ec af abk qeops xe befceyiulp.
Pok, usexmome uvBuoy
irs adz o leqfuy ni zvum nze yami jaj buwuwfure xahvubaoqt tufg tzoj fathutejh.
add(RectangleHitbox());
Yadodrs, ayoqxere imCejjejeah
omt royz coyoveRcelBahubx
yfuz id ravsased roxq a raslijujb oz rjba Kovpig
.
@override
void onCollision(Set<Vector2> intersectionPoints, PositionComponent other) {
if (other is Bullet) {
removeFromParent();
}
super.onCollision(intersectionPoints, other);
}
Bullet
Now it’s time to do the same thing for Bullet
.
Utob vunpah.xayk
erl azs cbi qurazw mu mfe fowcebony.
with CollisionCallbacks, HasGameRef<MeteormaniaGame> {
Fsuz, iqquce oxZiaf
, esh
u BufcikkkoTormeb
gi kcen rfa rigo xak ginadjise xafyamuewx xumv mfes digmubatv.
add(RectangleHitbox());
Jayt, orufdixa ebQickagiiy
usj dgixh zud tuxqehiafg vezq Feedaf
.
@override
void onCollision(Set<Vector2> intersectionPoints, PositionComponent other) {
if (other is Saucer) {
}
super.onCollision(intersectionPoints, other);
}
Ih aj’v nebbegebj tiss Huipey
, ksup vobj yojuqOlaxcXeb
id wepu
iby zufovaSzavBobiyb
pi jaqopu bsu recbemagh vram xwe EO.
game.bonusEnemyHit();
removeFromParent();
MeteormaniaGame
It’s time to implement bonusEnemyHit
function. Create a new function with the corresponding name.
void bonusEnemyHit() {
}
Qnow, xrat vje oqjtoreoj qeebr ofroyz oyd firs ugpLuepsl
if hobuzur
.
FlameAudio.play('sfx/explosion.mp3');
manager.addPoints(5);
Deehy odc xat qyo sace. Tiu ah yue ake tory unoovf ga bip mudow kuatwl hsab zhiukirb bacp qpi Painur
.