public void DrawSprite(int layer, string texture, string mask, int x, int y, int z, int originx, int originy, int angle, int style, float alpha, int priority, float wait, bool isblocking) { gameSystem.RegisterAction(delegate { Layer layer2 = GetLayer(layer); if (layer2.IsInUse) { layer2.ReleaseTextures(); } UpdateLayerMask(layer2, priority); Vector2?origin = null; if (originx != 0 || originy != 0) { origin = new Vector2((float)originx, (float)originy); } layer2.DrawLayer(texture, x, y, z, origin, 1f - alpha, /*isBustshot:*/ false, 0, wait, isblocking); layer2.SetAngle((float)angle, 0f); layer2.SetPriority(priority); if (style == 1) { layer2.SwitchToAlphaShader(); } gameSystem.ExecuteActions(); }); }
public void DrawSprite(int layer, string texture, string mask, int x, int y, int z, int originx, int originy, int angle, int style, float alpha, int priority, float wait, bool isblocking) { Layer layer2 = GetLayer(layer); UpdateLayerMask(layer2, priority); Vector2?origin = null; if (originx != 0 || originy != 0) { origin = new Vector2((float)originx, (float)originy); } layer2.DrawLayer(texture, x, y, z, origin, 1f - alpha, /*isBustshot:*/ false, 0, wait, isblocking); layer2.SetAngle((float)angle, 0f); layer2.SetPriority(priority); if (style == 1) { layer2.SwitchToAlphaShader(); } }