Affective and cognitive influences in social dilemma game