Ignore:
Timestamp:
2015-07-01 21:28:15 (6 years ago)
Author:
empaheik
Message:

Hoboluolasta puuttuu vielä miekka + hobo (eli tärkeimmät, lel). Lisätarinaa.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • 2015/27/ohjaajat/TheLegendOfGabriel/TheLegendOfGabriel/TheLegendOfGabriel/TheLegendOfGabriel.cs

    r6706 r6707  
    7474 
    7575    private const int STORYITEM_COUNT = 3; 
    76     StoryItem[] storyItem = new StoryItem[3]; 
     76    List<StoryItem> storyItems = new List<StoryItem>(); 
    7777 
    7878    public IntMeter BossHealth; 
     
    9393    public static Image BulletImage = LoadImage("bullet"); 
    9494    public static Image LetterImage = LoadImage("letter"); 
     95    public static Image FoodImage = LoadImage("food"); 
    9596    public static Image SmallSwordImage = LoadImage("smallsword"); 
    9697    public static Image MonocleImage = LoadImage("monocle"); 
     
    246247            GameObject inner = new GameObject(TILE_SIZE, TILE_SIZE); 
    247248            inner.Color = Color.Black; 
    248             if (storyItem[i] != null) 
     249            if (storyItems.Count > i &&  storyItems[i] != null) 
    249250            { 
    250                 inner.Image = storyItem[i].InventoryImage; 
    251                 Mouse.ListenOn(inner, MouseButton.Left, ButtonState.Pressed, ShowTextItem, "View those precious memories", storyItem[i]); 
     251                inner.Image = storyItems[i].InventoryImage; 
     252                Mouse.ListenOn(inner, MouseButton.Left, ButtonState.Pressed, ShowTextItem, "View those precious memories", storyItems[i]); 
    252253            } 
    253254            member.Add(inner); 
     
    283284    void Intro() 
    284285    { 
    285         storyItem[0] = new StoryItem(new Queue<string>(new[] { "Dear Alexander,",  
    286             "", 
    287             "", 
    288             "I have accepted a position at the Communal Assets for Justice.", 
    289             "Please do not consider this an act of rejection. I am simply", 
    290             "a victim to the scathing uncertainty of your release from service.", 
    291             "", 
    292             "I still see your face in my dreams. I believe that when", 
    293             "our immediate circumstances change, we'll meet again, we'll", 
    294             "work it out. Were you here, we'd certainly fall in love.", 
    295             "", 
    296             "And perhaps then nothing could keep us apart.", 
    297             "-Ana"  
    298         }), LetterImage); 
     286        storyItems.Add(new StoryItem(new Queue<string>(new[] { "Oi, Alex", 
     287        "", 
     288        "Coyotes on a train.", 
     289        "Coyotes on a train, that's all I'm sayin'", 
     290        "-Ana" 
     291        }), LetterImage)); 
    299292 
    300293        //ShowTextItem(storyItem[0]); 
     
    306299        messagesviewed = new Queue<string>(item.Message); 
    307300         
    308  
    309301        Level.AmbientLight -= 0.75; 
    310302 
    311         frame = new GameObject(item.InventoryImage); 
    312         frame.Width = Window.Width * 0.25; 
    313         frame.Height = Window.Height * 0.25; 
    314         frame.Position = player.Position; 
     303        frame = new GameObject(item.InventoryImage) { Width = Window.Width * 0.25, Height = Window.Height * 0.25, Position = player.Position }; 
    315304        Add(frame, 2); 
    316305 
     
    332321        ClearAll(); 
    333322        CreatePlayer(new Vector(0, -300), TILE_SIZE, TILE_SIZE, Angle.Zero, Shape.Rectangle, "", null); 
    334         CreateLevel("bossroom"); 
     323        CreateLevel("level1"); 
    335324        //CreatePlayer(new Vector(-Level.Width/3, Level.Bottom + TILE_SIZE * 2)); 
    336325        SetControls(); 
     
    408397            } 
    409398        }); 
     399 
     400        AddCollisionHandler(player, "storyTime", StoryTime); 
     401    } 
     402 
     403 
     404    void StoryTime(PhysicsObject player, PhysicsObject storyBlock) 
     405    { 
     406        storyItems.Add(new StoryItem(new Queue<string>(new[] { "Oi, boy!", 
     407            "There something wrong with your head?", 
     408            "It's dangerous out there - you did see the coyotes, right?", 
     409            "", 
     410            "Just... take this.", 
     411            "You've used a sword before, right?", 
     412            "", 
     413            "-Hobo in a cave" 
     414        }), FoodImage)); 
     415 
     416        ShowTextItem(storyItems[1]); 
     417        BuildRightBar(); 
    410418    } 
    411419 
Note: See TracChangeset for help on using the changeset viewer.