Ignore:
Timestamp:
2016-07-07 19:12:59 (3 years ago)
Author:
sieerinn
Message:

Aluksen osien keräys tehty

File:
1 edited

Legend:

Unmodified
Added
Removed
  • 2016/27/ohjaajat/VenienteFragore/VenienteFragore/VenienteFragore/LevelCreationMethods.cs

    r7981 r7983  
    186186            door.Position = position; 
    187187            door.Color = Color.Purple; 
     188            door.Image = LoadImage("portal"); 
    188189            door.OnInteractedWith += delegate (SimplePhysics.Object actor, InteractableObject actedDoor) 
    189190            { 
     
    197198            //Tämä tänne, jotta anim. tai jotain jos joskus halutaan, muuten suoraan voi vaihtaa kenttää delegattissa 
    198199            StartLevel(lvlName); 
     200        } 
     201 
     202        private void CreateShipPart(Vector position, double width, double height, Dictionary<string, string> properties) 
     203        { 
     204            string lvlName = properties["levelName"]; 
     205            var part = new InteractableObject(width, height); 
     206            part.Position = position; 
     207            collectedParts.Add(currentLevelName); 
     208            part.Image = LoadImage(collectedParts.Contains(currentLevelName)?"portal":"shippart"); 
     209            part.OnInteractedWith += delegate 
     210            { 
     211                if (!collectedParts.Contains(currentLevelName)) 
     212                    collectedParts.Add(currentLevelName); 
     213                StartLevel(lvlName); 
     214            }; 
     215            Add(part); 
    199216        } 
    200217 
Note: See TracChangeset for help on using the changeset viewer.