Exemplo n.º 1
0
    public override void EnterState(QB_Controller_FSM qb)
    {
        targetReceiver  = qb.Receiver_current.GetComponent <Receiver_Controller_FSM>();
        ball_Controller = qb.GetComponent <Ball_Controller>();

        //this is so that we throw imedialty when we enter the state
        if (targetIndicator == null)
        {
            targetIndicator = qb.InstantiateTargetIndicator(CalcTarget(qb));
        }
        else
        {
            targetIndicator.gameObject.SetActive(true);
            targetIndicator.position = CalcTarget(qb);
        }

        ball_Controller.target = targetIndicator;
        ball_Controller.Launch();
        GameManager.Instance.ballLaunched = true;
    }
Exemplo n.º 2
0
 public override void EnterState(QB_Controller_FSM qb)
 {
     targetReceiver  = qb.Receiver_current.GetComponent <Receiver_Controller_FSM>();
     ball_Controller = qb.GetComponent <Ball_Controller>();
 }