public HudScore(string filename) : base(filename, false, false) { //Hud score text //"VAGRundschriftD" _scoreLabelEasyDraw = new EasyDraw(350, 40, false); AddChild(_scoreLabelEasyDraw); //78 115 _scoreLabelEasyDraw.SetXY(60, 70); _scoreLabelEasyDraw.Clear(Color.FromArgb(1, 1, 1, 1)); _scoreLabelEasyDraw.TextFont($"data/VAGRundschriftD.ttf", 32); _scoreLabelEasyDraw.Fill(Color.White); _scoreLabelEasyDraw.TextAlign(CenterMode.Min, CenterMode.Min); _scoreLabelEasyDraw.Text($"{_score:00000000000000}", 0, 0); //"00000000000000" 14 digits }
void Update() { var isWalkable = _caveLevel.IsWalkablePosition(_player.Position) || Settings.Cheat_Mode; if (!isWalkable) { var nextPos = _caveLevel.GetCollisionPOI(_player.Position, _player.lastPos); var normalCollision = _caveLevel.GetCollisionNormal(nextPos); //Console.WriteLine($"nextpos: {nextPos} | normal: {normalCollision}"); _player.SetXY(_player.lastPos.x, _player.lastPos.y); _debugPOI?.SetXY(nextPos.x, nextPos.y); if (_debugNormalPOI != null) { _debugNormalPOI.startPoint = _cam.WorldPositionToScreenPosition(nextPos); _debugNormalPOI.vector = normalCollision; } } }