Marker.Update C# (CSharp) Method

Update() private method

private Update ( ) : void
return void
    void Update()
    {
        // We use the transformation matrix of the Background class
        Matrix4x4 mat = new Matrix4x4();
        for (int i = 0; i < 16; ++i)
            mat[i] = (float)Background.transMat[i];

        // We move the object only if the transformation matrix is different
        // from a matrix with all elements equal to zero .
        if (!mat.Equals(Matrix4x4.zero))
            TransformFromMatrix(mat, this.transform);
    }

Usage Example

Example #1
0
        private void CreateOrUpdateFile(string path, string content, bool partialOverride)
        {
            Directory.CreateDirectory(path.ContainingDirectory());

            if (partialOverride)
            {
                content = Marker.Update(File.Exists(path) ? File.ReadAllText(path) : string.Empty, content);
            }

            File.WriteAllText(path, content);
        }
All Usage Examples Of Marker::Update