match

package
v1.2.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 13, 2021 License: MIT Imports: 12 Imported by: 0

Documentation

Overview

Package match contains a high-level parser for demos.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Match

type Match struct {
	MapName             string
	MapPZero            common.Point
	MapScale            float32
	HalfStarts          []int
	RoundStarts         []int
	Effects             map[int][]common.Effect
	FrameRate           int
	States              []common.OverviewState
	SmokeEffectLifetime int32
	Killfeed            map[int][]common.Kill
	Shots               map[int][]common.Shot
	// contains filtered or unexported fields
}

Match contains general information about the demo and all relevant, parsed data from every tick of the demo that will be displayed.

func NewMatch

func NewMatch(demoFileName string, pb *pb.ProgressBar) (*Match, error)

NewMatch parses the demo at the specified path in the argument and returns a match.Match containing all relevant data from the demo.

func (Match) Translate added in v1.0.0

func (m Match) Translate(x, y float32) (float32, float32)

Translate translates in-game world-relative coordinates to (0, 0) relative coordinates.

func (Match) TranslateScale added in v1.0.0

func (m Match) TranslateScale(x, y float32) (float32, float32)

TranslateScale translates and scales in-game world-relative coordinates to (0, 0) relative coordinates.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL