You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
16 lines
612 B
16 lines
612 B
using System.Collections;
|
|
using System.Collections.Generic;
|
|
using UnityEngine;
|
|
using UnityEngine.UI;
|
|
|
|
public class PileTab : MonoBehaviour {
|
|
public void OnClick() {
|
|
var tabs = GameLoader.instance.pileTabs.transform;
|
|
var piles = GameLoader.instance.playerPiles.transform;
|
|
var self = transform.GetSiblingIndex();
|
|
for (int i = 0; i < tabs.childCount; i++) {
|
|
tabs.GetChild(i).GetComponent<RawImage>().color = i == self ? new Color32(255, 255, 255, 100) : new Color32(255, 255, 255, 22);
|
|
piles.GetChild(i).gameObject.SetActive(i == self);
|
|
}
|
|
}
|
|
}
|
|
|