示例#1
0
        //----------------------------------------------------------------------
        public void EmitterUpdate(bool alive)
        {
            if (!IsActive || _updatePush)
            {
                return;
            }
#if DEBUG
            if (InputExt.OnePressed(Keys.R) && InputExt.Pressed(Keys.LeftShift) || _StartSizeChange)
            {
                SizeChange(GraphicsExt.GetDeviceWidth, GraphicsExt.GetDeviceHeight, ((float)GraphicsExt.GetDeviceWidth) / 1920f);
                _StartSizeChange = false;
            }
#endif

            IsAllAlive = alive;
            if (alive)
            {
                AliveUpdate();
                for (int i = 0; i < _Child.Count; i++)
                {
                    _Child[i].EmitterUpdate(alive);
                }
            }
            else
            {
                IdleUpdate();
            }
        }
示例#2
0
        public override void UpdateIntput(UnitBase unit, MovementBase Movement)
        {
            Movement.SetMovementVector(InputExt.KeyBoardAnalrog);

            if (InputExt.OnePressed(Keys.Space))
            {
                if (unit.Status.Attackevt != null)
                {
                    unit.Status.Attackevt(unit);
                }
            }
        }
示例#3
0
 public void KeyPressDebugView()
 {
     if (InputExt.OnePressed(Keys.F1))
     {
         EnableOrDisableFlag(DebugViewFlags.Shape);
     }
     if (InputExt.OnePressed(Keys.F2))
     {
         EnableOrDisableFlag(DebugViewFlags.DebugPanel);
         EnableOrDisableFlag(DebugViewFlags.PerformanceGraph);
     }
     if (InputExt.OnePressed(Keys.F3))
     {
         EnableOrDisableFlag(DebugViewFlags.Joint);
     }
     if (InputExt.OnePressed(Keys.F5))
     {
         EnableOrDisableFlag(DebugViewFlags.ContactPoints);
         EnableOrDisableFlag(DebugViewFlags.ContactNormals);
     }
     if (InputExt.OnePressed(Keys.F5))
     {
         EnableOrDisableFlag(DebugViewFlags.PolygonPoints);
     }
     if (InputExt.OnePressed(Keys.F6))
     {
         EnableOrDisableFlag(DebugViewFlags.Controllers);
     }
     if (InputExt.OnePressed(Keys.F7))
     {
         EnableOrDisableFlag(DebugViewFlags.CenterOfMass);
     }
     if (InputExt.OnePressed(Keys.F8))
     {
         EnableOrDisableFlag(DebugViewFlags.AABB);
     }
 }
示例#4
0
 public static bool SelectUiSprite(SimpleCamera camera, Sprite sprite)
 {
     return(InputExt.OnePressed(MouseButtons.Left) && sprite.Bounds.Contains(camera.ScreenToWorldMouse()));
 }