Exemplo n.º 1
0
    IEnumerator DelayedHint()
    {
        yield return(new WaitForSeconds(6f));

        UI_Prompt.MakePrompt(
            FindObjectsOfType <UI_ActionBar_ButtonAnchor>().Where(btn => btn.ButtonID == ActionButtonID.evac).First().transform as RectTransform,
            "Evacuate Units and secure valuable Supplies", 2,
            delegate {
            return(Unit.GetAllUnitsOfOwner(0, true).IsNullOrEmpty());
        },
            true);
    }
Exemplo n.º 2
0
    IEnumerator DelayedHint()
    {
        yield return(new WaitForSeconds(8f));

        UI_Prompt.MakePrompt(
            FindObjectsOfType <UI_ActionBar_ButtonAnchor>().Where(btn => btn.ButtonID == ActionButtonID.move).First().transform as RectTransform,
            "Select the MOVE ability.\nThen click on a tile.", 2,
            delegate {
            return(has_selected);
        },
            true);
    }
Exemplo n.º 3
0
    IEnumerator DelayedHint()
    {
        wait_for_hint = true;
        yield return(new WaitForSeconds(5f));

        hint = UI_Prompt.MakePrompt(
            FindObjectsOfType <UI_ActionBar_ButtonAnchor>().Where(btn => btn.ButtonID == ActionButtonID.loot).First().transform as RectTransform,
            "Select the LOOT ability.\nThen click on the tile with loot.", 2,
            delegate {
            return(!canLoot());
        },
            true).gameObject;

        wait_for_hint = false;
    }
Exemplo n.º 4
0
    public override void SetActive()
    {
        base.SetActive();
        Unit _player = Unit.GetAllUnitsOfOwner(0, true).FirstOrDefault();

        if (_player != null)
        {
            _player.Actions.OnActionSelected += action =>
            {
                if ((action as UnitAction_ApplyEffectFromWeapon) != null)
                {
                    has_selected = true;
                }
            }
        }
        ;

        StartCoroutine(DelayedHint());
    }

    IEnumerator DelayedHint()
    {
        yield return(new WaitForSeconds(8f));

        UI_Prompt.MakePrompt(
            FindObjectsOfType <UI_ActionBar_ButtonAnchor>().Where(btn => btn.ButtonID == ActionButtonID.attack).First().transform as RectTransform,
            "Select the ATTACK ability.\nThen click on an enemy.", 2,
            delegate {
            return(has_selected);
        },
            true);
    }

    void OnDisable()
    {
        Unit.OnUnitKilled -= OnKilled;
    }

    void StopTimer()
    {
        has_selected = true;
        StopAllCoroutines();
    }
}
Exemplo n.º 5
0
 // Use this for initialization
 void Start()
 {
     UI_Prompt.MakePrompt(this.transform as RectTransform, "TEST OMG", 2, CanRemove, true);
 }
Exemplo n.º 6
0
 void ShowStimpackPrompt()
 {
     UI_Prompt.MakePrompt(UI_ActionBar_ButtonAnchor.GetAnchor(ActionButtonID.stim), "Use stimpacks to regain Oxygen. Units without oxygen, die.", 2, delegate
                          { return(!CanShowStimpackPrompt()); }, true);
 }
Exemplo n.º 7
0
 void ShowSpecialPrompt()
 {
     ADR_Prompt_Shown++;
     UI_Prompt.MakePrompt(UI_ActionBar_ButtonAnchor.GetAnchor(ActionButtonID.special_atk_1), "Use the more powerful \"Special Attack\" to kill the target", 2,
                          delegate { return(!rush.HasRush); }, true);
 }