/// <summary> /// 描画処理 /// </summary> /// <param name="cdjdata"></param> private static void DoDraw(CdjData cdjdata, InputState inputstate) { //4拍子の線 DrawBeatline.Draw(); //判定ラインの下側の絵 DrawLowFrame.Draw(); //MyDraw.SetDrawBlendMode(DX.DX_BLENDMODE_ALPHA, 228); //フェーダーの描画(あとで) drawfader.draw(inputstate); //キューイングのディスクとか再生ラインとかカットイン矢印とかを描く foreach (DiscQueCutData o in cdjdata.lstquedata) { o.Draw(); } //スクラッチユニット(シャカシャカで1つ)を1個ずつ描く foreach (ScratchUnit scunit in cdjdata.lstscratchunit) { scunit.Draw(); } DrawEffect.Draw(); // 裏画面の内容を表画面に反映する DX.ScreenFlip(); }
public override void Discard(CardPlayer player) { base.Discard(player); if (DrawEffect != null) { DrawEffect.Activate(player); } }
/// <summary> /// /// </summary> /// <param name="que"></param> public void Queing(double que) { if (quecount > 0) { if (que < 0) { quecount += que; if (quecount < 0) { quecount = 0; DrawEffect.AddRecord(lr); } } } }
public StatusData() { Name = new LocalText(); Desc = new LocalText(); Comment = ""; Emoticon = -1; DropEmoticon = -1; FreeEmote = -1; DrawEffect = DrawEffect.None; StatusStates = new StateCollection <StatusState>(); OnSkillChanges = new PriorityList <SkillChangeEvent>(); TargetPassive = new PassiveData(); }
protected override async Task LoadContent() { await base.LoadContent(); spriteBatch = new SpriteBatch(GraphicsDevice); inputTexture = Asset.Load <Texture>("uv"); var groupCounts = new Int3(inputTexture.Width / ReductionRatio, inputTexture.Height / ReductionRatio, 1); outputTexture = Texture.New2D(GraphicsDevice, groupCounts.X, groupCounts.Y, 1, PixelFormat.R8G8B8A8_UNorm, TextureFlags.UnorderedAccess | TextureFlags.ShaderResource); displayedTexture = outputTexture; drawEffectContext = RenderContext.GetShared(Services); computeShaderEffect = new ComputeEffectShader(drawEffectContext) { ShaderSourceName = "ComputeShaderTestEffect", ThreadGroupCounts = groupCounts }; }
public Sprite(ImageName imageName, Point frameSize, Point sheetSize, Point framePosition, Vector2 position, Vector2 spriteOrigin, int hitRadius, float speed, int picturePerFrame) { this.textureImage = ImageHelper.getImage(imageName); this.frameSize = frameSize; this.sheetSize = sheetSize; this.framePosition = framePosition; this.position = position; this.spriteOrigin = spriteOrigin; this.hitRadius = hitRadius; this.speed = speed; this.currentFrame = new Point(0, 0); this.animeFrameNumber = 3;//默认移动中以前三张为过渡图片,从第4张开始循环 this.picturePerFrame = picturePerFrame; this.spriteFrameNumber = 0; this.life = maxFrameNumber;//默认生命为无限 this.drawEffect = DrawEffect.CONST; this.disappear = false; }
/// <summary> /// カットイン /// </summary> /// <param name="cutstate"></param> public void Cutin(EnumFaderState cutstate) { if (this.ActiveState == EnumActiveState.NEXT) { if (quecount <= 0) { if (judge == EnumJudge.NOTYET) { if ((lr == CdjData.Left && cutstate == EnumFaderState.LEFT) || (lr == CdjData.Right && cutstate == EnumFaderState.RIGHT)) { if (Math.Abs(now.judgementlinestep - startstep) < 5) { judge = EnumJudge.PERFECT;//ここにタイミングで判定分岐を入れる(BADもあり得る) } else if (Math.Abs(now.judgementlinestep - startstep) < 7) { judge = EnumJudge.GREAT;//ここにタイミングで判定分岐を入れる(BADもあり得る) } else if (Math.Abs(now.judgementlinestep - startstep) < 10) { judge = EnumJudge.GOOD;//ここにタイミングで判定分岐を入れる(BADもあり得る) } else if (Math.Abs(now.judgementlinestep - startstep) > 96) { judge = EnumJudge.BAD; } Random random = new Random(); DrawEffect.AddJudge(judge, lr, 1); for (int i = 0; i < 20; i++) { DrawEffect.AddParticle(now.millis + i * 10, (int)(datacalc.realtimelinex(lr) + 20 + random.NextDouble() * 10), (int)(datacalc.JudgeLineY), random.NextDouble() * 20 + 10, -random.NextDouble() * Math.PI * 1); } } } } } }