public static StrategyHexLight Instantiate(StrategyHexLight prefab, Transform fromParent) { StrategyHexLight strategyHexLight = UnityEngine.Object.Instantiate(prefab); strategyHexLight.transform.parent = fromParent; strategyHexLight.transform.localScale = Vector3.one; strategyHexLight.transform.localPosition = Vector3.zero; return(strategyHexLight); }
public static StrategyHexLight Instantiate(StrategyHexLight prefab, Transform fromParent) { StrategyHexLight strategyHexLight = Object.Instantiate <StrategyHexLight>(prefab); strategyHexLight.get_transform().set_parent(fromParent); strategyHexLight.get_transform().set_localScale(Vector3.get_one()); strategyHexLight.get_transform().set_localPosition(Vector3.get_zero()); return(strategyHexLight); }
public void StartTileLightAnimation(Action Onfinished) { StrategyHexLight strategyHexLight = StrategyHexLight.Instantiate(Resources.Load <StrategyHexLight>("Prefabs/StrategyPrefab/StrategyTop/TileLight"), base.transform); this.DelayActionFrame(3, delegate { strategyHexLight.Play(delegate { if (Onfinished != null) { Onfinished(); } UnityEngine.Object.Destroy(strategyHexLight.gameObject); }); }); TileButton.enabled = true; TileButton.defaultColor = Color.clear; TileButton.hover = Color.clear; TileButton.pressed = Color.clear; }