Beispiel #1
0
 private void StartPoint()
 {
     if (_startAction != null)
     {
         _startAction();
         _startAction = null;
     }
 }
Beispiel #2
0
        public void AddAnimation(string key, string path, int frameX, int frameY, int totalFrameCount, float frameSpeed, DEL_Void evt, int startX = 0, int startY = 0, int originX = 16, int originY = 29)
        {
            var ani = new SkinAnimation(path, frameX, frameY, totalFrameCount, frameSpeed, startX, startY)
            {
                Scale = 1, Origin = new Vector2(originX, originY)
            };

            ani.EndFrame += evt;
            _animation.Add(key, ani);
        }
Beispiel #3
0
 protected void AddCustomEvt(DEL_Void evt)
 {
     _customUpdateEvt += evt;
 }
Beispiel #4
0
 private void CreateStartAction()
 {
     _startAction += () => { _body.LinearVelocity = MathExt.DirectionFacing(MathExt.Random(-3.14f, 3.14f)) * MathExt.Random(5, 15); };
 }