本文整理汇总了C#中Status.InitMinMaxVal方法的典型用法代码示例。如果您正苦于以下问题:C# Status.InitMinMaxVal方法的具体用法?C# Status.InitMinMaxVal怎么用?C# Status.InitMinMaxVal使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Status
的用法示例。
在下文中一共展示了Status.InitMinMaxVal方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: InGameUser
public InGameUser(StageEntity2 stageEntity, Status.Handle onGoldChanged, TimedConsumableCommandSet.Handle onChargedAttack)
{
this.stat = new Stat<PlayerStatType>(StatGenerator.ExportData<PlayerStatType>(stageEntity, new StatConstants()));
this.status = new Status<PlayerStatusType>(null, stat);
status.InitMinMaxVal(PlayerStatusType.exp, 0, PlayerStatType.maxEXP, 0);
status.InitMinMaxVal(PlayerStatusType.gold, 0, PlayerStatType.maxGold, 0);
status.InitMinMaxVal(PlayerStatusType.key, 0, PlayerStatType.maxKey, 0);
status.InitMinMaxVal(PlayerStatusType.feverPoint, 0, PlayerStatType.maxFeverPoint, 0);
/*
actionHandler = new ActionHandler(status);
AddAction(Action.E_Type.Money,
delegate(float value, GameInstance firer, string[] param)
{
return new ActionHandler.Result(PlayerStatusType.gold, value);
}
);
AddAction(Action.E_Type.Exp,
delegate(float value, GameInstance firer, string[] param)
{
return new ActionHandler.Result(PlayerStatusType.exp, value);
}
);
*/
status.RegisterOnChangeEvent(PlayerStatusType.gold, onGoldChanged);
commandQueue = new TimedConsumableCommandSet(100, false, null, onChargedAttack);
}
示例2: InGameUser
public InGameUser(StageEntity stageEntity, Status.Handle onGoldChanged, TimedConsumableCommandSet.Handle onChargedAttack)
{
status = new Status<User>(null, null);
actionHandler = new ActionHandler(status);
status.InitMinMaxVal(User.Gold, 0, stageEntity.maxGold, 0);
status.InitMinMaxVal(User.Exp, 0, stageEntity.maxEXP, 0);
status.InitMinMaxVal(User.Key, 0, stageEntity.maxKey, 0);
AddAction(Action.E_Type.Money,
delegate(float value, GameInstance firer, string[] param)
{
return new ActionHandler.Result(User.Gold, value);
}
);
AddAction(Action.E_Type.GetKey,
delegate(float value, GameInstance firer, string[] param)
{
return new ActionHandler.Result(User.Key, value);
}
);
AddAction(Action.E_Type.Exp,
delegate(float value, GameInstance firer, string[] param)
{
return new ActionHandler.Result(User.Exp, value);
}
);
status.RegisterOnChangeEvent(User.Gold, onGoldChanged);
commandQueue = new TimedConsumableCommandSet(null, 100, false, null, onChargedAttack);
}