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 void Message_fct()
        {
            GameManager.Instance.AllKeepersList[0].GetComponent <Inventory>().SelectedInventoryPanel.gameObject.SetActive(true); // Inventory

            if (feedback == null)
            {
                feedback = Instantiate(TutoManager.s_instance.uiPointer, GameManager.Instance.Ui.transform.GetChild(0));
                feedback.GetComponent <FlecheQuiBouge>().PointToPoint   = GameManager.Instance.AllKeepersList[0].GetComponent <Inventory>().SelectedInventoryPanel.transform.position + Vector3.up * (100 * (Screen.height / 1080.0f));
                feedback.GetComponent <FlecheQuiBouge>().distanceOffset = 250.0f;

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

            if (feedbackCircle == null)
            {
                feedbackCircle = Instantiate(GameManager.Instance.PrefabUIUtils.PrefabImageUI);
                feedbackCircle.transform.SetParent(GameManager.Instance.AllKeepersList[0].GetComponent <Inventory>().SelectedInventoryPanel.transform.GetChild(0).GetChild(0));
                feedbackCircle.transform.localPosition       = Vector3.zero;
                feedbackCircle.transform.localScale          = Vector3.one * 2.0f;
                feedbackCircle.GetComponent <Image>().sprite = GameManager.Instance.SpriteUtils.spriteTutoCircleFeedback;
                feedbackCircle.AddComponent <ThrowDiceButtonFeedback>();
            }

            TutoManager.s_instance.EcrireMessage(str);
            TutoManager.s_instance.PlayingSequence.CurrentState = SequenceState.WaitingForClickUI;
            TutoManager.EnablePreviousButton(false);
        }
Esempio n. 3
0
        public void Message_fct()
        {
            // Give back the character his skills
            BattleHandler.CurrentBattleKeepers[0].GetComponent <GlowObjectCmd>().ActivateBlinkBehaviour(false);
            BattleHandler.CurrentBattleKeepers[0].GetComponent <Behaviour.Fighter>().BattleSkills.Clear();
            BattleHandler.CurrentBattleKeepers[0].GetComponent <Behaviour.Fighter>().BattleSkills = TutoManager.s_instance.GetComponent <SeqTutoCombat>().previousCharacterSkills;
            GameManager.Instance.GetBattleUI.GetComponent <UIBattleHandler>().TutoReloadSkillPanel(BattleHandler.CurrentBattleKeepers[0]);


            TutoManager.s_instance.EcrireMessage(str);
            TutoManager.s_instance.PlayingSequence.CurrentState = SequenceState.WaitingForExternalEvent;
            TutoManager.EnablePreviousButton(false);
            TutoManager.EnableNextButton(true);
        }
Esempio n. 4
0
        public void SeDeplacer_fct()
        {
            speaker.GetComponent <Behaviour.AnimatedPawn>();

            TutoManager.EnableNextButton();
            if (TutoManager.s_instance.PlayingSequence.isPreviousStepReachable())
            {
                TutoManager.EnablePreviousButton();
            }
            else
            {
                TutoManager.EnablePreviousButton(false);
            }
            TutoManager.s_instance.PlayingSequence.CurrentState = SequenceState.Idle;
            return;
        }
Esempio n. 5
0
        public void Message_fct()
        {
            EcrireMessage(speaker.GetComponent <PawnInstance>().Data.AssociatedSprite, str);

            TutoManager.EnableNextButton();
            if (TutoManager.s_instance.PlayingSequence.isPreviousStepReachable())
            {
                TutoManager.EnablePreviousButton();
            }
            else
            {
                TutoManager.EnablePreviousButton(false);
            }
            TutoManager.s_instance.PlayingSequence.CurrentState = SequenceState.Idle;
            return;
        }
Esempio n. 6
0
        public void Message_fct()
        {
            SeqTutoCombat seqTutoCombat = TutoManager.s_instance.GetComponent <SeqTutoCombat>();
            Button        rdButton      = seqTutoCombat.rollDiceButton.GetComponentInChildren <Button>();

            if (rdButton.gameObject.GetComponent <MouseClickExpected>() == null)
            {
                rdButton.gameObject.AddComponent <MouseClickExpected>();
            }
            rdButton.GetComponent <ThrowDiceButtonFeedback>().enabled = true;
            rdButton.interactable = true;

            rdButton.transform.parent.SetParent(GameManager.Instance.Ui.transform.GetChild(0));

            TutoManager.s_instance.EcrireMessage(str);
            TutoManager.s_instance.PlayingSequence.CurrentState = SequenceState.WaitingForClickUI;
            TutoManager.EnablePreviousButton(false);
        }