void AnturaEnterScene()
        {
            List <Vector3> AnturaPath = new List <Vector3>();

            AnturaPath.Add(ArrayTrees[2].transform.position + Vector3.forward * 3);
            AnturaPath.Add(ArrayTrees[6].transform.position + Vector3.forward * 3);
            AnturaPath.Add(ArrayTrees[6].transform.position + Vector3.forward * 3 + Vector3.left * 3);

            //AnturaPath.Add(ArrayTrees[0].transform.position + Vector3.back * 3);
            AnturaPath.Add(ArrayTrees[1].transform.position + Vector3.forward * 3);

            AnturaPath.Add(transform.position + Vector3.left * 40);

            Vector3[] aAnturaPath = AnturaPath.ToArray();

            AnturaAnimationController anturaAC = Antura.GetComponent <AnturaAnimationController>();

            anturaAC.IsAngry = true;
            //anturaAC.IsSad = true;

            anturaAC.State = AnturaAnimationStates.walking;

            Antura.transform.DOPath(aAnturaPath, 10, PathType.CatmullRom).OnWaypointChange(delegate(int wayPoint) {
                Antura.transform.DOLookAt(aAnturaPath[wayPoint], 0.5f);
            });
        }
Exemplo n.º 2
0
        void Start()
        {
            animator = GetComponent <AnturaAnimationController>();

            state          = State.Running;
            animator.State = AnturaAnimationStates.walking;
        }
Exemplo n.º 3
0
        void Awake()
        {
            animator = GetComponent <AnturaAnimationController>();

            WalkingState = new WalkAnturaState(this);
            IdleState    = new IdleAnturaState(this);

            SetCurrentState(IdleState);
        }
        void Awake()
        {
            antura = gameObject.GetComponent <AnturaAnimationController>();

            antura.State        = AnturaAnimationStates.sitting;
            antura.WalkingSpeed = 0; //walk-0, run-1
            status = AnturaContollerState.LEFTHOME;

            StartCoroutine(co_AnturaNextDesicion());
        }
Exemplo n.º 5
0
        void Start()
        {
            foreach (Collider collider in GetComponentsInChildren <Collider>())
            {
                collider.enabled = false;
            }

            capsuleCollider.enabled = true;

            animator = GetComponent <AnturaAnimationController>();

            Reset();
        }
Exemplo n.º 6
0
        void Start()
        {
            antura         = GetComponent <AnturaAnimationController>();
            anturaAnimator = GetComponent <Animator>();
            antura.SetWalkingSpeed(1);
            antura.State = AnturaAnimationStates.walking;

            transform.position += Vector3.right * 25;

            StartCoroutine(handleAnturasEvents());

            thisRound = game.roundsManager.numberOfRoundsPlayed;
        }
        private IEnumerator AnimationCoroutine(Action callback)
        {
            var particles =
                Instantiate(poof, AnturaPosition.position, AnturaPosition.rotation)
                as GameObject;

            var particles2 =
                Instantiate(poof, AnturaPosition.position, AnturaPosition.rotation)
                as GameObject;

            particles2.transform.localScale = new Vector3(2, 2, 2);
            particles2.SetLayerRecursive(AnturaLayers.ModelsOverUI);
            particles.transform.localScale = new Vector3(2, 2, 2);
            particles.SetLayerRecursive(AnturaLayers.ModelsOverUI);

            AssessmentConfiguration.Instance.Context.GetAudioManager().PlaySound(Sfx.Poof);

            yield return(TimeEngine.Wait(0.15f));

            AnturaAnimationController antura =
                Instantiate(anturaPrefab, AnturaPosition.position, AnturaPosition.rotation)
                as AnturaAnimationController;

            antura.gameObject.AddComponent <BringAnturaInFlagSpace>();

            antura.transform.localScale = Vector3.zero;
            antura.transform.DOScale(Vector3.one, 0.2f);

            yield return(TimeEngine.Wait(0.9f));

            antura.DoShout(
                () => AssessmentConfiguration.Instance.Context.GetAudioManager()
                .PlaySound(Sfx.DogBarking)
                );

            yield return(TimeEngine.Wait(1.2f));

            particles2 =
                Instantiate(poof, AnturaPosition.position, AnturaPosition.rotation)
                as GameObject;

            particles2.transform.localScale = new Vector3(2, 2, 2);
            particles2.SetLayerRecursive(AnturaLayers.ModelsOverUI);
            yield return(TimeEngine.Wait(1f));

            antura.transform.DOScale(Vector3.zero, 0.2f).SetEase(Ease.InExpo);
            callback();
        }
Exemplo n.º 8
0
        public void Initialize(GameObject anturaPrefab)
        {
            anturaAnimation = GameObject.Instantiate(anturaPrefab).GetComponent <AnturaAnimationController>();
            anturaAnimation.transform.SetParent(transform);
            anturaAnimation.transform.position         = exitPosition.position;
            anturaAnimation.transform.localEulerAngles = new Vector3(0f, 90f);
            anturaAnimation.transform.localScale       = Vector3.one;

            ChengeGameObjectLayer(anturaAnimation.gameObject);

            ChengeGameObjectLayer(aspirationParticle);

            aspirationParticle.SetActive(false);

            anturaTest = false;
            noEntry    = false;
        }
        void Awake()
        {
            /*m_Antura = gameObject.GetComponent<Antura>();
             * m_StartPosition = gameObject.transform.position;
             * m_Antura.SetAnimation(AnturaAnim.SitBreath);*/
            m_oAntura           = gameObject.GetComponent <AnturaAnimationController>();
            m_v3StartPosition   = m_oAntura.gameObject.transform.position;
            m_eAnturaState      = AnturaContollerState.SLEEPING;
            m_fBarkTimeProgress = 0;
            m_v3Destination     = m_oDestination.position;

            m_oAntura.State        = AnturaAnimationStates.sitting;
            m_oAntura.WalkingSpeed = 0; //walk-0, run-1

            m_eAnturaState      = AnturaContollerState.ROTATION;
            m_bRotatingToTarget = true;
        }
Exemplo n.º 10
0
        private void Awake()
        {
            controller = GetComponent <AnturaAnimationController>();

            // Reuse a well made animation
            antura              = gameObject.AddComponent <ReadingGameAntura>();
            antura.enabled      = false;
            antura.AllowSitting = true;
            state = State.Cache();

            Entering = EnteringState();
            Idle     = IdleState();
            Exiting  = ExitingState();
            Angry    = AngryState();
            Happy    = HappyState();

            becomeExiting = state.Event();
            becomeHappy   = state.Event();
            becomeAngry   = state.Event();
        }
Exemplo n.º 11
0
 void Start()
 {
     antura = GetComponent <AnturaAnimationController>();
 }
Exemplo n.º 12
0
 void Awake()
 {
     AnimationController = GetComponent <AnturaAnimationController>();
 }