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

            playerDirection = (C_Switch3)entity.GetNormalComponent("C_Switch3");
            bezierPoint     = (C_BezierPoint)entity.GetNormalComponent("C_BezierPoint");
            state           = (C_CharaState)entity.GetNormalComponent("C_CharaState");
            state.IsJump    = true;

            animControl = (C_DrawAnimetion)entity.GetDrawComponent("C_DrawAnimetion");
            animControl.SetNowAnim("Jump");

            if (playerDirection.IsRight())
            {
                entity.transform.Angle = 330;
            }
            else if (playerDirection.IsLeft())
            {
                entity.transform.Angle = 210;
            }
            else if (playerDirection.IsNone())
            {
                entity.transform.Angle = 360;
            }

            entity.transform.SetPositionY += currentJumpPower;
        }
Exemplo n.º 2
0
        public override void Active()
        {
            base.Active();
            //TODO 更新コンテナに自分を入れる

            entityDirect = (C_Switch3)entity.GetNormalComponent("C_Switch3");
        }
Exemplo n.º 3
0
        public override void Active()
        {
            base.Active();
            //TODO 更新コンテナに自分を入れる

            player         = EntityManager.FindWithTag("Player")[0];
            childDirection = (C_Switch3)entity.GetNormalComponent("C_Switch3");
            state          = (C_CharaState)entity.GetNormalComponent("C_CharaState");
            bezierPoint    = (C_BezierPoint)entity.GetNormalComponent("C_BezierPoint");
            childState     = (C_ChildState)entity.GetNormalComponent("C_ChildState");
            energy         = (C_Energy)entity.GetNormalComponent("C_Energy");
            collider       = entity.GetColliderComponent("Squirrel");
            draw           = (C_DrawAnimetion)entity.GetDrawComponent("C_DrawAnimetion");
            restExpend     = energy.GetLimitEnery() / 60 / 50; //50秒で体力尽き
            moveExpend     = energy.GetLimitEnery() / 60 / 20 + restExpend;


            if (childDirection.IsRight())
            {
                entity.transform.Angle = 360;
            }
            else if (childDirection.IsLeft())
            {
                entity.transform.Angle = 180;
            }
            else if (childDirection.IsNone())
            {
                entity.transform.Angle = 360;
            }
        }
Exemplo n.º 4
0
        public override void Active()
        {
            base.Active();
            //TODO 更新コンテナに自分を入れる

            player         = EntityManager.FindWithTag("Player")[0];
            childDirection = (C_Switch3)entity.GetNormalComponent("C_Switch3");
            bezierPoint    = (C_BezierPoint)entity.GetNormalComponent("C_BezierPoint");
            state          = (C_CharaState)entity.GetNormalComponent("C_CharaState");

            if (childDirection.IsRight())
            {
                entity.transform.Angle = 330;
            }
            else if (childDirection.IsLeft())
            {
                entity.transform.Angle = 210;
            }
            else if (childDirection.IsNone())
            {
                entity.transform.Angle = 360;
            }

            JumpingMove();
        }
Exemplo n.º 5
0
 protected override void Initialize(Entity entity)
 {
     deadCheck  = (C_EntityDeadCheck)entity.GetUpdateComponent("C_EntityDeadCheck");
     eagleAnim  = (C_DrawAnimetion)entity.GetDrawComponent("C_DrawAnimetion");
     eagleState = (C_EnemyState)entity.GetNormalComponent("C_EnemyState");
     eagleAnim.SetNowAnim("Attack");
     eagleDirection = (C_Switch3)entity.GetNormalComponent("C_Switch3");
 }
Exemplo n.º 6
0
        protected override void Initialize(Entity entity)
        {
            moveComp = (C_MoveWithBoarAI)entity.GetUpdateComponent("C_MoveWithBoarAI");
            moveComp.SetEscape();

            direction = (C_Switch3)entity.GetNormalComponent("C_Switch3");
            direction.UTurn(false);
        }
Exemplo n.º 7
0
        public override void Active()
        {
            base.Active();
            //TODO 更新コンテナに自分を入れる

            playerDirection = (C_Switch3)entity.GetNormalComponent("C_Switch3");
            bezierPoint     = (C_BezierPoint)entity.GetNormalComponent("C_BezierPoint");
            state           = (C_CharaState)entity.GetNormalComponent("C_CharaState");
            animControl     = (C_DrawAnimetion)entity.GetDrawComponent("C_DrawAnimetion");
        }
Exemplo n.º 8
0
        public override void Active()
        {
            base.Active();
            //TODO 更新コンテナに自分を入れる

            overseeEntity.SetParent(entity);

            eagleDirection = (C_Switch3)entity.GetNormalComponent("C_Switch3");

            moveAreaLeft  = entity.transform.Position.X;
            moveAreaRight = moveAreaLeft + 500;
        }
Exemplo n.º 9
0
        public override void Active()
        {
            base.Active();
            //TODO 更新コンテナに自分を入れる

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

            entity.RegisterComponent(fallComp);

            collider = new C_Collider_Circle("Squirrel", new Vector2(0, -30), 50);
            entity.RegisterComponent(collider);

            childDirect = (C_Switch3)entity.GetNormalComponent("C_Switch3");
            childState  = (C_ChildState)entity.GetNormalComponent("C_ChildState");
            childHP     = (C_Energy)entity.GetNormalComponent("C_Energy");

            playerState = (C_PlayerState)TaskManager.GetNormalComponent(EntityManager.FindWithName("Player")[0], "C_PlayerState")[0];
        }
Exemplo n.º 10
0
        protected override void Initialize(Entity entity)
        {
            playerAnim      = (C_DrawAnimetion)entity.GetDrawComponent("C_DrawAnimetion");
            playerDirection = (C_Switch3)entity.GetNormalComponent("C_Switch3");

            Vector2 offset = Vector2.Zero;

            if (playerDirection.IsRight())
            {
                offset = new Vector2(100, -110);
            }
            else if (playerDirection.IsLeft())
            {
                offset = new Vector2(-100, -110);
            }
            attackCollider = new C_Collider_Circle("PlayerAttack", offset, 50);
            entity.RegisterComponent(attackCollider);
        }
Exemplo n.º 11
0
        protected override void UpdateMove()
        {
            if (collider.IsThrough("ChildJump") && !childDirection.IsNone())
            {
                state.IsJump = true;
            }
            if (state.IsJump)
            {
                return;
            }
            isCaught = childState.IsBeCaught();
            if (isCaught)
            {
                Entity enemy = childState.GetEnemyCaughtMe();
                if (!enemy.GetIsActive())
                {
                    entity.DeActive();
                    return;
                }
                C_Switch3 enemyDirection = (C_Switch3)enemy.GetNormalComponent("C_Switch3");
                Vector2   offset         = enemyDirection.IsRight() ? new Vector2(-20, 0) : new Vector2(20, 0);
                entity.transform.Position = enemy.transform.Position + offset;
                return;
            }

            base.UpdateMove();

            if (childState == null)
            {
                return;
            }
            if (!childState.FollowSwitch)
            {
                return;
            }

            speed = startSpeed;     // - startSpeed *(1 - energy.GetRate())* 0.5f

            CheckDirection();
            Move();
        }
Exemplo n.º 12
0
        public override void Active()
        {
            base.Active();
            //TODO 更新コンテナに自分を入れる

            childDirection = (C_Switch3)entity.GetNormalComponent("C_Switch3");

            if (childDirection.IsRight())
            {
                entity.transform.Angle = 360;
            }
            else if (childDirection.IsLeft())
            {
                entity.transform.Angle = 180;
            }
            else if (childDirection.IsNone())
            {
                entity.transform.Angle = 360;
            }

            moveAreaLeft  = entity.transform.Position.X;
            moveAreaRight = moveAreaLeft + 500;
        }
Exemplo n.º 13
0
        public override void Active()
        {
            base.Active();
            //TODO 更新コンテナに自分を入れる

            childDirection = (C_Switch3)entity.GetNormalComponent("C_Switch3");
            bezierPoint    = (C_BezierPoint)entity.GetNormalComponent("C_BezierPoint");

            childDirection.SetRight(false);

            if (childDirection.IsRight())
            {
                entity.transform.Angle = 360;
            }
            else if (childDirection.IsLeft())
            {
                entity.transform.Angle = 180;
            }
            else if (childDirection.IsNone())
            {
                entity.transform.Angle = 360;
            }
        }