我正在编写一个算法来按程序生成图像。
<伪码>
color1 = (7, 46, 76)
color2 = (119, 230, 161)
color3 = (148, 129, 134)
for every x, y in image {
// do a crazy calculation to get a value based on x, y
// this number is between 0 and 1
float f = (output of crazy calculation)
// part 1: finding the
我是一个新的团结,并试图改变一个精灵的颜色通过一个脚本。下面是教程页面:。我用的是联合2019.2.0f1
当按下“播放”键时,我可以看到巡查员中的颜色每秒钟都在变化,但在场景中什么也没有发生。
守则:
公共类colorChanger : MonoBehaviour {
public int seconds_interval;
public SpriteRenderer sr;
public Color color_1;
public Color color_2;
IEnumerator changeCo
我需要在colorAxis of HeatMap中添加单击事件,但是API只显示两个事件"AfterSetExtremes“和"SetExtremes”。
我在colorAxis事件块中添加了“单击”侦听器,并期望它能够工作,但它没有工作。
问题:如何在colorAxis上添加单击事件,所以当我们单击颜色轴栏时,事件将被“单击”侦听器监听。