Exemple #1
0
        public override void Active()
        {
            base.Active();
            //TODO 更新コンテナに自分を入れる

            UpdateComponent fallComp = new C_JumpWithBoarAI(Parameter.PlayerLimitSpeed, false);

            entity.RegisterComponent(fallComp);
            entity.RegisterComponent(collider);
        }
        protected override eStateTrans UpdateAction(Entity entity, ref IState <Entity> nextState)
        {
            if (moveComp.GetIsFall())
            {
                entity.RemoveComponent(moveComp);
                UpdateComponent fallComp = new C_JumpWithBoarAI(Parameter.PlayerLimitSpeed);
                entity.RegisterComponent(fallComp);
                nextState = new JumpState_Com_Boar(gameDevice);
                return(eStateTrans.ToNext);
            }

            //Damage判定
            if (CollitionCheck(entity))
            {
                nextState = new EscapeState_Com_Boar(gameDevice);
                return(eStateTrans.ToNext);
            }

            nextState = this;
            return(eStateTrans.ToThis);
        }
 protected override void Initialize(Entity entity)
 {
     jumpComp  = (C_JumpWithBoarAI)entity.GetUpdateComponent("C_JumpWithBoarAI");
     deadCheck = (C_EntityDeadCheck)entity.GetUpdateComponent("C_EntityDeadCheck");
 }