我使用Python创建了一个基于文本的冒险游戏,这里是我的代码。 #game.py
import time
import encounter
#Hp at start of game
hp = 100
#Function to display the current hp of the current player
def currenthp(hp):
if hp < 1
我发现如果我将用户添加到ASP身份中的某个角色,直到我注销并重新登录后才会生效。是否需要执行某些操作来刷新用户的角色而不强制用户先注销? 以下是我将用户添加到角色的方式。 var userManager = new UserManager<ApplicationUser>(new UserStore<ApplicationUser>(new ApplicationDbContext()));
v