Ejemplo n.º 1
0
        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);
        }
Ejemplo n.º 2
0
        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);
        }