コード例 #1
0
    public void Process(EntityBase entity, params object[] args)
    {
        if (entity.nextAtkID != 0)
        {
            entity.Attack(entity.nextAtkID);
        }
        else
        {
            if (entity.entityType == EntityType.Player)
            {
                entity.canReleaseSkill = true;
            }

            if (entity.GetCurrentDirInput() != Vector2.zero)
            {
                entity.Move();
                entity.SetDir(entity.GetCurrentDirInput());
            }
            else
            {
                entity.SetDir(Vector2.zero);
                entity.SetBlend(Constant.BlendIdle);
            }
        }
        //PECommon.Log("Process Idle");
    }
コード例 #2
0
ファイル: StateIdle.cs プロジェクト: yoyo-sincerely/DarkGod
 public void Process(EntityBase entity, params object[] args)
 {
     if (entity.nextSkillID != 0)   // 开始连招
     {
         entity.Attack(entity.nextSkillID);
     }
     else
     {
         if (entity.entityType == EntityType.Player)
         {
             entity.canRlsSkill = true;
         }
         // 轮盘一直处于移动状态时,释放了技能后,尽管没有动轮盘,但依然需要他按照之前的方向移动
         if (entity.GetDirInput() != Vector2.zero)
         {
             entity.Move();
             entity.SetDir(entity.GetDirInput());
         }
         else   // 怪物,AI 驱动
         {
             entity.SetBlend(Constants.BlendIdle);
         }
     }
     //PECommon.Log("Process StateIdle.");
 }
コード例 #3
0
 public void Process(EntityBase entity, params object[] args)
 {
     if (entity.nextSkillID != 0)
     {
         entity.Attack(entity.nextSkillID);
     }
     else
     {
         if (entity.entityType == EntityType.Player)
         {
             entity.canRlsSkill = true;
         }
         if (entity.GetDirInput() != Vector2.zero)
         {
             entity.Move();
             // 手动设置方向来获取当前摇杆的偏移量来判断是否要移动
             entity.SetDir(entity.GetDirInput());
         }
         else
         {
             entity.SetBlend(Constants.BlendIdle);
         }
         //PECommon.Log("Process StateIdle");
     }
 }
コード例 #4
0
    public void Process(EntityBase entityBase, params object[] args)
    {
        //Debug.Log(GetType() + "/Process()/ StateIdle ");
        // 判断有连招不
        if (entityBase.nextSkillID != 0)
        {
            entityBase.Attack(entityBase.nextSkillID);
        }
        else
        {
            // 进入Idle 状态的时候可以释放技能了
            if (entityBase.entityType == EntityType.Player)
            {
                entityBase.canRlsSkill = true;
            }

            // 判断有移动操作不
            if (entityBase.GetCurDirInput() != Vector2.zero)
            {
                entityBase.Move();
                entityBase.SetDir(entityBase.GetCurDirInput());
            }
            else
            {
                entityBase.SetBlend(Constants.BlendIdle);
            }
        }
    }
コード例 #5
0
    private void OnTriggerEnter(Collider other)
    {
        EntityBase hit = other.GetComponent <EntityBase>();

        if (!hit || hit.team != team)
        {
            if (PhotonNetwork.isMasterClient && hit)
            {
                owner.Attack(damageValue, hit, damageType);
            }
            StorBullet();
        }
    }
コード例 #6
0
 public void Process(EntityBase entity, params object[] args)
 {
     if (entity.nextSkillID != 0)
     {
         Debug.Log("==========combo next");
         entity.Attack((Orient)args[0], entity.nextSkillID);
     }
     else
     {
         entity.SetDir((Orient)args[0]);
         entity.SetAction(Constants.AniIdle);
     }
 }
コード例 #7
0
 public void Process(EntityBase entity, params object[] args)
 {
     if (entity.nextSkillID != 0)
     {
         entity.Attack(entity.nextSkillID);
     }
     else
     {
         if (entity.GetDirInput() != Vector2.zero)
         {
             entity.Move();
             entity.SetDir(entity.GetDirInput());
         }
         else
         {
             entity.SetBlend(Constants.BlendIdle);
         }
         //PECommon.Log("Process idle");
     }
 }
コード例 #8
0
ファイル: StateIdle.cs プロジェクト: wangzeping1998/-
 public void Process(EntityBase entity, params object[] objs)
 {
     PECommon.Log("Process idle state.");
     if (entity.nextSkillID != 0)
     {
         entity.Attack(entity.nextSkillID);
     }
     else
     {
         if (entity.GetMoveDir() != Vector2.zero)
         {
             entity.Move();
             entity.SetDir(entity.GetMoveDir());
         }
         else
         {
             entity.SetBlend(0);
         }
     }
 }
コード例 #9
0
    public void DoState(EntityBase entity, params object[] args)
    {
        if (entity._nextSkillID != 0)
        {
            entity.Attack(entity._nextSkillID);
        }
        else
        {
            if (entity._entityType == Constants.EntityType.Player)
            {
                entity._bCanReleaseSkill = true;
            }

            if (entity.GetCurrentDirection() != Vector2.zero)
            {
                entity.Move();
                entity.SetDirection(entity.GetCurrentDirection());
            }
            else
            {
                entity.SetBlend(Constants.cBlendIdle);
            }
        }
    }
コード例 #10
0
    public void Process(EntityBase entity, params object[] args)
    {
        if (entity.NextSkillID != 0)
        {
            entity.Attack(entity.NextSkillID);
        }
        else
        {
            if (entity.entityType == EntityType.Player)
            {
                entity.CanRlsSkill = true;
            }

            if (entity.GetDirInput() != Vector2.zero)
            {
                entity.Move();
                entity.SetDir(entity.GetDirInput());
            }
            else
            {
                entity.SetBlend(Constants.BlendIdle);
            }
        }
    }