source: 2014/27/AleksanteriV/Protokolla236TrueSurvivor/Protokolla236TrueSurvivor/Protokolla236TrueSurvivor/Enemy1.cs @ 5395

Revision 5339, 794 bytes checked in by mijoilmo, 5 years ago (diff)
Line 
1using System;
2using System.Collections.Generic;
3using Jypeli;
4using Jypeli.Assets;
5using Jypeli.Controls;
6using Jypeli.Effects;
7using Jypeli.Widgets;
8
9class Enemy1 : PhysicsObject
10{
11    Proto236b parent;
12    public Enemy1(Proto236b parent, double w, double h,Vector position)
13        : base(w, h)
14    {
15        this.parent = parent;
16        //ensimmäisenä parametrina on siis peli. voit tehdä enemyn tyylillä "new Enemy1(this, w, h)".
17
18        //image laitetaan esim:
19        //this.Image = parent.Images["vihu1_image"];
20        this.Position = position;
21        this.Animation = new Animation(parent.ImageLists["enemy1"]);
22        this.Animation.FPS = 10;
23        this.Animation.Start();
24        this.AngularDamping = 0.1;
25
26        parent.Add(this);
27    }
28}
Note: See TracBrowser for help on using the repository browser.