Код: Выделить всё
private function mob_obzor(ev:Event):void { if (main_player.bg.hitTestObject(shere_vis)) { for (i = 0; i < main_bgplatform.mass.length; i++) { main_bgplatform.mass[i].rotation = Math.atan2(main_bgplatform.mass[i].y - main_bgplatform.igrok.y,main_bgplatform.mass[i].x - main_bgplatform.igrok.x) * 180 / Math.PI - 90 rotation_mob = false; } } else { rotation_mob = true; }
Код: Выделить всё
public function addmobs(obj:Object, x:uint, y:uint):void { switch (obj.id) { case 0: mob = new CreateMob(this,igrok); mob.x = x; mob.y = y - 1500; paint_high.addChild(mob); mass.push(mob); break; //Прямая верхняя стена }