Пример #1
0
    public static LTDescr LTFloat(this Material self, string property, float to, float time)
    {
        int id = Shader.PropertyToID(property);

        return(LeanVirtual.Value(self.GetFloat(id), to, time)
               .setOnUpdate((float x) => self.SetFloat(id, x)));
    }
Пример #2
0
 public static LTDescr LTScale(this Material self, string property, Vector2 to, float time)
 {
     return(LeanVirtual.Value(self.GetTextureScale(property), to, time).setOnUpdate((Vector2 x) => self.SetTextureOffset(property, x)));
 }
Пример #3
0
 public static LTDescr LTScale(this Material self, Vector2 to, float time)
 {
     return(LeanVirtual.Value(self.mainTextureScale, to, time).setOnUpdate((Vector2 x) => self.mainTextureScale = x));
 }
Пример #4
0
 public static LTDescr LTColor(this Material self, Color to, float time)
 {
     return(LeanVirtual.Value(self.color, to, time).setOnUpdate((Color x) => self.color = x));
 }