Esempio n. 1
0
        public void Message_fct()
        {
            SeqTutoCombat seqTutoCombat = TutoManager.s_instance.GetComponent <SeqTutoCombat>();
            Button        skillButton   = seqTutoCombat.skillPanel.GetComponentInChildren <Button>();

            skillButton.interactable = true;

            if (feedback == null)
            {
                feedback = Instantiate(TutoManager.s_instance.uiPointer, GameManager.Instance.Ui.transform.GetChild(0));
                feedback.GetComponent <FlecheQuiBouge>().PointToPoint   = seqTutoCombat.skillPanel.transform.GetChild(0).GetChild(0).position;
                feedback.GetComponent <FlecheQuiBouge>().distanceOffset = 40.0f;

                feedback.transform.localEulerAngles = new Vector3(0, 0, -60);
            }

            if (skillButton.gameObject.GetComponent <MouseClickExpected>() == null)
            {
                skillButton.gameObject.AddComponent <MouseClickExpected>();
            }

            Behaviour.Monster monster = BattleHandler.CurrentBattleKeepers[0].CurrentTile.GetComponentInChildren <Behaviour.Monster>();
            if (monster.gameObject.GetComponent <MouseClickedOnIngameElt>() == null)
            {
                monster.gameObject.AddComponent <MouseClickedOnIngameElt>();
            }

            TutoManager.s_instance.EcrireMessage(str);
            TutoManager.s_instance.PlayingSequence.CurrentState = SequenceState.WaitingForSkillUse;
            TutoManager.EnablePreviousButton(false);
        }
Esempio n. 2
0
        public override void Reverse()
        {
            SeqTutoCombat seqTutoCombat = TutoManager.s_instance.GetComponent <SeqTutoCombat>();
            Button        skillButton   = seqTutoCombat.skillPanel.GetComponentInChildren <Button>();

            if (skillButton.gameObject.GetComponent <MouseClickExpected>() != null)
            {
                Destroy(skillButton.gameObject.GetComponent <MouseClickExpected>());
            }

            Behaviour.Monster monster = BattleHandler.CurrentBattleKeepers[0].CurrentTile.GetComponentInChildren <Behaviour.Monster>();
            if (monster.gameObject.GetComponent <MouseClickedOnIngameElt>() != null)
            {
                Destroy(monster.gameObject.GetComponent <MouseClickedOnIngameElt>());
            }

            foreach (Button b in seqTutoCombat.skillPanel.GetComponentsInChildren <Button>())
            {
                b.interactable = true;
            }

            Destroy(feedback);
            alreadyPlayed = false;
        }