Ejemplo n.º 1
0
        protected new void Redraw_PreRenderd()
        {
            _preRenderdSurface.BeginChanges();
            _preRenderdSurface.Fill(_backgroundColor);

            _gorgonText.Text  = _visibleText;
            _gorgonText.Color = Color.Black;

            _gorgonText.Draw();


            if (_showMarker && HasFocus)
            {
                SlimMath.Vector2 drawPos = new SlimMath.Vector2();
                drawPos.X            = _markerPosition;
                _gorgonText.Position = drawPos;
                _gorgonText.Color    = Color.Black;
                _gorgonText.Text     = "|";
                _gorgonText.Draw();
            }



            _preRenderdSurface.EndChanges();

            /*
             * Point[] linePoints = new Point[5];
             * linePoints[0] = new Point(0, 0);
             * linePoints[1] = new Point(0, Height - 2);
             * linePoints[2] = new Point(Width - 2, Height - 2);
             * linePoints[3] = new Point(Width - 2, 0);
             * linePoints[4] = new Point(0, 0);
             *
             * _preRenderdSurface.Draw(new Polygon(new ArrayList(linePoints)), Color.Gray);
             *
             * linePoints[0] = new Point(1, 1);
             * linePoints[1] = new Point(1, Height - 1);
             * linePoints[2] = new Point(Width - 1, Height - 1);
             * linePoints[3] = new Point(Width - 1, 1);
             * linePoints[4] = new Point(1, 1);
             *
             * _preRenderdSurface.Draw(new Polygon(new ArrayList(linePoints)), Color.Black);
             */
        }
Ejemplo n.º 2
0
 public static UnityEngine.Vector2 Convert(SlimMath.Vector2 v)
 {
     return(new UnityEngine.Vector2(v.X, v.Y));
 }
Ejemplo n.º 3
0
 //Не работает с текущими командами PrepareForBattle и LoadStage. Будет перенесено в логику?
 private static bool KnockBackEnemies()
 {
     var enemies = EntityWorld.GroupManager.GetEntities ("EnemyTeam");
     if (enemies.Count == 0)
         return false;
     foreach (var enemy in enemies)
     {
         var enemyPos = enemy.GetComponent<Position>().position;
         enemyPos = new SlimMath.Vector2(0.0f, 0.0f);
         enemy.Refresh();
     }
     return true;
 }