Line | |
---|
1 | using System; |
---|
2 | using System.Collections.Generic; |
---|
3 | using Jypeli; |
---|
4 | using Jypeli.Assets; |
---|
5 | using Jypeli.Controls; |
---|
6 | using Jypeli.Effects; |
---|
7 | using Jypeli.Widgets; |
---|
8 | |
---|
9 | class 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.