コード例 #1
0
        public AmidaState(GoToYouStage context) : base(context)
        {
            lineLayerMask = LayerMask.GetMask("AmidaLine");

            amidaMan      = context.AmidaMan;
            personInNeed  = Context.PersonInNeed;
            currentCamera = Camera.main;
        }
コード例 #2
0
        protected override IEnumerator TouchAmidaMan(AmidaMan amidaMan, float fromReactionSec = 0)
        {
            var pos = new Vector3(amidaMan.transform.position.x, transform.position.y, amidaMan.transform.position.z);

            transform.LookAt(pos);
            Play(AgentAnimatorParameters.Attack);
            if (movingGear != null)
            {
                movingGear.Stop();
            }
            return(base.TouchAmidaMan(amidaMan, fromReactionSec));
        }
コード例 #3
0
        protected virtual IEnumerator TouchAmidaMan(AmidaMan amidaMan, float fromReactionSec = 0)
        {
            if (Mathf.Approximately(fromReactionSec, 0))
            {
                amidaMan.FallBack();
            }
            else
            {
                yield return(new WaitForSeconds(fromReactionSec));

                amidaMan.FallBack();
            }

            yield break;
        }
コード例 #4
0
        protected override IEnumerator TouchAmidaMan(AmidaMan amidaMan, float fromReactionSec = 0)
        {
            var pos = new Vector3(amidaMan.transform.position.x, transform.position.y, amidaMan.transform.position.z);

            transform.LookAt(pos);
            Play(AgentAnimatorParameters.Attack);
            Observable.Timer(TimeSpan.FromSeconds(0.5f)).Subscribe(_ => { Play(BearAnimatorParameters.Eat); })
            .AddTo(this);


            if (movingGear != null)
            {
                movingGear.Stop();
            }
            return(base.TouchAmidaMan(amidaMan, fromReactionSec));
        }