示例#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;
     }
 }
示例#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;
 }
示例#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)
 {
 }
示例#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";
 }
示例#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;
 }
示例#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";
 }
示例#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();
        }
示例#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;
 }
示例#9
0
 public Controller(Model model)
 {
     this.model = model;
 }
示例#10
0
 // common interface for receiving message from model
 public abstract void update(Model model);