Changeset 5308 for 2014/27


Ignore:
Timestamp:
2014-07-02 21:39:26 (5 years ago)
Author:
mijoilmo
Message:

thruster animaatio

Location:
2014/27/AleksanteriV/Protokolla236TrueSurvivor
Files:
2 added
8 edited
1 copied

Legend:

Unmodified
Added
Removed
  • 2014/27/AleksanteriV/Protokolla236TrueSurvivor/Protokolla236TrueSurvivor/Protokolla236TrueSurvivor/Player.cs

    r5299 r5308  
    4444 
    4545        this.thrusterEffect = new GameObject(40, 40); 
    46         thrusterEffect.Image = parent.Images["player_thruster"]; 
     46        thrusterEffect.Animation = new Animation(parent.ImageLists["player_thruster"]); 
     47        thrusterEffect.Animation.FPS = 18; 
     48        thrusterEffect.Animation.Start(); 
    4749        thrusterEffect.IsVisible = false; 
    48         thrusterEffect.Y -= 20; 
     50        thrusterEffect.Y -= 19; 
    4951        Add(thrusterEffect); 
    5052    } 
  • 2014/27/AleksanteriV/Protokolla236TrueSurvivor/Protokolla236TrueSurvivor/Protokolla236TrueSurvivor/Protokolla236TrueSurvivor.cs

    r5299 r5308  
    1616    private Dictionary<string, Image> images = new Dictionary<string, Image>(); 
    1717    public Dictionary<string, Image> Images { get { return images; } set { images = value; } } 
     18    private Dictionary<string, Image[]> imageLists = new Dictionary<string, Image[]>(); 
     19    public Dictionary<string, Image[]> ImageLists { get { return imageLists; } set { imageLists = value; } } 
     20 
    1821 
    1922    void AssignKeys() 
     
    3134        images["background0"] = LoadImage("graphics/backgrounds/space_background"); 
    3235        images["player"] = LoadImage("graphics/ships/player"); 
    33         images["player_thruster"] = LoadImage("graphics/effects/thrusters/thruster0.1"); 
     36        imageLists["player_thruster"] = LoadImages("graphics/effects/thrusters/thruster0.1", "graphics/effects/thrusters/thruster0.2"); 
    3437        images["tile0"] = LoadImage("graphics/tiles/tile0"); 
    3538    } 
Note: See TracChangeset for help on using the changeset viewer.