format
typescript
KeyFrameColorRGB.EqualsTo(other)class: KeyFrameColorRGB
description
Check if the current color keyframe is equal to the target color keyframe.
parameter
| param_name | type | description |
|---|---|---|
| other | KeyFrameColorRGB | The target color keyframe. |
reture
| type | description |
|---|---|
boolean | Whether the current color keyframe is equal to the target color keyframe. |
code example
typescript
function CreateColorFrame(time:number,r:number,g:number,b:number):KeyFrameColorRGB
{
let colorFrame=new KeyFrameColorRGB();
colorFrame.time=time;
colorFrame.r=r;
colorFrame.g=g;
colorFrame.b=b;
return colorFrame;
}
let colorFrame1 = CreateColorFrame(1,0,0,0);
let colorFrame2 = CreateColorFrame(1,255,0,0);
// Check if the current color keyframe is equal to the target color keyframe
let result = colorFrame1.EqualsTo(colorFrame2);
if (result) {
Debug.Log("colorFrame1 is equal to colorFrame2")
}else{
Debug.Log("colorFrame1 is not equal to colorFrame2")
}