中级玩家
![Rank: 3](static/image/common/star_level2.gif) ![Rank: 3](static/image/common/star_level1.gif)
- 贡献度
- 0
- 金元
- 1904
- 积分
- 190
- 精华
- 0
- 注册时间
- 2012-2-11
|
修改备忘:员工体力不减、不饥饿、不口渴、不需要上厕所
Staff类
private void UpdateEnergy(float deltaTime)
{
if (this.Energy != null)
{
Room roomUsing = base.RoomUsing;
if (roomUsing != null)
{
roomUsing.Definition.GetStaffEnergyModifier(this, roomUsing);
base.GetAttributeMultiplier(CharacterAttributes.Type.Energy);
this.Energy.Modify(100f, 1f);//员工体力不减
//员工不饥饿
AttributeFloat _hunger = this._attributes.GetAttribute(CharacterAttributes.Type.Hunger);
if (_hunger != null)
{
_hunger.SetValue(0f, false);
}
//员工不口渴
AttributeFloat _thrist = this._attributes.GetAttribute(CharacterAttributes.Type.Thirst);
if (_thrist != null)
{
_thrist.SetValue(0f, false);
}
//员工不需要上厕所
AttributeFloat _toilet = this._attributes.GetAttribute(CharacterAttributes.Type.Toilet);
if (_toilet != null)
{
_toilet.SetValue(0f, false);
}
}
}
}
|
|