Changeset 6434


Ignore:
Timestamp:
2015-06-26 09:48:53 (4 years ago)
Author:
anlakane
Message:
 
Location:
2014/30/MitjaK/Attack to Agora/Attack to Agora/Attack to Agora/Attack to Agora
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • 2014/30/MitjaK/Attack to Agora/Attack to Agora/Attack to Agora/Attack to Agora/Attack_to_Agora.cs

    r6432 r6434  
    2020    double prevVelocityX = 0.0; 
    2121    const double STOP_LIMIT_X = 1; 
     22    bool controlsActive = true; 
    2223 
    2324    Image level1 = LoadImage("kentta1"); 
     
    277278    void Liikuta(PhysicsObject pelaaja, double suunta) 
    278279    { 
     280        if (!controlsActive) return; 
     281 
    279282        pelaaja.Velocity = new Vector(suunta, pelaaja.Velocity.Y); 
    280283 
     
    285288    void LiikutaYlos(PhysicsObject pelaaja) 
    286289    { 
    287         
     290        if (!controlsActive) return; 
    288291 
    289292        pelaaja.Hit(new Vector(0, HYPPYVOIMA * pelaaja.Mass)); 
     
    464467        TriggerAction = null; 
    465468        tActionTriggered = false; 
     469        controlsActive = true; 
    466470 
    467471        kenttaNro++; 
     
    608612    void Ammu() 
    609613    { 
     614        if (!controlsActive) return; 
     615 
    610616        if (taistelijanAse == null)  
    611617            return; 
     
    629635        AddCollisionHandler(ammus, "jouni", AmmusOsuuViholliseen); 
    630636 
    631         AddCollisionHandler<PhysicsObject, PhysicsObject>(ammus, delegate(PhysicsObject a, PhysicsObject k) { ammus.Destroy(); }); 
     637        AddCollisionHandler<PhysicsObject, PhysicsObject>(ammus, delegate(PhysicsObject a, PhysicsObject k) { 
     638 
     639            if (k.Tag.ToString() == "trigger") return; 
     640            ammus.Destroy(); 
     641        }); 
    632642    } 
    633643 
  • 2014/30/MitjaK/Attack to Agora/Attack to Agora/Attack to Agora/Attack to Agora/Attack_to_Agora_mitja.cs

    r6433 r6434  
    105105    void LuoJouniBoss(Vector luomisPaikka, double pysahtymisX) 
    106106    { 
     107        controlsActive = false; 
     108 
    107109        Elava jouni = new Elava(jouniBoss, 5.0); // 10000 
    108110        jouni.Kuoli += JouniDefeated; 
     
    139141    void ActivateJouni(Elava jouni) 
    140142    { 
     143        controlsActive = true; 
     144 
    141145        jouni.Animation = jounibossArrive; 
    142146        jouni.Animation.Start(1); 
     
    148152 
    149153        AssaultRifle jouninAse = new AssaultRifle(20, 10); 
    150         jouninAse.IsVisible = true; 
     154        jouninAse.IsVisible = false; 
    151155        jouninAse.InfiniteAmmo = true; 
    152156        jouninAse.Power.Value = 200.0; 
     
    154158        jouninAse.Tag = "jouninase"; 
    155159        Add(jouninAse); 
    156         jouninAse.Position = jouni.Position + new Vector(jouni.Width / 4, -25); 
     160        jouninAse.Position = jouni.Position + new Vector(jouni.Width / 3, -25); 
    157161        currentBossWeapon = jouninAse; 
    158162 
    159163        Timer ampumisAjastin = new Timer(); 
    160         ampumisAjastin.Interval = 0.5; 
     164        ampumisAjastin.Interval = 0.75; 
    161165        ampumisAjastin.Timeout += delegate 
    162166        { 
Note: See TracChangeset for help on using the changeset viewer.