void CreateSwatches(float delay) { for (int s = 0; s < 10; s++) { PlayerColor color = PlayerColor.allColors[s]; SwatchBox swatchBox = new SwatchBox(color); if (swatchBox.player.color == slot.player.color) { swatchBox.isSelected = true; } swatchBoxes.Add(swatchBox); keyboardAndSwatchContainer.AddChild(swatchBox); swatchBox.SignalPress += HandleSwatchTap; swatchBox.scale = 0.0f; Go.to(swatchBox, 0.3f, new TweenConfig() .floatProp("scale", 1.0f) .setDelay(delay + 0.04f * (float)s) .setEaseType(EaseType.ExpoOut)); } RepositionSwatches(); }
void CreateSwatches(float delay) { for(int s = 0; s<10; s++) { PlayerColor color = PlayerColor.allColors[s]; SwatchBox swatchBox = new SwatchBox(color); if(swatchBox.player.color == slot.player.color) { swatchBox.isSelected = true; } swatchBoxes.Add(swatchBox); keyboardAndSwatchContainer.AddChild(swatchBox); swatchBox.SignalPress += HandleSwatchTap; swatchBox.scale = 0.0f; Go.to(swatchBox, 0.3f, new TweenConfig() .floatProp("scale",1.0f) .setDelay(delay + 0.04f*(float)s) .setEaseType(EaseType.ExpoOut)); } RepositionSwatches(); }