public override SKSurface Draw(GameState currentState, long frame) { Clear(); GameState = currentState; if (Enabled) { Character character = null; if (CurrentTarget > 4) { character = GameState.Enemies.ElementOrDefault(CurrentTarget - 5); } else { character = GameState.Party.ElementOrDefault(CurrentTarget); } if (character != null) { Point renderLocation = CharacterRenderLocation.GetRenderPoint(GameState, character); TargetRender.Render(Canvas, GameState, character, renderLocation.X, renderLocation.Y, frame); } } return(Surface); }
public override SKSurface Draw(GameState currentState, long frame) { Clear(); GameState = currentState; if (Enabled) { Character character = currentState.GetCharacter(CurrentTarget); if (character != null) { Point renderLocation = CharacterRenderLocation.GetRenderPoint(character); TargetRender.Render(Canvas, character, renderLocation.X, renderLocation.Y, frame); } } return(Surface); }
public override SKSurface Draw(GameState currentState, long frame) { Clear(); DrawBackground(); foreach (Character c in currentState.AllCharacters) { Point renderPoint = CharacterRenderLocation.GetRenderPoint(c); RenderCache [c].Render(Canvas, c, renderPoint.X, renderPoint.Y, frame); } Canvas.DrawSurface(TargetView.Draw(currentState, frame), 0, 0); Canvas.DrawSurface(SkillBar.Draw(currentState, frame), SkillBarOffset.X, SkillBarOffset.Y); Canvas.DrawSurface(LogView.Draw(currentState, frame), LogOffset.X, LogOffset.Y); return(Surface); }
public override SKSurface Draw(GameState currentState, long frame) { Clear(); DrawBackground(); foreach (Character c in currentState.AllCharacters) { Point renderPoint = CharacterRenderLocation.GetRenderPoint(currentState, c); RenderCache [c].Render(Canvas, currentState, c, renderPoint.X, renderPoint.Y, frame); } Canvas.DrawSurface(TargetView.Draw(currentState, frame), 0, 0); Canvas.DrawSurface(LogView.Draw(currentState, frame), LogOffset.X, LogOffset.Y); // We must do this from outside since DrawSurface doesn't do transparency the way we need if (SkillSelectionView.IsEnabled(currentState)) { Canvas.DrawRect(SkillSelectionView.ScreenRect, Styles.SkillSelectionBackground); } Canvas.DrawSurface(SkillSelectionView.Draw(currentState, frame), SkillSelectionOffset.X, SkillSelectionOffset.Y); return(Surface); }