ゲームがあり、冒険が残っている場合にテンプレートをレンダリングするシステムが必要です。
Meteor.methods({
adventure: function () {
if(Meteor.user().adv > 0)
{
Meteor.users.update({_id: this.userId}, {$inc: {'adv': -1 }});
this.render('adv');
}
else
{
this.render('noadventures');
}
},
})
adv という名前のテンプレートがありますが、読み込まれません。