Beispiel #1
0
        // Update is called once per frame
        void Update()
        {
            if (!Chargement_jeu.waiting)
            {
                m_TimeSinceLastTick += Time.deltaTime;
                if (InferenceEngine.tour == "Ours")
                {
                    if (m_TimeSinceLastTick * 10000 > m_RuleBaseTick && this.gameObject.GetComponent <Element>().camp == "Ours")
                    {
                        m_RuleBase.DebugMessage("Tick Rulebase");

                        Tick();
                        this.gameObject.GetComponent <Element>().aJoue = true;
                        m_TimeSinceLastTick = 0;
                    }
                }
                else
                {
                    if (m_TimeSinceLastTick * 10000 > m_RuleBaseTick && this.gameObject.GetComponent <Element>().camp == "Poulpe")
                    {
                        m_RuleBase.DebugMessage("Tick Rulebase");

                        Tick();
                        this.gameObject.GetComponent <Element>().aJoue = true;
                        m_TimeSinceLastTick = 0;
                    }
                    else
                    {
                        m_RuleBase.DebugMessage("Tick error");
                    }
                }
            }
        }
Beispiel #2
0
        // Update is called once per frame
        void Update()
        {
            m_TimeSinceLastTick += Time.deltaTime;

            if (m_TimeSinceLastTick * 1000 > m_RuleBaseTick)
            {
                m_RuleBase.DebugMessage("Tick Rulebase");

                Tick();

                m_TimeSinceLastTick = 0;
            }
        }