示例#1
0
        public GameObject(Type gameType)
        {
            ObjType = gameType;
            item    = new TextureItem((System.Drawing.Bitmap)GameCore.CoreFiles.getTexture(ObjType).Clone(), gameType);
            switch (ObjType)
            {
            case Type.Barn:
                Health     = 100;
                Population = 3;
                break;

            case Type.House:
                Health     = 200;
                Population = 5;
                break;

            case Type.Outhouse:
                Health     = 300;
                Population = 10;
                break;

            case Type.BigBarn:
                Health     = 400;
                Population = 30;
                break;

            case Type.Shop:
                Health     = 250;
                Population = 10;
                break;

            case Type.Hay:
                Health = 50;
                Feeds  = 10;
                break;

            case Type.Windmil:
                Health     = 100;
                Population = 3;
                break;

            case Type.Footman:
                Health     = 250;
                Damage     = 1;
                RequiredXP = 100;
                Population = 1;
                Moveable   = true;
                break;

            case Type.Grass:
                break;
            }
            MaxHealth    = Health;
            Health      -= 20;
            OnCollision += new ObjectCollision(GameObject_OnCollision);
        }
示例#2
0
 public GameObject(Type gameType)
 {
     ObjType = gameType;
     item = new TextureItem((System.Drawing.Bitmap)GameCore.CoreFiles.getTexture(ObjType).Clone(), gameType);
     switch (ObjType)
     {
         case Type.Barn:
             Health = 100;
             Population = 3;
             break;
         case Type.House:
             Health = 200;
             Population = 5;
             break;
         case Type.Outhouse:
             Health = 300;
             Population = 10;
             break;
         case Type.BigBarn:
             Health = 400;
             Population = 30;
             break;
         case Type.Shop:
             Health = 250;
             Population = 10;
             break;
         case Type.Hay:
             Health = 50;
             Feeds = 10;
             break;
         case Type.Windmil:
             Health = 100;
             Population = 3;
             break;
         case Type.Footman:
             Health = 250;
             Damage = 1;
             RequiredXP = 100;
             Population = 1;
             Moveable = true;
             break;
         case Type.Grass:
             break;
     }
     MaxHealth = Health;
     Health -= 20;
     OnCollision += new ObjectCollision(GameObject_OnCollision);
 }
示例#3
0
 public GameObject(ref TextureItem ti, Type gameType)
 {
     ObjType = gameType;
     item    = ti;
 }
示例#4
0
 public GameObject(ref TextureItem ti, Type gameType)
 {
     ObjType = gameType;
     item = ti;
 }