Changeset 6276 for 2014/30


Ignore:
Timestamp:
2015-06-24 15:34:04 (8 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

    r6272 r6276  
    1515    /// Vakiot kannattaa merkitä constiksi (ei voi muuttaa). Tällöin ne kirjoitetaan isolla. 
    1616    /// </summary> 
    17     const double NOPEUS = 500; // 250 
     17    const double NOPEUS = 1000; // 250 
    1818    const double HYPPYVOIMA = 1500; 
    1919 
     
    2424    PlatformCharacter taistelija; 
    2525 
    26     int kenttaNro = 2; 
     26    int kenttaNro = 1; 
    2727 
    2828    /// <summary> 
     
    5959    { 
    6060        SmoothTextures = false; 
    61         // IsFullScreen = true; 
     61        IsFullScreen = true; 
    6262        Gravity = new Vector(0, -2500); 
    6363 
     
    213213            cCaseDialog.Destroy(); 
    214214 
    215             GameObject cCaseFront = new GameObject(200.0, 200.0); 
    216             cCaseFront.Color = new Color(0, 64, 0, 32); 
     215            GameObject cCaseFront = new GameObject(LoadImage("caseavausruutu")); 
    217216 
    218217            ChromaCase cCase = new ChromaCase(pItems, cCaseFront, null, 20); 
    219             cCase.Add(Vector.Zero, 2); 
     218            cCase.Add(new Vector(0.0, Level.Bottom + cCaseFront.Height / 2), 2); 
    220219            cCase.ItemReceived += GotItemFromCase; 
     220            //cCase.ItemRelativePosition = new Vector(47 
    221221            cCase.Start(); 
    222222 
  • 2014/30/MitjaK/Attack to Agora/Attack to Agora/Attack to Agora/Attack to Agora/ChromaCase.cs

    r6272 r6276  
    1818 
    1919    public Vector Position = Vector.Zero; 
     20    public Vector ItemRelativePosition; 
    2021 
    2122    public const double START_SPEED = 0.02; 
     
    7374        // n == shownItems.Count 
    7475        // z == stopSpeed 
    75         // solve x y*x^n=z => x = (z / y) ^ (1 / n) 
     76        //  y*x^n=z x:n suhteen =>      x = (z / y) ^ (1 / n) 
    7677        double speedIncrease = Math.Pow((STOP_SPEED / START_SPEED), (1.0 / ShownItems.Count)); 
    7778 
     
    166167            if (rNumber >= limits[i] && rNumber < limits[i + 1]) 
    167168            { 
     169                PossibleItems[i].Position = ItemRelativePosition; 
    168170                ShownItems.Add(PossibleItems[i]); 
    169171            } 
Note: See TracChangeset for help on using the changeset viewer.