Jump to content

variable help!


dthrasher90
 Share

Recommended Posts

  function qbPass() {


        var x = 1;

        // Math.floor((Math.random() * 3) + 1);
        console.log(x);
        switch (x) {

            case 1:

            var tweenFootballA = game.add.tween(football).to({
                x: '+100',
                y: '-150'
            }, 3000);
                tweenFootballA.start();
                tweenFootballA.onComplete.add(function newlocation (lineOfScrimmage){
                  var lineOfScrimmage = football.x;
                  console.log("anon function = ", lineOfScrimmage);
        

                  return lineOfScrimmage;
                });
                lineOfScrimmage = football.y;
                console.log(lineOfScrimmage);




                // function los(lineOfScrimmage){
                //   lineOfScrimmage = football.y;
                //   console.log("line of scrimmage = ", lineOfScrimmage);
                // }
                console.log('1');

                break;

Need some help here guys!

Link to comment
Share on other sites

 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...