コード例 #1
0
 public ClientUpdateMaterialVector2Packet(int instanceID, string propertyName, Vector2 value, MaterialVector2Type type)
 {
     this.instanceID   = instanceID;
     this.propertyName = propertyName;
     this.value        = value;
     this.type         = type;
 }
コード例 #2
0
        public MonitorMaterialVector2(Material material, NGShaderProperty propertyInfo, MaterialVector2Type type) : base(propertyInfo.name + '.' + type, null)
        {
            this.material     = material;
            this.propertyInfo = propertyInfo;
            this.type         = type;

            if (this.type == MaterialVector2Type.Offset)
            {
                this.value = this.material.GetTextureOffset(this.propertyInfo.name);
            }
            else if (this.type == MaterialVector2Type.Scale)
            {
                this.value = this.material.GetTextureScale(this.propertyInfo.name);
            }
        }