format
typescript
KeyFrameColorRGB.EqualsTo(lhs, rhs)class: KeyFrameColorRGB
description
Determines whether two color keyframes are equal.
parameter
| param_name | type | description |
|---|---|---|
| lhs | KeyFrameColorRGB | Keyframe 1 |
| rhs | KeyFrameColorRGB | Keyframe 2 |
return
| type | description |
|---|---|
boolean | True if the two color keyframes are equal; otherwise, false. |
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);
// Determines whether two color keyframes are equal
let result = KeyFrameColorRGB.EqualsTo(colorFrame1, colorFrame2);
if (result) {
Debug.Log("colorFrame1 is equal to colorFrame2")
}else{
Debug.Log("colorFrame1 is not equal to colorFrame2")
}