示例#1
0
    public override void Effect(List <Sc_Tile> tiles)
    {
        Sc_Player player = FindObjectOfType <Sc_Player>();

        player.ModifyHealth(value);
        base.Effect(tiles);
    }
示例#2
0
    public IEnumerator LaunchTurn(Sc_Player firstOpponent, Sc_Enemy secondOpponent)
    {
        canPlay = false;
        Sc_EventManager.instance.onUpdateStats.Invoke();
        Vector3 baseScale = fightText.transform.localScale;
        float   delay     = 2f;

        fightText.DOFade(1, 0.3f);
        fightText.transform.DOScale(baseScale * 1.5f, delay);
        yield return(new WaitForSeconds(delay));

        float wait = 3f;

        firstOpponent.StartAttack(secondOpponent);
        yield return(new WaitForSeconds(wait));

        if (!secondOpponent.isDead)
        {
            secondOpponent.StartAttack(firstOpponent);
            yield return(new WaitForSeconds(wait));
        }

        fightText.DOFade(0, delay - 0.3f);
        fightText.transform.DOScale(baseScale, 0).SetDelay(delay - 0.3f);
        yield return(new WaitForSeconds(delay - 0.3f));

        canPlay = true;
        firstOpponent.ResetStats();
        Sc_EventManager.instance.onUpdateStats.Invoke();
    }
示例#3
0
 public void Awake()
 {
     costText    = GetComponentInChildren <Text>();
     player      = FindObjectOfType <Sc_Player>();
     gameManager = FindObjectOfType <Sc_GameManager>();
     tileManager = FindObjectOfType <Sc_TileManager>();
     myButton    = GetComponent <Button>();
 }
示例#4
0
    private void Awake()
    {
        mainPlayer          = FindObjectOfType <Sc_Player>();
        currentEnemy        = FindObjectOfType <Sc_Enemy>();
        remainingActions    = maxActions;
        displayActions.text = remainingActions + "";
        fightText.DOFade(0, 0);

        screen = endScreen.GetComponentInChildren <Image>();
        txt    = endScreen.GetComponentInChildren <Text>();
        endScreen.GetComponentInChildren <Image>().DOFade(0, 0);
        endScreen.GetComponentInChildren <Text>().DOFade(0, 0);
    }
示例#5
0
    public virtual void Effect(List <Sc_Tile> tiles)
    {
        player = FindObjectOfType <Sc_Player>();
        int bonus = 0;

        foreach (var item in tiles)
        {
            if (item.bonusValue > bonus)
            {
                bonus = item.bonusValue;
            }
        }

        player.GetState(stat).Value += value + bonus;
        Sc_EventManager.instance.onGrowStat.Invoke(stat);
    }