<commit_before>package NetworkOnline

import (
	"github.com/vova616/GarageEngine/Engine"
	//"Engine/Components"
	"github.com/go-gl/glfw"
	"github.com/vova616/GarageEngine/Engine/Input"
	//"log"
	"github.com/vova616/chipmunk"
	"github.com/vova616/chipmunk/vect"
	//"fmt"
	//"time"
)

type PlayerController struct {
	Engine.BaseComponent
	Speed     float32
	JumpSpeed float32
	Physics   *Engine.Physics
	state     int
	Fire      *Engine.GameObject

	Floor *Engine.GameObject
	Fires []*Engine.GameObject
}

func (sp *PlayerController) OnCollisionEnter(arbiter Engine.Arbiter) bool {
	println("Enter " + arbiter.GameObjectB().Name())
	count := 0
	for _, con := range arbiter.Contacts {
		println(arbiter.Normal(con).Y)
		if -arbiter.Normal(con).Y > 0.9 {
			count++
		}
	}
	if count >= 2 {
		sp.Floor = arbiter.GameObjectB()
	}

	return true
}
func (sp *PlayerController) OnCollisionExit(arbiter Engine.Arbiter) {
	println("Exit " + arbiter.GameObjectB().Name())
	if arbiter.GameObjectB() == sp.Floor {
		sp.Floor = nil
	}
}

func NewPlayerController() *PlayerController {
	return &PlayerController{Engine.NewComponent(), 10, 20000, nil, -1, nil, nil, make([]*Engine.GameObject, 0)}
}

func (sp *PlayerController) Start() {
	if sp.GameObject().Physics == nil {
		return
	}
	sp.Physics = sp.GameObject().Physics
	sp.Physics.Body.SetMass(1)
	sp.Physics.Shape.Group = 1
	//sp.Physics.Shape.Friction = 0.5<commit_msg>Removed debugging log.<commit_after>package NetworkOnline

import (
	"github.com/vova616/GarageEngine/Engine"
	//"Engine/Components"
	"github.com/go-gl/glfw"
	"github.com/vova616/GarageEngine/Engine/Input"
	//"log"
	"github.com/vova616/chipmunk"
	"github.com/vova616/chipmunk/vect"
	//"fmt"
	//"time"
)

type PlayerController struct {
	Engine.BaseComponent
	Speed     float32
	JumpSpeed float32
	Physics   *Engine.Physics
	state     int
	Fire      *Engine.GameObject

	Floor *Engine.GameObject
	Fires []*Engine.GameObject
}

func (sp *PlayerController) OnCollisionEnter(arbiter Engine.Arbiter) bool {
	//println("Enter " + arbiter.GameObjectB().Name())
	count := 0
	for _, con := range arbiter.Contacts {
		//println(arbiter.Normal(con).Y)
		if -arbiter.Normal(con).Y > 0.9 {
			count++
		}
	}
	if count >= 2 {
		sp.Floor = arbiter.GameObjectB()
	}

	return true
}
func (sp *PlayerController) OnCollisionExit(arbiter Engine.Arbiter) {
	println("Exit " + arbiter.GameObjectB().Name())
	if arbiter.GameObjectB() == sp.Floor {
		sp.Floor = nil
	}
}

func NewPlayerController() *PlayerController {
	return &PlayerController{Engine.NewComponent(), 10, 20000, nil, -1, nil, nil, make([]*Engine.GameObject, 0)}
}

func (sp *PlayerController) Start() {
	if sp.GameObject().Physics == nil {
		return
	}
	sp.Physics = sp.GameObject().Physics
	sp.Physics.Body.SetMass(1)
	sp.Physics.Shape.Group = 1
	//sp.Physics.Shape.Friction = 0.5
{'fraction_non_alphanumeric': 0.14941716707877076, 'fraction_numerical': 0.023313316849169905, 'mean_word_length': 4.075268817204301, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 7, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7465534', 'n_tokens_mistral': 1143, 'n_tokens_neox': 1061, 'n_words': 193}