public override int GetHash(ref int idx) { int hash = 1; foreach (var entity in GetPlayers()) { hash += entity.curHealth.GetHash(ref idx) * PrimerLUT.GetPrimer(idx++); hash += entity.transform.GetHash(ref idx) * PrimerLUT.GetPrimer(idx++); hash += entity.skillBox.GetHash(ref idx) * PrimerLUT.GetPrimer(idx++); } foreach (var entity in GetEnemies()) { hash += entity.curHealth.GetHash(ref idx) * PrimerLUT.GetPrimer(idx++); hash += entity.transform.GetHash(ref idx) * PrimerLUT.GetPrimer(idx++); } foreach (var entity in GetSpawners()) { hash += entity.GetHash(ref idx) * PrimerLUT.GetPrimer(idx++); } hash += _curGameState.GetHash(ref idx) * PrimerLUT.GetPrimer(idx++); return(hash); }
public override int GetHash(ref int idx) { int hash = 1; foreach (var entity in GetPlayers()) { hash += entity.curHealth.GetHash(ref idx) * PrimerLUT.GetPrimer(idx++); hash += entity.transform.GetHash(ref idx) * PrimerLUT.GetPrimer(idx++); hash += entity.skillBox.GetHash(ref idx) * PrimerLUT.GetPrimer(idx++); } //_debugService.Trace($"GetPlayers hash {hash}",true); foreach (var entity in GetEnemies()) { hash += entity.curHealth.GetHash(ref idx) * PrimerLUT.GetPrimer(idx++); hash += entity.transform.GetHash(ref idx) * PrimerLUT.GetPrimer(idx++); } //_debugService.Trace($"GetEnemies hash {hash}",true); foreach (var entity in GetSpawners()) { hash += entity.GetHash(ref idx) * PrimerLUT.GetPrimer(idx++); } //_debugService.Trace($"GetSpawners hash {hash}",true); hash += _curGameState.GetHash(ref idx) * PrimerLUT.GetPrimer(idx++); //_debugService.Trace($"GetHash hash {hash}",true); return(hash); }
public int GetHash(ref int idx) { int hash = 1; hash += hasReachTarget.GetHash(ref idx) * PrimerLUT.GetPrimer(idx++); hash += needMove.GetHash(ref idx) * PrimerLUT.GetPrimer(idx++); return(hash); }
public int GetHash(ref int idx) { int hash = 1; hash += Deg.GetHash(ref idx) * PrimerLUT.GetPrimer(idx++); hash += SkillId.GetHash(ref idx) * PrimerLUT.GetPrimer(idx++); return(hash); }
public int GetHash(ref int idx) { int hash = 1; hash += deg.GetHash(ref idx) * PrimerLUT.GetPrimer(idx++); hash += pos.GetHash(ref idx) * PrimerLUT.GetPrimer(idx++); hash += y.GetHash(ref idx) * PrimerLUT.GetPrimer(idx++); return(hash); }
public int GetHash(ref int idx) { int hash = 1; hash += prefabId.GetHash(ref idx) * PrimerLUT.GetPrimer(idx++); hash += spawnPoint.GetHash(ref idx) * PrimerLUT.GetPrimer(idx++); hash += spawnTime.GetHash(ref idx) * PrimerLUT.GetPrimer(idx++); return(hash); }
public int GetHash(ref int idx) { int hash = 1; hash += CurEnemyCount.GetHash(ref idx) * PrimerLUT.GetPrimer(idx++); hash += MaxEnemyCount.GetHash(ref idx) * PrimerLUT.GetPrimer(idx++); hash += CurEnemyId.GetHash(ref idx) * PrimerLUT.GetPrimer(idx++); return(hash); }
public int GetHash(ref int idx) { int hash = 1; hash += atkInterval.GetHash(ref idx) * PrimerLUT.GetPrimer(idx++); hash += stopDistSqr.GetHash(ref idx) * PrimerLUT.GetPrimer(idx++); hash += targetId.GetHash(ref idx) * PrimerLUT.GetPrimer(idx++); return(hash); }
private int CalcHash(ref int idx) { int hashIdx = 0; int hashCode = 0; foreach (var svc in _serviceContainer.GetAllServices()) { if (svc is IHashCode hashSvc) { hashCode += hashSvc.GetHash(ref hashIdx) * PrimerLUT.GetPrimer(hashIdx++);
public int GetHash(ref int idx) { int hash = 1; hash += Mass.GetHash(ref idx) * PrimerLUT.GetPrimer(idx++); hash += Speed.GetHash(ref idx) * PrimerLUT.GetPrimer(idx++); hash += isEnable.GetHash(ref idx) * PrimerLUT.GetPrimer(idx++); hash += isOnFloor.GetHash(ref idx) * PrimerLUT.GetPrimer(idx++); hash += isSleep.GetHash(ref idx) * PrimerLUT.GetPrimer(idx++); return(hash); }
public int GetHash(ref int idx) { int hash = 1; hash += inputUV.GetHash(ref idx) * PrimerLUT.GetPrimer(idx++); hash += isInputFire.GetHash(ref idx) * PrimerLUT.GetPrimer(idx++); hash += isSpeedUp.GetHash(ref idx) * PrimerLUT.GetPrimer(idx++); hash += mousePos.GetHash(ref idx) * PrimerLUT.GetPrimer(idx++); hash += skillId.GetHash(ref idx) * PrimerLUT.GetPrimer(idx++); return(hash); }
public int GetHash(ref int idx) { int hash = 1; hash += EntityId.GetHash(ref idx) * PrimerLUT.GetPrimer(idx++); hash += PrefabId.GetHash(ref idx) * PrimerLUT.GetPrimer(idx++); hash += Timer.GetHash(ref idx) * PrimerLUT.GetPrimer(idx++); hash += Info.GetHash(ref idx) * PrimerLUT.GetPrimer(idx++); hash += transform.GetHash(ref idx) * PrimerLUT.GetPrimer(idx++); return(hash); }
public int GetHash(ref int idx) { int hash = 1; hash += _animLen.GetHash(ref idx) * PrimerLUT.GetPrimer(idx++); hash += _curAnimIdx.GetHash(ref idx) * PrimerLUT.GetPrimer(idx++); hash += _curAnimName.GetHash(ref idx) * PrimerLUT.GetPrimer(idx++); hash += _timer.GetHash(ref idx) * PrimerLUT.GetPrimer(idx++); hash += configId.GetHash(ref idx) * PrimerLUT.GetPrimer(idx++); return(hash); }
public int GetHash(ref int idx) { int hash = 1; hash += deg.GetHash(ref idx) * PrimerLUT.GetPrimer(idx++); hash += high.GetHash(ref idx) * PrimerLUT.GetPrimer(idx++); hash += pos.GetHash(ref idx) * PrimerLUT.GetPrimer(idx++); hash += radius.GetHash(ref idx) * PrimerLUT.GetPrimer(idx++); hash += size.GetHash(ref idx) * PrimerLUT.GetPrimer(idx++); hash += up.GetHash(ref idx) * PrimerLUT.GetPrimer(idx++); hash += y.GetHash(ref idx) * PrimerLUT.GetPrimer(idx++); return(hash); }
public void Execute() { int hashCode = 0; int idx = 0; hashCode += _hashableEntities.count.GetHash(ref idx) * PrimerLUT.GetPrimer(idx++);; foreach (var entity in _hashableEntities) { hashCode += entity.pos.value.GetHash(ref idx) * PrimerLUT.GetPrimer(idx++);; if (entity.hasDir) { hashCode += ((int)entity.dir.value).GetHash(ref idx) * PrimerLUT.GetPrimer(idx++); } } _gameStateContext.ReplaceHashCode(hashCode); }
private int CalcHash(ref int idx, bool isNeedTrace) { int hashIdx = 0; int hashCode = 0; var debug = _serviceContainer.GetService <IDebugService>(); foreach (var svc in _serviceContainer.GetAllServices()) { if (svc is IHashCode hashSvc) { hashCode += hashSvc.GetHash(ref hashIdx) * PrimerLUT.GetPrimer(hashIdx++); //if (isNeedTrace) { debug.Trace($"svc {svc.GetType().Name} hashCode{hashCode}" ,true);} } } return(hashCode); }
// Token: 0x060000CC RID: 204 RVA: 0x000055F0 File Offset: 0x000037F0 private int CalcHash(ref int idx, bool isNeedTrace) { int num = 0; int num2 = 0; IDebugService service = this._serviceContainer.GetService <IDebugService>(); foreach (IService service2 in this._serviceContainer.GetAllServices()) { IHashCode hashCode; bool flag = (hashCode = (service2 as IHashCode)) != null; if (flag) { num2 += hashCode.GetHash(ref num) * PrimerLUT.GetPrimer(num++); } } return(num2); }
public int GetHash() { int hash = 1; int idx = 0; foreach (var entity in allPlayers) { hash += entity.currentHealth.GetHash() * PrimerLUT.GetPrimer(idx++); hash += entity.transform.GetHash() * PrimerLUT.GetPrimer(idx++); } foreach (var entity in EnemyManager.Instance.allEnemy) { hash += entity.currentHealth.GetHash() * PrimerLUT.GetPrimer(idx++); hash += entity.transform.GetHash() * PrimerLUT.GetPrimer(idx++); } return(hash); }
public int GetHash(ref int idx) { int hash = 1; hash += _curSkillIdx.GetHash(ref idx) * PrimerLUT.GetPrimer(idx++); hash += configId.GetHash(ref idx) * PrimerLUT.GetPrimer(idx++); hash += isFiring.GetHash(ref idx) * PrimerLUT.GetPrimer(idx++); if (_skills != null) { foreach (var item in _skills) { if (item != default(Lockstep.Game.Skill)) { hash += item.GetHash(ref idx) * PrimerLUT.GetPrimer(idx++); } } } return(hash); }
public int GetHash(ref int idx) { int hash = 1; hash += CdTimer.GetHash(ref idx) * PrimerLUT.GetPrimer(idx++); hash += _curPartIdx.GetHash(ref idx) * PrimerLUT.GetPrimer(idx++); hash += skillTimer.GetHash(ref idx) * PrimerLUT.GetPrimer(idx++); hash += ((int)State) * PrimerLUT.GetPrimer(idx++); if (partCounter != null) { foreach (var item in partCounter) { if (item != default(System.Int32)) { hash += item.GetHash(ref idx) * PrimerLUT.GetPrimer(idx++); } } } return(hash); }
public int GetHash(ref int idx) { int hash = 1; hash += EntityId.GetHash(ref idx) * PrimerLUT.GetPrimer(idx++); hash += PrefabId.GetHash(ref idx) * PrimerLUT.GetPrimer(idx++); hash += curHealth.GetHash(ref idx) * PrimerLUT.GetPrimer(idx++); hash += damage.GetHash(ref idx) * PrimerLUT.GetPrimer(idx++); hash += isFire.GetHash(ref idx) * PrimerLUT.GetPrimer(idx++); hash += isInvincible.GetHash(ref idx) * PrimerLUT.GetPrimer(idx++); hash += maxHealth.GetHash(ref idx) * PrimerLUT.GetPrimer(idx++); hash += moveSpd.GetHash(ref idx) * PrimerLUT.GetPrimer(idx++); hash += turnSpd.GetHash(ref idx) * PrimerLUT.GetPrimer(idx++); hash += animator.GetHash(ref idx) * PrimerLUT.GetPrimer(idx++); hash += brain.GetHash(ref idx) * PrimerLUT.GetPrimer(idx++); hash += colliderData.GetHash(ref idx) * PrimerLUT.GetPrimer(idx++); hash += rigidbody.GetHash(ref idx) * PrimerLUT.GetPrimer(idx++); hash += skillBox.GetHash(ref idx) * PrimerLUT.GetPrimer(idx++); hash += transform.GetHash(ref idx) * PrimerLUT.GetPrimer(idx++); return(hash); }
public override int GetHash(ref int idx) { return((int)_i.randSeed * PrimerLUT.GetPrimer(idx++)); }
public int GetHash(ref int idx) { return(Id * PrimerLUT.GetPrimer(idx++)); }
public static int GetHash(this LFloat val) { return(PrimerLUT.GetPrimer(val._val)); }
public static int GetHash(this LVector2 val) { return(PrimerLUT.GetPrimer(val._x) + PrimerLUT.GetPrimer(val._y) * 17); }
public static int GetHash(this LVector3 val) { return(PrimerLUT.GetPrimer(val._x) + PrimerLUT.GetPrimer(val._y) * 31 + PrimerLUT.GetPrimer(val._z) * 37); }