Example #1
0
    // Use this for initialization
    void Start()
    {
        anim = GetComponent <Animator> ();

        step = speedToTarget * Time.deltaTime;

        moveToTarget = false;

        gototargetscript = GetComponent <GoToTarget> ();
    }
Example #2
0
 public IEnumerable <IMicroAction> GetMicroActions(WorldState worldState, int playerIndex)
 {
     return(GoToTarget.GetMicroActions((currentWorldState, currentPlayerIndex) =>
     {
         var data = GetData(currentWorldState, currentPlayerIndex);
         return new GoToTargetOptions
         {
             PlayerPhysics = data.Physics,
             Target = data.BallLocation,
             UseBoost = true
         };
     }, new TimeSpan(0, 0, 5)));
 }
Example #3
0
        public IEnumerable <IMicroAction> GetMicroActions(WorldState worldState, int playerIndex)
        {
            return(GoToTarget.GetMicroActions((currentWorldState, currentPlayerIndex) =>
            {
                var data = GetData(worldState, playerIndex);
                var targetBoostPad = data.NormalBoostPriority > data.FullBoostPriority ? data.NearestNormal : data.NearestFull;

                return new GoToTargetOptions
                {
                    PlayerPhysics = data.PlayerPhysics,
                    Target = targetBoostPad.Location,
                    UseBoost = false
                };
            }, new TimeSpan(0, 0, 2)));
        }
Example #4
0
 private void Awake()
 {
     moveTo = GetComponent <GoToTarget>();
 }