public RequestResponse RequestData(PlayerController me, BlackBoardData data) { if (data == BlackBoardData.POSICAO_BOLA) { return(new RequestResponse <Vector3>(posicaoBola)); } if (data == BlackBoardData.POSICAO_DEFENDER) { return(new RequestResponse <Vector3>(posicaoDefender)); } if (data == BlackBoardData.POSICAO_OBJETIVO) { return(new RequestResponse <Vector3>(posicaoObjetivo)); } throw new System.Exception("Invalid BlackBoardData"); }
public void RequestUpdate(GameObject me, BlackBoardData data, UpdateRequest request) { if (data == BlackBoardData.POSICAO_BOLA) { posicaoBola = ((UpdateRequest <Vector3>)request).value; } if (data == BlackBoardData.POSICAO_DEFENDER) { posicaoDefender = ((UpdateRequest <Vector3>)request).value; } if (data == BlackBoardData.POSICAO_OBJETIVO) { posicaoObjetivo = ((UpdateRequest <Vector3>)request).value; } if (data == BlackBoardData.MINHA_ACAO) { acao[me] = ((UpdateRequest <PlayerController.Acao>)request).value; } }