Kagano
Kagano
CC#
Created by Kagano on 9/8/2024 in #help
how to get undefinied type in a <>
have anyone a example?
18 replies
CC#
Created by Kagano on 9/8/2024 in #help
how to get undefinied type in a <>
i think i must store the type in a seperate variable in the SyncedVariable
18 replies
CC#
Created by Kagano on 9/8/2024 in #help
how to get undefinied type in a <>
yeah i want a simular resoultuion
18 replies
CC#
Created by Kagano on 6/7/2024 in #help
How can i ref in a lambda
looks like there isn't a good way
28 replies
CC#
Created by Kagano on 6/7/2024 in #help
How can i ref in a lambda
but i wanted to do that you can via parameter tell which value should set
28 replies
CC#
Created by Kagano on 6/7/2024 in #help
How can i ref in a lambda
yeah that could work :/
28 replies
CC#
Created by Kagano on 6/7/2024 in #help
How can i ref in a lambda
i just try rewrite it
private void Lerp(float past, ref float value,float start, float end)
{
value = Raymath.Lerp(start,end, past);
}
private void Lerp(float past, ref float value,float start, float end)
{
value = Raymath.Lerp(start,end, past);
}
28 replies
CC#
Created by Kagano on 6/7/2024 in #help
How can i ref in a lambda
here is the class
28 replies
CC#
Created by Kagano on 6/7/2024 in #help
How can i ref in a lambda
i don't had a idea
28 replies
CC#
Created by Kagano on 6/7/2024 in #help
How can i ref in a lambda
No description
28 replies
CC#
Created by Kagano on 6/7/2024 in #help
How can i ref in a lambda
No description
28 replies
CC#
Created by Kagano on 6/7/2024 in #help
How can i ref in a lambda
No description
28 replies
CC#
Created by Kagano on 6/7/2024 in #help
How can i ref in a lambda
the variable is always 0
//runs in the update function
float useless = 0;
property.Lerp(time,ref useless);
//

public Tween SetProperty(float value, float time, float delay, float start, float end)
{
TweenProperty property = new TweenProperty(time, delay);
property.OnLerp += (float past, ref float f) => Lerp(past,ref value,start,end);
tweenElements.Add(property);
return this;
}

public class TweenProperty(float time, float delay, Action<float> action = default)
{
public readonly float Delay = delay;
public readonly float Time = time;
public Action<float>? Action = action;

internal event Property OnLerp;

public void Lerp(float past,ref float value)
{
OnLerp?.Invoke(past, ref value);
}
}
//runs in the update function
float useless = 0;
property.Lerp(time,ref useless);
//

public Tween SetProperty(float value, float time, float delay, float start, float end)
{
TweenProperty property = new TweenProperty(time, delay);
property.OnLerp += (float past, ref float f) => Lerp(past,ref value,start,end);
tweenElements.Add(property);
return this;
}

public class TweenProperty(float time, float delay, Action<float> action = default)
{
public readonly float Delay = delay;
public readonly float Time = time;
public Action<float>? Action = action;

internal event Property OnLerp;

public void Lerp(float past,ref float value)
{
OnLerp?.Invoke(past, ref value);
}
}
My button
public int test;

//in the constructor
tween.SetProperty(test, 10, 0, 5, 10);

//runs in the update function
Logger.Warn(test+"");


//output
[Test.RainbowButton:78][21:42] [WARN]: 0
public int test;

//in the constructor
tween.SetProperty(test, 10, 0, 5, 10);

//runs in the update function
Logger.Warn(test+"");


//output
[Test.RainbowButton:78][21:42] [WARN]: 0
28 replies
CC#
Created by Kagano on 6/7/2024 in #help
How can i ref in a lambda
idk i dont tried
28 replies
CC#
Created by Kagano on 6/7/2024 in #help
How can i ref in a lambda
i want that the user can overgive a variable value which will set to it, by every executing of the action
28 replies
CC#
Created by Kagano on 6/7/2024 in #help
How can i ref in a lambda
no, value
28 replies
CC#
Created by Kagano on 2/26/2024 in #help
✅ Avalonia UI button doesn't color by hover!
thank you very much
4 replies