-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
99cf1db
commit 2a55597
Showing
3 changed files
with
39 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
const IntentionPlayer = require('../IntentionPlayer') | ||
const TensorMath = require('../../lib/TensorMath') | ||
const Intention = require('../../Intention') | ||
const LineIntention = require('../../Intention/LineIntention') | ||
const PointIntention = require('../../Intention/PointIntention') | ||
const LookAtIntention = require('../../Intention/LookAtIntention') | ||
const Vector = require('../../lib/Vector') | ||
const RulePlays = require('../experimental/RulePlays') | ||
|
||
module.exports = class BaseMidfielder extends RulePlays { | ||
setup () { | ||
super.setup() | ||
let attacker = () => { | ||
let pos = this.match.gameManager.coach.attackerRobot.robots.self.position | ||
/* | ||
A projeção não é usada nos casos onde: | ||
- Não existe vetor projeção (ocorre no primeiro frame de execução) | ||
- Velocidade da bola inferior a 1.2 cm/s (praticamente parada) | ||
- Quando a bola ira bater longe do gol (acima de 30 cm em relação ao centro do gol) | ||
*/ | ||
return pos | ||
} | ||
|
||
this.addIntetion(new PointIntention('avoidPartner', { | ||
target: attacker, | ||
radius: 400, | ||
radiusMax: 400, | ||
decay: TensorMath.new.mult(-1).finish, | ||
multiplier: 160 | ||
})) | ||
|
||
} | ||
loop () {} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters