Exemple #1
0
        public static UICommandUnitSelect Instantiate(UICommandUnitSelect prefab, Transform parent, HashSet <BattleCommand> validCommands, Action <BattleCommand> onDecide, Action onCancel)
        {
            UICommandUnitSelect uICommandUnitSelect = Object.Instantiate <UICommandUnitSelect>(prefab);

            uICommandUnitSelect.get_transform().set_parent(parent);
            uICommandUnitSelect.get_transform().set_localPosition(Vector2.get_down() * 12f);
            uICommandUnitSelect.get_transform().set_localScale(Vector3.get_one() * 0.8f);
            uICommandUnitSelect.Init(validCommands, onDecide, onCancel);
            return(uICommandUnitSelect);
        }
        public static UICommandUnitSelect Instantiate(UICommandUnitSelect prefab, Transform parent, HashSet <BattleCommand> validCommands, Action <BattleCommand> onDecide, Action onCancel)
        {
            UICommandUnitSelect uICommandUnitSelect = UnityEngine.Object.Instantiate(prefab);

            uICommandUnitSelect.transform.parent        = parent;
            uICommandUnitSelect.transform.localPosition = Vector2.down * 12f;
            uICommandUnitSelect.transform.localScale    = Vector3.one * 0.8f;
            uICommandUnitSelect.Init(validCommands, onDecide, onCancel);
            return(uICommandUnitSelect);
        }