Exemple #1
0
 public Missile(string effName, int x, int y, BasicMissileControler cont)
 {
     position  = new NLPointF(x, y);
     controler = cont;
     config    = MissileBook.GetConfig(effName);
     controler.SetConfig(config);
 }
Exemple #2
0
        private void GenerateImg()
        {
            angle = (angle + 360) % 360;
            var   imgId = config.Image + (frameOffset / config.FrameTime) % config.FrameCount;
            Image img   = null;

            if (angle > 90 && angle < 270)
            {
                img = MissileBook.GetImage(imgId, true);
            }
            else
            {
                img = MissileBook.GetImage(imgId, false);
            }

            effectImg = DrawTool.Rotate(img, angle);
        }