public void InitUnit(CResume Resume) { mStats = Resume.mStats; mName = mStats.mName; mIntern = (mStats.mTier == 0); mStamina = mStats.mMaxStamina; mStress = 0.0f; mHunger = 0.0f; mSqrCombatViewDistance = 7 * 7; mSpeed = mStats.mMaxSpeed; if (mIntern) // || mWorld.SimRnd.GetNextFloat() >= 0.5f) { mCombatType = ECombatType.MELEE; } else { mCombatType = ECombatType.RANGED; } }
public override void Init(CWorld World) { base.Init(World); mType = EType.UNIT; mDead = false; mCollide = true; mAssignedDeskID = -1; mOwedSalary = 0; mCollectedSalary = 0; mThoughts = "\"My mind is clear.\""; mActionAnim = ""; mAnimSpeed = 1.0f; mUsedItemID = -1; mEngagedTargetID = -1; mForceAttackItemProxyID = -1; mCombatType = ECombatType.MELEE; mPromotionCounter = 0; mPromotionTimeout = 0; mQuitCounter = 0; mStressPromoteDemandTimer = 0; SetThoughtState(EThoughtState.IDLE); }