private void Start()
    {
        Debug.Log("===== ObscuredVector3Test =====\n");
        ObscuredVector3.SetNewCryptoKey(404);
        playerPosition = new Vector3(54.1f, 64.3f, 63.2f);
        Debug.Log("Original position:\n" + playerPosition);
        obscuredPlayerPosition = playerPosition;
        Vector3 encrypted = obscuredPlayerPosition.GetEncrypted();

        Debug.Log("How your position is stored in memory when obscured:\n(" + encrypted.x.ToString("0.000") + ", " + encrypted.y.ToString("0.000") + ", " + encrypted.z.ToString("0.000") + ")");
    }
Example #2
0
    private void Start()
    {
        Debug.Log("===== ObscuredVector3Test =====\n");

        // example of custom crypto key using
        // this is not necessary! key is 120205 by default
        ObscuredVector3.SetNewCryptoKey(404);

        // just a small self-test here
        playerPosition = new Vector3(54.1f, 64.3f, 63.2f);
        Debug.Log("Original position:\n" + playerPosition);

        obscuredPlayerPosition = playerPosition;
        //Vector3 encrypted = obscuredPlayerPosition.GetEncrypted();
        ObscuredVector3.RawEncryptedVector3 encrypted = obscuredPlayerPosition.GetEncrypted();
        Debug.Log("How your position is stored in memory when obscured:\n(" + encrypted.x + ", " + encrypted.y + ", " + encrypted.z + ")");
    }
Example #3
0
        private void ObscuredVector3Example()
        {
            logBuilder.Length = 0;
            logBuilder.AppendLine(Constants.LOG_PREFIX + "<b>[ ObscuredVector3 test ]</b>");

            // example of custom crypto key using
            ObscuredVector3.SetNewCryptoKey(404);

            // just a small self-test here
            Vector3 regular = new Vector3(54.1f, 64.3f, 63.2f);

            logBuilder.AppendLine("Original position: " + regular);

            ObscuredVector3 obscured = regular;

            ObscuredVector3.RawEncryptedVector3 encrypted = obscured.GetEncrypted();
            logBuilder.AppendLine("How your position is stored in memory when obscured: (" + encrypted.x + ", " + encrypted.y + ", " + encrypted.z + ")");

            Debug.Log(logBuilder);
        }
Example #4
0
        private void ObscuredVector3Example()
        {
            this.logBuilder.Length = 0;
            this.logBuilder.AppendLine("[ACTk] <b>[ ObscuredVector3 test ]</b>");
            ObscuredVector3.SetNewCryptoKey(404);
            Vector3 vector = new Vector3(54.1f, 64.3f, 63.2f);

            this.logBuilder.AppendLine("Original position: " + vector);
            ObscuredVector3.RawEncryptedVector3 encrypted = vector.GetEncrypted();
            this.logBuilder.AppendLine(string.Concat(new object[]
            {
                "How your position is stored in memory when obscured: (",
                encrypted.x,
                ", ",
                encrypted.y,
                ", ",
                encrypted.z,
                ")"
            }));
            Debug.Log(this.logBuilder);
        }