@ -11,15 +11,23 @@ class AddMove extends AddNode {
console . log ( "MOVE" ) ;
console . log ( "MOVE" ) ;
super . create ( ) ;
super . create ( ) ;
super . addTitle ( WIDTH _WINDOW / 2 , HEIGHT _WINDOW / 16 , selectWord ( "ADD NODE : MOVE" , "AJOUTER ACTION : DEPLACEMENT" ) ) ;
super . addTitle ( WIDTH _WINDOW / 2 , HEIGHT _WINDOW / 16 , selectWord ( "ADD NODE : MOVE" , "AJOUTER ACTION : DEPLACEMENT" ) ) ;
super . addTitle ( WIDTH _WINDOW / 4 , HEIGHT _WINDOW / ( 16 / 3 ) , selectWord ( "FLEE OR MOVE ?" , "RECULER OU AVANCER ?" ) ) ;
let title = super . addTitle ( WIDTH _WINDOW / 4 , HEIGHT _WINDOW / ( 16 / 3 ) , selectWord ( "FLEE OR MOVE ?" , "RECULER OU AVANCER ?" ) ) ;
if ( title . displayWidth > WIDTH _WINDOW / 2 ) {
title . displayWidth = WIDTH _WINDOW / 2 ;
title . scaleY = title . scaleX ;
}
let c1 = super . newCategory ( 'direction' , true , true ) ;
let c1 = super . newCategory ( 'direction' , true , true ) ;
super . addButton ( WIDTH _WINDOW / 6 , HEIGHT _WINDOW / ( 16 / 5 ) , 'fleeFrom' , c1 , false ) ;
super . addButton ( WIDTH _WINDOW / 6 , HEIGHT _WINDOW / ( 16 / 5 ) , 'fleeFrom' , c1 , false ) ;
super . addButton ( WIDTH _WINDOW / 3 , HEIGHT _WINDOW / ( 16 / 5 ) , 'moveToward' , c1 , true ) ;
super . addButton ( WIDTH _WINDOW / 3 , HEIGHT _WINDOW / ( 16 / 5 ) , 'moveToward' , c1 , true ) ;
super . addTitle ( WIDTH _WINDOW / 4 * 3 , HEIGHT _WINDOW / ( 16 / 3 ) , selectWord ( "WHO ?" , "QUI ?" ) ) ;
title = super . addTitle ( WIDTH _WINDOW / 4 * 3 , HEIGHT _WINDOW / ( 16 / 3 ) , selectWord ( "WHO ?" , "QUI ?" ) ) ;
if ( title . displayWidth > WIDTH _WINDOW / 2 ) {
title . displayWidth = WIDTH _WINDOW / 2 ;
title . scaleY = title . scaleX ;
}
let c2 = super . newCategory ( 'target' , true , true ) ;
let c2 = super . newCategory ( 'target' , true , true ) ;
super . addButton ( WIDTH _WINDOW / 6 * 4 , HEIGHT _WINDOW / ( 16 / 5 ) , 'enemyBot' , c2 , true ) ;
super . addButton ( WIDTH _WINDOW / 6 * 4 , HEIGHT _WINDOW / ( 16 / 5 ) , 'enemyBot' , c2 , true ) ;
let btn = super . addButton ( WIDTH _WINDOW / 6 * 5 , HEIGHT _WINDOW / ( 16 / 5 ) , 'bonus' , c2 , false ) ;
let btn = super . addButton ( WIDTH _WINDOW / 6 * 5 , HEIGHT _WINDOW / ( 16 / 5 ) , 'bonus' , c2 , false ) ;
let title = super . addTitle ( WIDTH _WINDOW / 2 , HEIGHT _WINDOW / ( 16 / 7 ) , selectWord ( "WHAT BONUS ? (OPTIONAL)" , "QUEL BONUS ? (FACULTATIF)" ) ) ;
title = super . addTitle ( WIDTH _WINDOW / 2 , HEIGHT _WINDOW / ( 16 / 7 ) , selectWord ( "WHAT BONUS ? (OPTIONAL)" , "QUEL BONUS ? (FACULTATIF)" ) ) ;
let c3 = super . newCategory ( 'target' , true , false ) ;
let c3 = super . newCategory ( 'target' , true , false ) ;
let speed = super . addButton ( WIDTH _WINDOW / 3 , HEIGHT _WINDOW / ( 16 / 9 ) , 'bonusSpeed' , c3 , "speed" ) ;
let speed = super . addButton ( WIDTH _WINDOW / 3 , HEIGHT _WINDOW / ( 16 / 9 ) , 'bonusSpeed' , c3 , "speed" ) ;
let attack = super . addButton ( WIDTH _WINDOW / 1.5 , HEIGHT _WINDOW / ( 16 / 9 ) , 'bonusAttack' , c3 , "attack" ) ;
let attack = super . addButton ( WIDTH _WINDOW / 1.5 , HEIGHT _WINDOW / ( 16 / 9 ) , 'bonusAttack' , c3 , "attack" ) ;