示例#1
0
    public override bool CostSkill(ISkillTarget target, int sex = 2, bool buttonDown = false, bool buttonPressed = false)
    {
        if (!base.CostSkill(target, sex, buttonDown, buttonPressed))
        {
            return(false);
        }

        if (VFVoxelWater.self.IsInWater(mMuzzle.position) &&
            mShootState == ShootState.Aim &&
            buttonPressed)
        {
            DefaultPosTarget defaultTarget = new DefaultPosTarget(mSkillRunner.transform.position + mSkillRunner.transform.forward);
            if (null != CostSkill(mSkillRunner, mPumpSkillId, defaultTarget))
            {
                AudioManager.instance.Create(transform.position, mFireSound);

                if (GameConfig.IsMultiMode && mMainPlayerEquipment)
                {
                    //Player player = mSkillRunner as Player;
                    //if (null != player)
                    //    player.RPCServer(EPacketType.PT_InGame_WaterPump);
                }

                return(true);
            }
        }
        return(false);
    }
示例#2
0
    protected virtual void RPC_S2C_SkillCastShoot(uLink.BitStream stream, uLink.NetworkMessageInfo info)
    {
        int     skillID = stream.Read <int>();
        Vector3 pos     = stream.Read <Vector3>();

        DefaultPosTarget target = new DefaultPosTarget(pos);

        SkillRunner caster = Runner as SkillRunner;

        if (null != caster && !caster.IsController)
        {
            caster.RunEffOnProxy(skillID, target);
        }
    }
    void RPC_S2C_SkillCastShoot(uLink.BitStream stream, uLink.NetworkMessageInfo info)
    {
        int     skillID;
        Vector3 pos;

        stream.TryRead <int>(out skillID);
        stream.TryRead <Vector3>(out pos);

        DefaultPosTarget target = new DefaultPosTarget(pos);

        SkillRunner caster = Runner as SkillRunner;

        if (null != caster)
        {
            caster.RunEffOnProxy(skillID, target);
        }
    }