コード例 #1
0
    public static void BlowFly(WorldBase world, EntityBase skiller, EntityBase hurter, string blowFlyID)
    {
        MoveComponent amc = skiller.GetComp <MoveComponent>();
        MoveComponent bmc = hurter.GetComp <MoveComponent>();

        Vector3 dir = amc.dir.ToVector();

        if (skiller.GetExistComp <SkillStatusComponent>())
        {
            SkillStatusComponent assc = skiller.GetComp <SkillStatusComponent>();
            dir = assc.skillDir.ToVector();
        }

        //Debug.Log("BlowFly --> skill id " + skillData.m_key + "  blowfly id " + blowFlyID + " skilltoken pos " + amc.pos.ToVector() + " ");

        if (blowFlyID != "null")
        {
            //Debug.Log("BlowFly " + hurter.ID + " skillID " + skillData.m_key);

            //击飞处理
            if (hurter.GetExistComp <BlowFlyComponent>())
            {
                BlowFlyComponent bfc = hurter.GetComp <BlowFlyComponent>();
                if (!bfc.isBlow)
                {
                    bfc.isBlow    = true;
                    bfc.blowFlyID = blowFlyID;
                    bfc.blowTime  = (int)(bfc.BlowData.m_Time * 1000);
                    bfc.SetBlowFly(amc.pos.ToVector(), bmc.pos.ToVector(), dir);
                }
            }
        }
    }
コード例 #2
0
    public void BlowFly(EntityBase skiller, EntityBase hurter, SkillDataGenerate skillData)
    {
        MoveComponent   amc = skiller.GetComp <MoveComponent>();
        MoveComponent   bmc = hurter.GetComp <MoveComponent>();
        PlayerComponent apc = skiller.GetComp <PlayerComponent>();

        string blowFlyID = skillData.m_BlowFlyID;

        if (blowFlyID != "null")
        {
            //击飞处理
            if (hurter.GetExistComp <BlowFlyComponent>())
            {
                BlowFlyComponent bfc = hurter.GetComp <BlowFlyComponent>();
                bfc.blowFlyID = blowFlyID;
                bfc.blowTime  = (int)(bfc.BlowData.m_Time * 1000);
                bfc.SetBlowFly(amc.pos.ToVector(), bmc.pos.ToVector(), apc.faceDir.ToVector());
            }
        }
    }