Example #1
0
    public void OtherPlayerAttack(MsgSCPlayerAttack msg)
    {
        GameObject          obj = playerArray[msg.userID];
        OtherPlayerShooting ops = obj.GetComponentInChildren <OtherPlayerShooting>();

        if (msg.kind == MsgSCPlayerAttack.WEAPON_ATTACK)
        {
            ops.ShootArrow();
        }
        else if (msg.kind == MsgSCPlayerAttack.MAGIC_ATTACK)
        {
            ops.ShootMagic();
        }
    }