Exemplo n.º 1
0
 public Ball(Rectangle initLocationInfo,
     double init_Velocity_x,
     double init_Velocity_y, Model model, int t)
     : base(initLocationInfo,
     init_Velocity_x,
     init_Velocity_y,
     model)
 {
     type = t;
     switch(t)
     {
         case 3:
             image = Properties.Resources.MacBook_Pro;
             imgSrc = "Resources\\MacBook_Pro.png";
             break;
         case 2:
             locationInfo.Width = 60;
             locationInfo.Height = 60;
             image = Properties.Resources.MacBook_White;
             imgSrc = "Resources\\MacBook_White.png";
             break;
         case 1:
             locationInfo.Width = 36;
             locationInfo.Height = 36;
             image = Properties.Resources.MacBook_Air;
             imgSrc = "Resources\\MacBook_Air.png";
             break;
     }
 }
Exemplo n.º 2
0
 public Misc(Rectangle initLocationInfo, double init_Velocity_x, double init_Velocity_y, Model model, Image img, string filename)
     : base(initLocationInfo,
     init_Velocity_x,
     init_Velocity_y,
     model,
     img)
 {
     image = img;
     imgSrc = filename;
 }
Exemplo n.º 3
0
 public Misc(Rectangle initLocationInfo,
     double init_Velocity_x,
     double init_Velocity_y, Model model, Image image)
     : base(initLocationInfo,
     init_Velocity_x,
     init_Velocity_y,
     model,
     image)
 {
 }
Exemplo n.º 4
0
 public Hero(Rectangle initLocationInfo,
     double initVelocity_x,
     double init_Velocity_y,Model model)
     : base(initLocationInfo,
     initVelocity_x,
     init_Velocity_y,
     model)
 {
     image = Properties.Resources.Hero;
     imgSrc = "Resources\\Hero.png";
 }
Exemplo n.º 5
0
 public GameObject(Rectangle initLocationInfo,
     double initVelocity_x,
     double initVelocity_y,
     Model model)
     : base()
 {
     locationInfo = initLocationInfo;
     velocity_x = initVelocity_x;
     velocity_y = initVelocity_y;
     this.model = model;
 }
Exemplo n.º 6
0
 public Ball(Rectangle initLocationInfo,
     double init_Velocity_x,
     double init_Velocity_y, Model model)
     : base(initLocationInfo,
     init_Velocity_x,
     init_Velocity_y,
     model)
 {
     type = 3;
     image = Properties.Resources.MacBook_Pro;
     imgSrc = "Resources\\MacBook_Pro.png";
 }
Exemplo n.º 7
0
        public View(Model model, Controller controller)
            : base()
        {
            this.model = model;
            this.controller = controller;

            model.ModelUpdateEvent += new Model.ViewUpdater(this.update);
            this.Width = 800;
            this.Height = 500;

            g = this.CreateGraphics();
        }
Exemplo n.º 8
0
 public Bullet(Rectangle initLocationInfo,
     double init_Velocity_x,
     double init_Velocity_y, Model model)
     : base(initLocationInfo,
     init_Velocity_x,
     init_Velocity_y,
     model)
 {
     image = Properties.Resources.nano;
     imgSrc = "Resources\\nano.png";
     locationInfo.Width = 12;
     locationInfo.Height = 12;
     destroyed = false;
 }
Exemplo n.º 9
0
 public Controller(Model model)
 {
     this.model = model;
 }
Exemplo n.º 10
0
 // common interface for receiving message from model
 public abstract void update(Model model);