private void CheckForEndState(MNode node) { if (CheckPlayerPositionRequirements(node, out float ticketValue)) { bool end = TransferItem(); float _ticketValue = playerNode.GetTicketValue(); if (end || _ticketValue != 0) { //update customer satisfaction float grade = patience.ResetPatience(); satisfaction.ComputeSatisfaction(grade, ticketValue); float index = satisfaction.ComputeSatisfaction(-1, _ticketValue); float payment = satisfaction.ComputePayment(); PerformStateProcesses(index, payment); renderer.enabled = false; UnsubscribeEvents(); animator.SetTrigger("MoveState"); } } }
private void CheckForEndState(MNode node) { if (CheckPlayerPositionRequirements(node, out float ticketValue)) { //update customer satisfaction float grade = patience.ResetPatience(); satisfaction.ComputeSatisfaction(grade, ticketValue); bool end = TransferItem(); if (end) { UnsubscribeEvents(); animator.SetTrigger("MoveState"); } } }