source: 2013/30/DenisZ/CastleMaster/CastleMaster/CastleMaster/Units/UnitKing.cs @ 4635

Revision 4635, 1.2 KB checked in by dezhidki, 6 years ago (diff)

Talletus.

Line 
1using System;
2using System.Collections.Generic;
3using System.Linq;
4using System.Text;
5using CastleMaster.World;
6using CastleMaster.Players;
7using CastleMaster.Graphics;
8
9namespace CastleMaster.Units
10{
11    public class UnitKing : Unit
12    {
13        public UnitKing(Level level, Player owner)
14            : base(level, owner)
15        {
16            width = 5 * Viewport.TILESIZE;
17            depth = 5 * Viewport.TILESIZE;
18            HasHealth = true;
19            maxHealth = 150;
20
21            isSolid = true;
22
23            renderOffset.X = 64;
24            renderOffset.Y = 80;
25
26            spriteSize.X = 160;
27            spriteSize.Y = 128;
28            screenRectOffset.Update(0, 0, spriteSize.X, spriteSize.Y);
29
30            highlightOffset.X = spriteSize.X / 2 - 4;
31
32            rectOffset.Update(-2 * Viewport.TILESIZE, -2 * Viewport.TILESIZE, 2 * Viewport.TILESIZE, 2 * Viewport.TILESIZE);
33            immunityTime = 20;
34        }
35
36        public override void Render(RenderHelper renderer)
37        {
38            renderer.Render(ScreenPos, 0, 0, Resources.SPRITE_KING, colorizer, Viewport.ZOOM);
39            base.Render(renderer);
40        }
41    }
42}
Note: See TracBrowser for help on using the repository browser.