private void StartPoint() { if (_startAction != null) { _startAction(); _startAction = null; } }
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); }
protected void AddCustomEvt(DEL_Void evt) { _customUpdateEvt += evt; }
private void CreateStartAction() { _startAction += () => { _body.LinearVelocity = MathExt.DirectionFacing(MathExt.Random(-3.14f, 3.14f)) * MathExt.Random(5, 15); }; }